[go: up one dir, main page]

CN112559930B - Webpage integration method, webpage integration device, computer equipment and storage medium - Google Patents

Webpage integration method, webpage integration device, computer equipment and storage medium Download PDF

Info

Publication number
CN112559930B
CN112559930B CN201910917600.7A CN201910917600A CN112559930B CN 112559930 B CN112559930 B CN 112559930B CN 201910917600 A CN201910917600 A CN 201910917600A CN 112559930 B CN112559930 B CN 112559930B
Authority
CN
China
Prior art keywords
webpage
integrated
original
data
webpage data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910917600.7A
Other languages
Chinese (zh)
Other versions
CN112559930A (en
Inventor
付少松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910917600.7A priority Critical patent/CN112559930B/en
Publication of CN112559930A publication Critical patent/CN112559930A/en
Application granted granted Critical
Publication of CN112559930B publication Critical patent/CN112559930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a webpage integration method, a webpage integration device, computer equipment and a storage medium, wherein the method comprises the steps of acquiring a webpage integration application, and extracting a network address, functional webpage data and a preset integration template which are carried in the webpage integration application and correspond to an integrated webpage; simulating to generate a network request, and forwarding the network request to an original server corresponding to the network address; acquiring original webpage data corresponding to an integrated webpage fed back by an original server, calling a preset integrated template and functional webpage data, and performing html grammar injection on the original webpage data to generate an integrated webpage; and feeding back the integrated webpage. According to the method and the device, html grammar injection corresponding to the function webpage is carried out on the integrated original webpage data through the preset integration template, the functions to be integrated in the original webpage data are integrated into the corresponding area of the function webpage, the corresponding integrated webpage is generated, and only the required functions are integrated from the integrated webpage, so that the influence of webpage integration on the operation consistency and the operation smoothness of the generated webpage after the integration is effectively reduced.

Description

Webpage integration method, webpage integration device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for web page integration, a computer device, and a storage medium.
Background
With the development of computer internet technology, internet websites are increasing. The web page is a basic element forming a website and is a platform for bearing various website applications. Colloquially, a web site is made up of web pages, which a customer cannot access if only domain names and virtual hosts are present without making any web pages.
The web page integration is one of web page technologies, and can be used for integrating different companies in parallel or integrating a plurality of product lines in the company, and a plurality of existing web pages are required to be integrated into one website.
However, the web pages generated after integration exist independently at present, and the operation consistency and the operation smoothness are limited.
Disclosure of Invention
In view of this, it is necessary to provide a web page integration method, apparatus, computer device, and storage medium capable of improving the operation consistency and operation smoothness of integrated web pages, in order to solve the problems of operation consistency and operation smoothness limitation of integrated web pages.
A web page integration method, the method comprising:
acquiring a webpage integration application, and extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated, which are contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to an integrated webpage fed back by the original server, calling the preset integrated template and the functional webpage data to perform html (Hyper Text Markup Language ) grammar injection on the original webpage data, and generating an integrated webpage;
and feeding back the integrated webpage.
In one embodiment, the obtaining the original webpage data corresponding to the integrated webpage fed back by the original server, calling the preset integration template and the functional webpage data to perform html grammar injection on the original webpage data, and generating the integrated webpage includes:
acquiring original webpage data corresponding to the integrated webpage fed back by the original server;
identifying webpage data corresponding to functions to be integrated in the original webpage data according to the preset integrated template;
and modifying the original webpage data except the webpage data to be integrated in the original webpage data by injecting html grammar into the original webpage data according to the functional webpage data, so as to generate an integrated webpage.
In one embodiment, when modifying the original webpage data except the webpage data to be integrated in the original webpage data, determining an html tag corresponding to the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data.
In one embodiment, the obtaining the original webpage data corresponding to the integrated webpage fed back by the original server, calling the preset integration template and the functional webpage data to perform html grammar injection on the original webpage data, and after generating the integrated webpage, further includes:
and performing function verification on the generated integrated webpage.
In one embodiment, the performing the function verification on the generated integrated web page includes:
acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage;
and when the integrated webpage is available, entering a step of feeding back the integrated webpage.
In one embodiment, the method further comprises:
and when the integrated webpage is not available, modifying webpage data of the integrated webpage according to the function test result, and then carrying out function verification again.
A web page integration apparatus, the apparatus comprising:
the application acquisition module is used for acquiring a webpage integration application, extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated contained in the integrated webpage;
the request generation module is used for generating a data request according to the network address simulation and forwarding the data request to an original server corresponding to the network address;
the webpage integration module is used for acquiring original webpage data corresponding to the integrated webpage fed back by the original server, calling the preset integration template and the functional webpage data to perform html grammar injection on the original webpage data, and generating an integrated webpage;
and the webpage feedback module is used for feeding back the integrated webpage.
In one embodiment, the web page integration module is configured to:
acquiring original webpage data corresponding to the integrated webpage fed back by the original server;
identifying webpage data corresponding to functions to be integrated in the original webpage data according to the preset integrated template;
and carrying out html grammar injection on the original webpage data according to the functional webpage data, modifying the original webpage data except the webpage data to be integrated in the original webpage data, and generating an integrated webpage.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a webpage integration application, and extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated, which are contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to an integrated webpage fed back by the original server, calling the preset integrated template and the functional webpage data to perform html grammar injection on the original webpage data, and generating an integrated webpage;
and feeding back the integrated webpage.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a webpage integration application, and extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated, which are contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to an integrated webpage fed back by the original server, calling the preset integrated template and the functional webpage data to perform html grammar injection on the original webpage data, and generating an integrated webpage;
and feeding back the integrated webpage.
According to the webpage integration method, the webpage integration device, the computer equipment and the storage medium, the network address, the functional webpage data and the preset integration template corresponding to the integrated webpage carried in the webpage integration application are extracted through acquiring the webpage integration application; generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address; acquiring original webpage data corresponding to an integrated webpage fed back by an original server, calling a preset integrated template and functional webpage data, and performing html grammar injection on the original webpage data to generate an integrated webpage; and feeding back the integrated webpage. According to the webpage integration method, html grammar injection corresponding to the function webpage is carried out on the integrated original webpage data through the preset integration template, the functions to be integrated in the original webpage data are integrated into the corresponding area of the function webpage, the corresponding integrated webpage is generated, and only the required functions are integrated from the integrated webpage, so that the influence of webpage integration on the operation consistency and the operation smoothness of the generated webpage after integration is effectively reduced.
Drawings
FIG. 1 is an application environment diagram of a web page integration method in one embodiment;
FIG. 2 is a flow chart of a web page integration method according to an embodiment;
FIG. 3 is a functional integration diagram of a web page integration method according to one embodiment;
FIG. 4 is a schematic flow chart illustrating a sub-process of step S600 of FIG. 2 in one embodiment;
FIG. 5 is a block diagram of a web page integration apparatus in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The webpage integration method provided by the application can be applied to an application environment shown in fig. 1. Wherein the client server 102 communicates with the integration server 104 over a network and the integration server 104 communicates with the origin server 106 over a network. The client server 102 sends a webpage integration application to the integration server 104, and the integration server 104 extracts a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application by acquiring the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated, which are contained in the integrated webpage; generating a corresponding data request according to the network address simulation, and forwarding the data request to an original server 106 corresponding to the network address; then, original webpage data corresponding to the integrated webpage fed back by the original server are obtained, html grammar injection corresponding to the functional webpage is carried out on the original webpage data by calling a preset integration template and the functional webpage data, and functions to be integrated in the original webpage data are integrated into a functional webpage corresponding area to generate an integrated webpage; finally, the integrated web page is fed back to the server 102. Both server 102 and server 104 may be implemented as separate servers or as a cluster of servers.
In one embodiment, as shown in fig. 2, a web page integration method is provided, and the method is applied to the integration server 104 in fig. 1 for illustration, and includes the following steps:
s200, acquiring a webpage integration application, extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated contained in the integrated webpage.
The web page integration application refers to that, in the process of generating a web page, the client server 102 wants to integrate a function of a web page in the original server 106 onto a new web page displayed by the client server 102, and at this time, the client server 102 may initiate a request to the integration server 104 through the web page integration application, and the integration server 104 generates a new web page integrated with the function. The specific webpage integration application comprises a webpage address of a webpage where the function to be integrated is located, functional webpage data and a preset integration template, wherein the functional webpage data refer to other webpage data except the webpage data corresponding to the integrated function in the integrated webpage, and the preset integration template is used for searching the webpage data corresponding to the function to be integrated contained in the integrated webpage. In addition, the web page integration application may further include a part of web page data of the new web page to be generated, where the part of web page data is used for generating other functional parts of the web page to be integrated except the function to be integrated.
S400, the server generates a corresponding data request according to the network address simulation, and forwards the data request to an original server corresponding to the network address.
Wherein the data request refers to a request of the integration server 104 for requesting web page data from the origin server 106, and the data request specifically includes an http request. http is a simple request-response protocol that typically runs on top of TCP (Transmission Control Protocol ). It specifies what messages the client might send to the server and what responses it gets. The header of the request and response messages is given in ASCII (American Standard Code for Information Interchange )) code; and the message content has a MIME (Multipurpose Internet Mail Extensions, multipurpose internet mail extensions type) like format. While an http request refers to a request message from a client to a server. Comprising the following steps: in the message head line, a request method for a resource, an identifier of the resource and a protocol used. In the solution of the present application, the server 104 simulates generating an http request requesting a specified web page from the server 106 through the web page information provided by the server 102.
After receiving the web page integration application and analyzing the web page integration application to obtain the network address corresponding to the request, the server 104 may simulate a general client to initiate an http request to the server 106 based on the network address of the web page where the function to be integrated is located, so as to obtain the web page data of the web page where the function to be integrated is located.
S600, original webpage data corresponding to the integrated webpage fed back by the original server are obtained, a preset integrated template and the functional webpage data are called to perform html grammar injection on the original webpage data, and an integrated webpage is generated;
the original webpage data refer to the original data of the webpage where the function to be integrated is located, and the obtained original webpage data generally comprise html/js/css files and the like. The preset integration template is submitted by the server 102, the key data in the original webpage data, namely the webpage data corresponding to the function to be integrated, are determined through the preset integration template, then other data in the original webpage data are replaced by the functional webpage data through an html injection method, in one embodiment, the functional webpage data are webpage data corresponding to the functional webpage provided with the blank function bit, and the function to be integrated in the original webpage can be integrated on the corresponding blank position of the functional webpage through html grammar injection.
In one embodiment, as shown in fig. 3, the function web page is two web pages on the left in fig. 3, the part of the function 3 is the position where the function to be integrated is located in the function web page, the original web page is two web pages on the right in fig. 3, the function to be integrated is the function block in the original web page, as shown in the above figure, the existing integration mode is generally to add the whole of the integrated web page to the part of the function 3 corresponding to the newly developed function page, namely, to integrate the whole, and the technical scheme of the application is to integrate only the required function, namely, to integrate only the part of the function block to the part of the function 3 corresponding to the function web page. Therefore, the problem that the operation consistency of the webpage and the operation smoothness of the integrated new functional page are reduced is avoided. Meanwhile, resources such as src of a website are relative paths, the src of the injected html is an absolute path for own websites, and the whole background agent can be used for requesting the newly generated integrated webpage without cross-domain problems, so that the website codes of the user can be conveniently modified at the front end, and the corresponding debugging effect is displayed.
S800, feeding back the integrated webpage.
According to the webpage integration method, the network address, the functional webpage data and the preset integration template corresponding to the integrated webpage carried in the webpage integration application are extracted by acquiring the webpage integration application; generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address; acquiring original webpage data corresponding to an integrated webpage fed back by an original server, calling a preset integrated template and functional webpage data, and performing html grammar injection on the original webpage data to generate an integrated webpage; and feeding back the integrated webpage. According to the webpage integration method, html grammar injection corresponding to the function webpage is carried out on the integrated original webpage data through the preset integration template, the functions to be integrated in the original webpage data are integrated into the corresponding area of the function webpage, the corresponding integrated webpage is generated, and only the required functions are integrated from the integrated webpage, so that the influence of webpage integration on the operation consistency and the operation smoothness of the generated webpage after integration is effectively reduced.
As shown in fig. 4, in one embodiment, step S600 includes:
s610, acquiring original webpage data corresponding to the integrated webpage fed back by the original server.
S630, identifying the functions to be integrated in the original webpage data to correspond to the webpage data to be integrated according to a preset integrated template.
S650, the original webpage data except the webpage data to be integrated in the original webpage data is modified by carrying out html grammar injection on the original webpage data according to the functional webpage data, so as to generate the integrated webpage.
Firstly, the server 104 acquires all webpage data of the webpage where the integrated webpage corresponding to the function to be integrated is located, which is fed back by the original server 106 based on the simulated http request, and then, through a preset integration template provided by the server 102, identifies the webpage data of the function data part corresponding to the function to be integrated from the webpage data. And then, carrying out html grammar injection corresponding to the function webpage on the original webpage data according to the function webpage data so as to modify the function webpage data except the webpage data of the to-be-integrated function part which needs to be reserved in the original webpage data, thereby generating a new integrated webpage. In one embodiment, S650 specifically includes: and carrying out html grammar injection on the original webpage data according to the functional webpage data, modifying the original webpage data except the webpage data to be integrated in the original webpage data, and replacing the html tag in the original webpage data with the html tag of the functional webpage data to generate the integrated webpage. Specifically, the html tags corresponding to the webpage data to be integrated in the original webpage data can be determined, other html tags in the original webpage data are replaced by html tags of the functional webpage data, so that the integrated webpage can be generated, and the required functions can be integrated into the new webpage at high speed and effectively.
In one embodiment, S600 further comprises, after:
and performing function verification on the generated integrated webpage.
After the integrated web page is generated, the server 104 can also perform corresponding test on the generated integrated web page to ensure that each function integrated by the integrated web page can be normally used, when the function verification fails, the usability of the integrated web page can be ensured by modifying the corresponding part of the integrated web page, and the usability of the generated integrated web page can be effectively improved through the step of function verification.
In one embodiment, performing the function verification on the generated integrated web page includes:
and acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage.
When the integrated web page is available, a step of feeding back the integrated web page is entered.
When the integrated webpage is not available, the function verification is carried out again after the webpage data of the integrated webpage are modified according to the function test result.
Specifically, the test instruction is provided by the server 102, and includes a test input instruction corresponding to each function integrated by the integrated web page and corresponding test output data, where the test input instruction may be input into the integrated web page, corresponding outputs of the integrated web page to the data may be obtained, the actual output is compared with the test output data to determine that the integrated web page is unavailable, and specifically, when the actual output and the expected output exist in the process of testing the integrated web page function, the server 104 may determine that the current web page is available, and then send the corresponding data of the integrated web page to the server 102. However, when the actual output and the expected output do not accord with each other in the process of testing the functions of the integrated web page, the server 104 may determine that the current web page is unavailable, and then, modify the web page data of the integrated web page according to the result of the function test, and perform the function verification again. In another specific embodiment, the server 104 may also locate the functional module with an error in the integrated web page according to the test result, then modify the web page data of the corresponding portion of the integrated web page according to the result data of the functional test, and then perform the functional verification again. By performing function verification on the integrated webpage, the usability of the generated integrated webpage can be effectively improved.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 2 and 4 may include multiple sub-steps or phases that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or phases are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or phases of other steps or other steps.
In one embodiment, as shown in fig. 5, there is provided a web page integration apparatus, the apparatus including:
the application obtaining module 200 is configured to obtain a web page integration application, extract a network address, function web page data, and a preset integration template corresponding to an integrated web page carried in the web page integration application, where the preset integration template is used to search web page data corresponding to a function to be integrated included in the integrated web page.
The request generating module 400 is configured to generate a data request according to the network address simulation, and forward the data request to an original server corresponding to the network address.
The web page integration module 600 is configured to obtain original web page data corresponding to the integrated web page fed back by the original server, call a preset integration template and function web page data, and perform html grammar injection on the original web page data to generate an integrated web page.
The web page feedback module 800 is configured to feed back the integrated web page.
In one embodiment, the web page integration module 600 is configured to: acquiring original webpage data corresponding to the integrated webpage fed back by an original server; identifying webpage data corresponding to functions to be integrated in the original webpage data according to a preset integration template; and modifying the original webpage data except the webpage data to be integrated in the original webpage data by html grammar injection of the original webpage data according to the functional webpage data, so as to generate the integrated webpage.
In one embodiment, the web page integration module 600 is configured to: when the original webpage data except the webpage data to be integrated in the original webpage data are modified, determining an html tag corresponding to the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data.
In one embodiment, the system further comprises a webpage function verification module, which is used for performing function verification on the generated integrated webpage.
In one embodiment, the web page function verification module is configured to: acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage; when the integrated web page is available, an operation of feeding back the integrated web page is performed through the web page feedback module 800.
In one embodiment, the web page integration module 600 is configured to: when the integrated webpage is not available, the function verification is carried out again after the webpage data of the integrated webpage are modified according to the function test result.
For specific limitations of the web page integration apparatus, reference may be made to the above limitation of the web page integration method, and the description thereof will not be repeated here. The various modules in the web page integration apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the webpage integration application and related data of the integrated webpage. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a web page integration method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a webpage integration application, extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to an integrated webpage fed back by an original server, calling a preset integrated template and functional webpage data, and performing html grammar injection on the original webpage data to generate an integrated webpage;
and feeding back the integrated webpage.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring original webpage data corresponding to the integrated webpage fed back by an original server; identifying webpage data corresponding to functions to be integrated in the original webpage data according to a preset integration template; and modifying the original webpage data except the webpage data to be integrated in the original webpage data by html grammar injection of the original webpage data according to the functional webpage data, so as to generate the integrated webpage.
In one embodiment, the processor when executing the computer program further performs the steps of: when the original webpage data except the webpage data to be integrated in the original webpage data are modified, determining an html tag corresponding to the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data.
In one embodiment, the processor when executing the computer program further performs the steps of: and performing function verification on the generated integrated webpage.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage;
when the integrated web page is available, a step of feeding back the integrated web page is entered.
In one embodiment, the processor when executing the computer program further performs the steps of: when the integrated webpage is not available, the function verification is carried out again after the webpage data of the integrated webpage are modified according to the function test result.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a webpage integration application, extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to an integrated webpage fed back by an original server, calling a preset integrated template and functional webpage data, and performing html grammar injection on the original webpage data to generate an integrated webpage;
and feeding back the integrated webpage.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring original webpage data corresponding to the integrated webpage fed back by an original server; identifying webpage data corresponding to functions to be integrated in the original webpage data according to a preset integration template; and modifying the original webpage data except the webpage data to be integrated in the original webpage data by html grammar injection of the original webpage data according to the functional webpage data, so as to generate the integrated webpage.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the original webpage data except the webpage data to be integrated in the original webpage data are modified, determining an html tag corresponding to the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data.
In one embodiment, the computer program when executed by the processor further performs the steps of: and performing function verification on the generated integrated webpage.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage;
when the integrated web page is available, a step of feeding back the integrated web page is entered.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the integrated webpage is not available, the function verification is carried out again after the webpage data of the integrated webpage are modified according to the function test result.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A web page integration method, the method comprising:
acquiring a webpage integration application, and extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated, which are contained in the integrated webpage;
generating a network request according to the network address simulation, and forwarding the network request to an original server corresponding to the network address;
acquiring original webpage data corresponding to the integrated webpage fed back by the original server;
identifying webpage data corresponding to functions to be integrated in the original webpage data according to the preset integrated template;
modifying original webpage data except webpage data to be integrated in the original webpage data by injecting html grammar into the original webpage data according to the functional webpage data, generating an integrated webpage, determining html tags corresponding to the webpage data to be integrated in the original webpage data when modifying the original webpage data except the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data;
and feeding back the integrated webpage.
2. The method of claim 1, wherein the obtaining the original webpage data corresponding to the integrated webpage fed back by the original server, calling the preset integration template and the functional webpage data to perform html grammar injection on the original webpage data, and after generating an integrated webpage, further comprises:
and performing function verification on the generated integrated webpage.
3. The method of claim 2, wherein the performing the functional verification on the generated integrated web page comprises:
acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage;
and when the integrated webpage is available, entering a step of feeding back the integrated webpage.
4. A method according to claim 3, further comprising:
and when the integrated webpage is not available, modifying webpage data of the integrated webpage according to the function test result, and then carrying out function verification again.
5. A web page integration apparatus, the apparatus comprising:
the application acquisition module is used for acquiring a webpage integration application, extracting a network address, functional webpage data and a preset integration template corresponding to an integrated webpage carried in the webpage integration application, wherein the preset integration template is used for searching webpage data corresponding to functions to be integrated contained in the integrated webpage;
the request generation module is used for generating a data request according to the network address simulation and forwarding the data request to an original server corresponding to the network address;
the webpage integration module is used for acquiring original webpage data corresponding to the integrated webpage fed back by the original server; identifying webpage data corresponding to functions to be integrated in the original webpage data according to the preset integrated template; modifying original webpage data except webpage data to be integrated in the original webpage data by injecting html grammar into the original webpage data according to the functional webpage data, generating an integrated webpage, determining html tags corresponding to the webpage data to be integrated in the original webpage data when modifying the original webpage data except the webpage data to be integrated in the original webpage data, and replacing other html tags in the original webpage data with html tags of the functional webpage data;
and the webpage feedback module is used for feeding back the integrated webpage.
6. The apparatus of claim 5, further comprising a web page function verification module configured to: and performing function verification on the generated integrated webpage.
7. The apparatus of claim 6, wherein the web page function verification module is further configured to: acquiring a test instruction of the integrated webpage, and performing corresponding function test on the integrated webpage according to the test instruction to acquire a function test result corresponding to the current integrated webpage; and when the integrated webpage is available, executing the step of feeding back the integrated webpage through the webpage feedback module.
8. The apparatus of claim 7, wherein the web page integration module is further to: and when the integrated webpage is not available, modifying webpage data of the integrated webpage according to the function test result, and then carrying out function verification again.
9. A computer device comprising a memory, a processor and a bus, the memory and the processor being connected and communicating via the bus, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN201910917600.7A 2019-09-26 2019-09-26 Webpage integration method, webpage integration device, computer equipment and storage medium Active CN112559930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910917600.7A CN112559930B (en) 2019-09-26 2019-09-26 Webpage integration method, webpage integration device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910917600.7A CN112559930B (en) 2019-09-26 2019-09-26 Webpage integration method, webpage integration device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112559930A CN112559930A (en) 2021-03-26
CN112559930B true CN112559930B (en) 2024-02-13

Family

ID=75030059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910917600.7A Active CN112559930B (en) 2019-09-26 2019-09-26 Webpage integration method, webpage integration device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112559930B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7921353B1 (en) * 2007-04-09 2011-04-05 Oracle America, Inc. Method and system for providing client-server injection framework using asynchronous JavaScript and XML
CN102662737A (en) * 2012-03-14 2012-09-12 优视科技有限公司 Calling method and device of extension program
CN108595697A (en) * 2018-05-09 2018-09-28 上海陆家嘴国际金融资产交易市场股份有限公司 Webpage integrated approach, apparatus and system
US10331502B1 (en) * 2016-11-14 2019-06-25 Verified First LLC Systems and methods for integrating with applications
CN110022354A (en) * 2019-03-03 2019-07-16 云南电网有限责任公司信息中心 Mobile application integrated approach, device, computer equipment and storage medium based on http protocol

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11295074B2 (en) * 2016-12-21 2022-04-05 Open Text Corporation Systems and methods for conversion of web content into reusable templates and components

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7921353B1 (en) * 2007-04-09 2011-04-05 Oracle America, Inc. Method and system for providing client-server injection framework using asynchronous JavaScript and XML
CN102662737A (en) * 2012-03-14 2012-09-12 优视科技有限公司 Calling method and device of extension program
US10331502B1 (en) * 2016-11-14 2019-06-25 Verified First LLC Systems and methods for integrating with applications
CN108595697A (en) * 2018-05-09 2018-09-28 上海陆家嘴国际金融资产交易市场股份有限公司 Webpage integrated approach, apparatus and system
CN110022354A (en) * 2019-03-03 2019-07-16 云南电网有限责任公司信息中心 Mobile application integrated approach, device, computer equipment and storage medium based on http protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于交互逻辑复用的页面集成框架设计;付冉;杨燕;王帅;徐罡;卢彬;;计算机工程与设计(第02期);全文 *

Also Published As

Publication number Publication date
CN112559930A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
CN109460527B (en) Product data configuration method, device, computer equipment and storage medium
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN108491367B (en) Report document generation method and device, computer equipment and storage medium
CN110750443B (en) Webpage testing method, device, computer equipment and storage medium
CN105099811A (en) Interface testing method and device
CN111858376A (en) Request message generation method and interface test method
JP6514244B2 (en) Difference detection device and program
CN113467780B (en) Data acquisition method, device, electronic device and storage medium
CN108459850B (en) Method, device and system for generating test script
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN109144865A (en) Method, apparatus, computer equipment and the storage medium of head end test
JP2025510078A (en) Document block sharing method, system, storage medium, and program
CN112559938A (en) Electronic seal file generation method and device, computer equipment and storage medium
CN111431767B (en) Multi-browser resource synchronization method, device, computer equipment and storage medium
CN112433929B (en) Web page debugging method, device, computer equipment and storage medium
CN116166533A (en) Interface testing method, device, terminal equipment and storage medium
CN111552643A (en) Multi-browser web page access synchronization method and system
CN112559930B (en) Webpage integration method, webpage integration device, computer equipment and storage medium
CN114528013B (en) Text generation method, device, electronic device, storage medium and product
JP2019101889A (en) Test execution device and program
CN112667204A (en) Data processing method and device for microservice application and computer equipment
CN111555935A (en) Data communication method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant