CN112988263A - Method and system for synchronizing web pages - Google Patents

Method and system for synchronizing web pages Download PDF

Info

Publication number
CN112988263A
CN112988263A CN202110182456.4A CN202110182456A CN112988263A CN 112988263 A CN112988263 A CN 112988263A CN 202110182456 A CN202110182456 A CN 202110182456A CN 112988263 A CN112988263 A CN 112988263A
Authority
CN
China
Prior art keywords
webpage
data
request
web page
synchronization
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.)
Granted
Application number
CN202110182456.4A
Other languages
Chinese (zh)
Other versions
CN112988263B (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.)
Qingdao Hope Bird Technology Co ltd
Original Assignee
Qingdao Hope Bird 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 Qingdao Hope Bird Technology Co ltd filed Critical Qingdao Hope Bird Technology Co ltd
Priority to CN202110182456.4A priority Critical patent/CN112988263B/en
Publication of CN112988263A publication Critical patent/CN112988263A/en
Application granted granted Critical
Publication of CN112988263B publication Critical patent/CN112988263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method and a system for webpage synchronization, wherein the method comprises the following steps: generating webpage operation instruction data based on the generated user operation acquisition data in a source webpage, generating webpage request recording data based on webpage request acquisition request information and response information in the source webpage, and sending the webpage operation instruction data and the webpage request recording data to a target webpage; and executing a webpage operation instruction contained in the webpage operation instruction data on the target webpage, intercepting the webpage request when monitoring the webpage request in the target webpage, searching a corresponding data record in the webpage request record data according to the webpage request, and returning response data contained in the data record as response data of the webpage request. By the method, the webpage operation instruction is executed on the target webpage to achieve synchronization of user operation and the source webpage, the simulated service is established in the target webpage to process the webpage request, and processing of the webpage request and synchronization of the source webpage are achieved.

Description

Method and system for synchronizing web pages
Technical Field
The invention relates to the field of internet technology and communication, in particular to a method and a system for synchronizing webpages.
Background
With the development of the internet, a webpage synchronization technology is more and more important, compared with remote screen synchronization, the webpage synchronization has the characteristics of small transmission data and high transmission speed, a user can synchronize by accessing the webpage through a browser without additionally installing software or plug-ins, convenience and rapidness are realized, the local data of the user cannot be accessed in the synchronization process, and the safety degree is high. From the web page classification, static web pages with predetermined contents are included, and dynamic web pages generated based on dynamic parameter calculation are included. However, the synchronous support of the prior art for the dynamic Web page has many problems, and according to the characteristics of the dynamic Web page, in the process of operating the Web page by a user, there is interaction with a server, that is, according to the user operation, a Web page request is generated in a browser, a Web page is generated by a Web server according to the request calculation or response data is returned, the browser displays the Web page according to the Web page data obtained by the request, or performs calculation in the browser according to the obtained response data to present the Web page, so that in the process of synchronizing the Web pages, a plurality of synchronous users send Web page requests to the server, the Web page requests may have inconsistent situations, thereby causing response result differences for different users, further causing differences of synchronous pages, and even in the case that the Web page requests are the same, a plurality of synchronous users send Web page requests to the server for a plurality of times, the server side may repeat calculation or be disordered, if a plurality of synchronous users respectively send webpage requests to the server, the server stores data to the database according to the received data, and when a plurality of synchronous webpages are simultaneously sent, the server stores repeated data in the database. Therefore, the problem of uniformly implementing the web page synchronization of the static web page and the dynamic web page needs to be solved by applying a new web page synchronization technology.
Disclosure of Invention
In view of the above existing situation, the present application applies a web page technology to uniformly solve the problem of web page synchronization of a static web page and a dynamic web page.
In a first aspect, the present application provides a method for synchronizing web pages, where the method is used to implement synchronous display and synchronous operation of web pages of a source web page and a target web page, and the method is applied to one side of the source web page, and the method includes:
monitoring user operation occurring in the source webpage, acquiring data of the user operation and the user operation based on the user operation, and generating webpage operation instruction data;
monitoring a webpage request in the source webpage, acquiring request information of the webpage request to generate request data based on the webpage request, acquiring response information of the webpage request to generate response data, and generating the request data and the response data into webpage request recording data according to a corresponding relation;
sending the webpage operation instruction data and the webpage request record data to the target webpage;
the webpage operation instruction data is used for receiving the target webpage and executing the webpage operation instructions contained in the target webpage so as to simulate user operation in the source webpage in the target webpage; the webpage request record data is used for receiving the target webpage, and provides corresponding response data for the webpage request corresponding to the request data in the target webpage based on the request data and the response data contained in the webpage request record data so as to simulate the processing of the webpage request in the source webpage in the target webpage.
By the method, a user executes user operation in a source webpage, such as user behaviors of webpage sliding, inputting, clicking and the like, the operation behavior is converted into a webpage operation instruction after the source webpage monitors the user operation, meanwhile, the webpage operation instruction also comprises data information of the user operation, such as input character data, the webpage operation instruction is sent to the source webpage, the source webpage analyzes and executes the webpage operation instruction, and synchronization of user operation effects of a target webpage and the source webpage is achieved. When a webpage request is monitored in a source webpage, acquiring request information and response information of the webpage request based on the webpage request generated in the source webpage, generating webpage request record data according to the corresponding relation and sending the webpage request record data to a target webpage. Therefore, the effect of synchronizing the operation and the display of the target webpage and the source webpage is achieved, and the problem of confusion of interaction with the outside in the synchronization process is avoided.
In one possible implementation manner, on the source webpage side, acquiring the request data and the response data based on the webpage request further includes:
judging whether the webpage request type needs to acquire request data or not according to the type of the webpage request and a preset webpage request processing rule, and responding the data to generate webpage request record data;
and acquiring a specified data item as the request data and a specified data item as the response data according to the type of the webpage request, and generating the request data and the response data into webpage request record data according to a corresponding relation.
According to the implementation mode, based on different types of webpage requests (such as XMLHttpRequest requests, JS requests, picture requests and the like), a certain webpage request type can be set to not acquire webpage request record data, such as a webpage request aiming at a picture type, and the webpage request record data is not acquired, so that a target webpage directly requests for acquiring pictures outwards in the synchronization process; in addition, based on different types of webpage requests, specified data items are respectively collected in the webpage request information and the response information so as to search a webpage request record and provide response data in the target webpage according to the type of the webpage request.
In a possible implementation manner, on the side of the source web page, when web page synchronization is established for the first time between the source web page and the target web page or during the web page synchronization, the method further includes generating web page data for synchronization based on all or part of the web page data in the source web page, and sending the web page data for synchronization to the target web page. The webpage data used for synchronization are received by the target webpage, and webpage data content in the target webpage is correspondingly updated based on the webpage data contained in the webpage data, so that the webpage data of the target webpage and the webpage data of the source webpage are kept synchronized.
According to the implementation mode, the method for updating the webpage data in the target webpage based on the webpage data in the source webpage is provided, and the implementation mode is used as an important supplement of the webpage synchronization method provided by the application. For example, after the self-loading of the source web page is completed, the user has performed multi-step operations, or has made multiple web page requests, and then the target web page request is synchronized, and the web page data is synchronized by using the implementation method. For another example, in the webpage synchronization process, the condition that the webpage data in the target webpage is inconsistent with the source webpage is detected, and the implementation mode is adopted to keep the webpage data in the target webpage consistent with the webpage data in the source webpage.
In a possible implementation manner, according to a synchronous web page data verification request sent by a target web page, calculating and generating web page data for synchronization and sending the web page data to the target web page, specifically:
receiving a synchronous webpage data verification request sent by the target webpage, wherein the synchronous webpage data verification request comprises one or more webpage data records to be verified, the webpage data records to be verified comprise identification information of the webpage data, and the identification information corresponds to the webpage data of the specified part in the source webpage and the target webpage;
according to the webpage data record to be verified contained in the synchronous webpage data verification request, executing the following operations:
generating the webpage data in the source webpage identified by the identification information of the webpage data into the webpage data for synchronization, and sending the webpage data for synchronization to the target webpage;
or when it is determined that the to-be-verified webpage data record further includes a second message digest generated based on the webpage data identified by the identification information in the target webpage, acquiring corresponding webpage data in the source webpage according to the identification information of the webpage data in the to-be-verified webpage data record, generating a first message digest based on the acquired webpage data, comparing the first message digest corresponding to the identification information of the webpage data with the second message digest, when it is determined that the two are different, generating the webpage data in the source webpage identified by the identification information of the webpage data into the webpage data for synchronization, and sending the webpage data for synchronization to the target webpage.
In the above implementation manner, the webpage data for synchronization is received by the target webpage, and the webpage data content in the target webpage is replaced correspondingly based on the webpage data contained in the webpage data, so that the webpage data content is kept synchronized. In addition, the method for generating the message abstract from the corresponding webpage data in the source webpage and the target webpage and obtaining the difference of the webpage data on the two sides by comparing the message abstract has the characteristic of small data transmission quantity.
The implementation mode provides a method for generating webpage data for synchronization through calculation according to a synchronous webpage data verification request, and according to the type of the synchronous webpage data verification request, returning the webpage data of a specified part or the webpage data which is different from a target webpage so as to keep the webpage data of the target webpage consistent with a source webpage and achieve the synchronization effect.
In a possible implementation manner, generating synchronization data in the source web page further includes generating a synchronization status identifier corresponding to the synchronization data, where the synchronization status identifier is used to identify a synchronization status in a synchronization process. In addition, the step of sending the synchronization data to the target webpage further comprises the step of sending the synchronization state identification to the target webpage.
In the present application, the synchronization data is data for performing synchronization, which is sent by the source web page to the target web page, and includes, but is not limited to, web page operation instruction data generated based on user operation acquisition, web page request record data generated based on a web page request, web page data for synchronization generated based on all or part of web page data in the source web page, and a timer execution instruction, execution result data of a specified system function, synchronization data generated by website information, and the like mentioned in subsequent implementations of the present application.
According to the possible implementation manners, after the synchronous data are generated in the source webpage every time, the synchronous data are sent to the target webpage to execute corresponding synchronous operation on the target webpage, namely, the synchronous data are synchronized with the target webpage once, and the synchronous state identifier is used for identifying the synchronization and controlling the synchronous process of the source webpage and the target webpage.
In a possible implementation manner, the source web page monitors whether the content of the web page data contained in the source web page changes, after the change of the content of the web page data is monitored, whether a synchronization status identifier stored in the source web page is updated correspondingly is judged, when the synchronization status identifier is determined not to be updated, the web page data for synchronization is generated based on the changed content of the web page data, and the web page data for synchronization is sent to a target web page.
In the above possible implementation manner, the data content of the web page is content included in the web page downloaded or running in a browser, such as: and (5) web page HTML. According to the implementation mode, the synchronization state identifier is not updated, which is equivalent to that the source webpage does not send the synchronization data, in this case, the webpage data content changes, that is, other operation behaviors except for user operation and webpage request appear in the source webpage, and due to the change of the webpage data content in the source webpage, the synchronization with the target webpage is caused, and the synchronization between the source webpage and the target webpage can be maintained through the implementation mode.
In another possible implementation manner of the present application, an execution monitor of a web page timer (e.g., setTimeout) is established in the source web page, and after the execution of the timer is monitored, a timer execution instruction for execution in the target web page is generated based on an execution content of the timer, and the timer execution instruction is sent to the target web page.
Through the implementation mode, the timer execution instruction is sent to the target webpage, and the target webpage executes the timer execution instruction, so that the timer execution effect of the target webpage and the timer execution effect of the source webpage are the same.
In another possible implementation manner of the present application, in the source web page, execution of a specified system function is monitored, and when it is monitored that the specified system function is executed, execution result data is generated by obtaining a result of the execution of the specified system function, and the execution result data is sent to the target web page.
In the above implementation, the specified system function refers to a system function that is executed in the source web page and the target web page respectively, and may have a difference in execution result, for example, an acquisition system time function. Through the implementation mode, the execution result data of the system function designated in the source webpage is sent to the target webpage, and the target webpage processes the corresponding system function based on the execution result data, so that the execution results of the system functions of the target webpage and the target webpage are kept synchronous.
In another possible implementation manner of the present application, after the synchronization identification information is updated every time in the source web page, the program execution in the source web page is suspended until the synchronization execution completion notification sent by the target web page is received, and the program execution in the source web page is continued.
In combination with the above several possible implementation manners, the occurrence of user operation, web page request, timer execution, system function execution in the source web page, and the sending of web page data to the target web page all require the target web page to execute corresponding synchronization operations.
In another possible implementation manner of the present application, after receiving a synchronization request sent by the target webpage for the first time, the source webpage refreshes the source webpage and sends a current website of the source webpage to the target webpage, where the current website is used to reload the webpage in the target webpage based on the current website; or after the source webpage is loaded, sending webpage data contained in the source webpage to the target webpage, wherein the webpage data is used for executing replacement updating on the target webpage.
Through the implementation mode, the source webpage receives the synchronous request of the target webpage for the first time, the source webpage and the target webpage are generated through recalculation based on the same website, or the webpage data on one side of the target webpage are updated based on the webpage data on one side of the source webpage, so that the running state identical to that of the source webpage is obtained, and meanwhile, a foundation is provided for subsequent synchronous execution.
In a second aspect, the present application provides a web page synchronization method, which is applied to synchronizing web page operations and displays from a source web page to a target web page, and the method is applied to one side of the target web page, and the method includes:
receiving webpage operation instruction data and/or webpage request record data sent by the source webpage, wherein the webpage request record data comprise request data generated based on request information of a webpage request in the source webpage and response data generated based on response information of the webpage request in the source webpage;
executing the webpage operation instruction based on the webpage operation instruction contained in the webpage operation instruction data;
monitoring the webpage requests in the target webpage, intercepting the monitored webpage requests, finding corresponding webpage request record data records in the webpage request record data according to the request information of the intercepted webpage requests, and returning response data contained in the webpage request record data records as the response data of the intercepted webpage requests.
According to the method, in the webpage synchronization process, the target webpage receives webpage operation instruction data and webpage request recording data sent by the source webpage, executes the webpage operation instruction based on the webpage operation instruction data, restores user operation generated in the source webpage, simulates and establishes service for processing the webpage request in the target webpage based on the webpage request recording data, intercepts the webpage request after the webpage request occurs in the target webpage, does not request data from outside, and obtains response data through the service for simulating and processing the webpage request. Therefore, the effects of synchronous display of the target webpage and the source webpage and synchronous operation of the user are achieved, and the target webpage does not generate actual external interaction, so that the chaotic interaction with the server in the synchronization process is avoided.
In a possible implementation manner, after a web page request is monitored by a target web page on one side of the target web page, the method further includes, based on the type of the web page request, judging according to a predetermined web page request processing rule, obtaining a processing manner of the web page request, and processing the web page request according to the processing manner, where the processing manner of the web page request includes interception processing and non-interception processing, and when it is determined that the web page request is intercepted, finding a corresponding web page request record data record in the web page request record data based on the web page request, and returning response data included in the web page request record data record as response data of the intercepted web page request.
Through the implementation mode, the response data or the external normal request data is acquired from the webpage request record data according to the preset webpage request type processing rule, so that the static resources and the dynamic server interaction data of the webpage to be treated can be distinguished, and the transmission quantity of the data in the webpage synchronization process is reduced.
In a possible implementation manner, at a side of a target webpage, receiving webpage data for synchronization sent by the source webpage, and updating the webpage data in the target webpage correspondingly according to webpage data content included in the webpage data for synchronization.
Through the implementation mode, when the target webpage requests the source webpage for the first time, or the webpage requests occurring in the target webpage cannot be kept consistent with the webpage requests in the source webpage in the webpage synchronization process, the target webpage and the source webpage are kept synchronous through the form of webpage data synchronization.
In a possible implementation manner, on one side of a target webpage, a webpage data record to be verified is generated according to identification information of the webpage data, or a second message abstract is generated according to the identification information of the webpage data and the webpage data identified in the target webpage based on the identification information, and the webpage data record to be verified is generated according to the identification information and the second message abstract. And generating a synchronous webpage data verification request based on one or more webpage data records to be verified. And sending the synchronous webpage data verification request to the source webpage.
In the above possible implementation manner, the synchronous webpage data check request is used to acquire the webpage data in the source webpage according to the identifier of the webpage data, or is used to check the consistency of the target webpage and the corresponding webpage data in the source webpage, and when the synchronous webpage data check request is sent to the source webpage, a second message summary generated according to the webpage data in the target webpage is sent, so that the source webpage compares the similarity and difference of the corresponding webpage data based on the second message summary, and meanwhile, the synchronous webpage data check request has the advantage of small data transmission amount.
In a possible implementation manner, after performing corresponding synchronization operation in a target webpage according to received synchronization data sent by a source webpage on one side of the target webpage, the method further includes reading a synchronization state identifier corresponding to the synchronization data, and updating a synchronization state identifier stored in the target webpage based on the synchronization state identifier, where the synchronization state identifier stored in the target webpage is used to identify a synchronization state of the target webpage. The synchronization data sent by the source web page includes but is not limited to: the web page operation instruction data, the web page request record data, the web page data for synchronization, and the timer execution instruction and the execution result data of the specified system function mentioned in the subsequent implementation manner of the present application. The executing the corresponding synchronization operation in the target webpage includes but is not limited to: executing a webpage operation instruction, recording a webpage request occurring in a data processing target webpage based on the webpage request, correspondingly updating webpage data content in the target webpage based on the webpage data for synchronization, executing specified execution content based on the timer execution instruction, setting an execution result of a corresponding system function in the target webpage based on the execution result data of the specified system function, and the like.
Through the possible implementation modes, after the target webpage executes the synchronization operation each time, the synchronization state identification stored in the target webpage is updated, so that the synchronization state of the target webpage can be identified, and the control of the whole synchronization process can be realized.
In a possible implementation manner, changes of web page data content of the target web page are monitored, whether a synchronization status identifier stored in the target web page is updated is judged before and after the changes of the web page data content are monitored, and when it is confirmed that the synchronization status identifier stored in the target web page is not updated, a synchronization web page data verification request is generated based on identification information of web page data corresponding to the changed web page data content, and the synchronization web page data verification request is sent to the source web page.
In the above possible implementation manner, the data content of the web page is content included in the web page downloaded or running in a browser, such as: and (5) web page HTML. According to the implementation mode, the synchronization state identifier is not updated, which is equivalent to that the target webpage does not receive the synchronization data and execute the synchronization operation, in this case, the webpage data content changes, that is, other operation behaviors except for the user operation and the webpage request appear in the target webpage, and due to the change of the webpage data content in the target webpage, the synchronization with the source webpage can be caused, and the synchronization between the target webpage and the source webpage is kept through the implementation mode.
In a possible implementation manner, on the side of the target webpage, when it is monitored that a timer in the target webpage executes, the timer is stopped to execute; and receiving a timer execution instruction sent by the source webpage, and executing the specified execution content based on the timer execution instruction.
Through the possible implementation modes, the execution of the timer in the target webpage is shielded, and the execution content of the timer in the source webpage is synchronously executed by receiving the execution instruction of the timer sent by the source webpage, so that the same execution effect as that of the source webpage is achieved.
In a possible implementation manner, at a side of the target webpage, execution result information of a specified system function sent by the source webpage is received, and when it is monitored that the specified system function in the target webpage is executed, a corresponding execution result is searched in the received execution result information of the specified system function and returned as an execution result of the specified system function in the target webpage.
Through the possible implementation modes, the consistency of the execution results of the system functions specified in the target webpage and the source webpage is ensured.
In a possible implementation manner, in the target webpage, based on the synchronization data sent by the source webpage, a synchronization execution completion notification is generated after a synchronization execution operation is completed, and the synchronization execution completion notification is sent to the source webpage.
Through the possible implementation modes, after the target webpage completes the synchronous operation corresponding to the source webpage, the execution completion notification is sent to the source webpage, and the source webpage is favorable for carrying out integral synchronous execution process control.
In a possible implementation manner, after a webpage synchronization request is sent to the source webpage for the first time, synchronization data returned by the source webpage are received, and when the current website information of the source webpage is confirmed, the target webpage is reloaded based on the synchronization data; when the data is confirmed as the web page data, the web page data in the target web page is replaced based on the received web page data.
Through the possible implementation modes, the target webpage sends the synchronization request to the source webpage for the first time, the target webpage and the source webpage are generated through recalculation based on the same website, or the webpage data on one side of the target webpage are updated based on the webpage data on one side of the source webpage, so that the running state identical to that of the source webpage is obtained, and a foundation is provided for subsequent synchronization execution.
In a third aspect, the present application further provides a web page synchronization system, configured to implement synchronization of web page display and operation from a source web page to a target web page, where the system includes the source web page and the target web page, and the source web page includes:
the user operation acquisition module is used for acquiring data of user operation and user operation based on the user operation generated in the source webpage;
the webpage operation instruction data generation module is used for generating webpage operation instruction data based on the user operation and the data of the user operation acquired by the user operation acquisition module;
the webpage request acquisition module is used for acquiring request information of the webpage request and acquiring response information of the webpage request based on the webpage request in the source webpage;
the webpage request record data generating module is used for generating request data according to the request information acquired by the webpage request acquisition module, generating response data according to the response information acquired by the webpage request acquisition module, and generating the request data and the response data into webpage request record data;
the data communication module is used for sending the webpage operation instruction data and the webpage request record data to the target webpage;
the target webpage comprises:
the webpage operation instruction execution module is used for executing the webpage operation instruction based on the webpage operation instruction contained in the webpage operation instruction data;
the webpage request monitoring module is used for monitoring a webpage request generated in a target webpage;
the webpage request simulation service module is used for intercepting the webpage request according to the webpage request monitored in the target webpage, finding a corresponding webpage request record data record in the webpage request record data according to the request information of the intercepted webpage request, and returning response data contained in the webpage request record data record as the response data of the intercepted webpage request;
and the data communication module is used for receiving the webpage operation instruction data and the webpage request record data sent by the source webpage.
In a possible web page synchronization system, further comprising:
the source web page further includes:
the synchronous process control module is used for executing synchronous process control and comprises the steps of generating a synchronous state identifier according to synchronous data sent by a source webpage, wherein the synchronous state identifier is used for identifying a synchronous state, and the synchronous data are data which are sent to a target webpage by the source webpage and are used for executing webpage synchronization;
the webpage data monitoring module is used for monitoring whether the webpage data in the source webpage are changed;
the webpage data synchronization checking module is used for checking the consistency of the webpage data corresponding to the same webpage identifier in the source webpage and the target webpage according to the webpage data record to be checked contained in the synchronous webpage data checking request received from the target webpage;
the synchronous webpage data generating module is used for generating webpage data for synchronization according to the webpage data in the source webpage; the system is also used for generating webpage data for synchronization according to the identification information of the webpage data sent by the target webpage and based on the corresponding webpage data content of the identification information of the webpage data in the source webpage; the webpage data synchronization checking module is used for checking whether the webpage data of the target webpage are consistent with the webpage data of the source webpage or not; the webpage data monitoring module is also used for judging whether the synchronization state identification stored in the source webpage is updated or not after monitoring that the webpage data content is changed, and generating webpage data for synchronization based on the changed webpage data content when the webpage state identification information is not updated;
the data communication module is further configured to send the synchronization status identifier and the webpage data for synchronization to the target webpage, and is further configured to receive a synchronization webpage data check request sent by the target webpage;
the target web page further comprises:
the synchronous process control module is used for executing synchronous process control in the target webpage and comprises the steps of executing corresponding synchronous operation in the target webpage according to the received synchronous data sent by the source webpage, reading a synchronous state identifier corresponding to the synchronous data and updating the synchronous state identifier stored in the target webpage based on the synchronous state identifier;
the webpage request processing module is used for acquiring a processing mode of the webpage request according to the webpage request monitored by the webpage request monitoring module, judging according to a preset webpage request processing rule based on the type of the webpage request, and processing the webpage request according to the processing mode, wherein the webpage request processing mode comprises the steps of intercepting the webpage request and sending webpage request information to the webpage request simulation service module for processing and not intercepting the webpage request;
the webpage data monitoring module is used for monitoring whether webpage data in a target webpage are changed;
the synchronous webpage data verification request generating module is used for generating a synchronous webpage data verification request which is used for sending to the source webpage so as to verify the consistency of webpage data contained in the target webpage and the source webpage in the webpage synchronization process;
the webpage data replacement module is used for correspondingly updating the webpage data in the target webpage according to the webpage data for synchronization received from the source webpage and the webpage data content contained in the webpage data for synchronization;
the data communication module is further configured to receive the synchronization status identifier sent by the source webpage, the webpage data for synchronization, and send the synchronization webpage data verification request.
In another possible web page synchronization system, the method further comprises:
the source web page further includes:
the webpage timer monitoring processing module is used for monitoring a timer in the source webpage, and generating a timer execution instruction for execution in the target webpage based on the execution content of the timer after monitoring that the timer is executed;
the special system function monitoring processing module is used for monitoring the execution of the specified system function on the source webpage, and acquiring the execution result of the specified system function to generate execution result data after monitoring the execution of the specified system function;
the synchronous process control module is further configured to suspend program execution in the source webpage after the synchronous state identifier is updated each time in the source webpage, and continue program execution in the source webpage until a synchronous execution completion notification sent by the target webpage is received; the synchronous webpage data generating module is also used for refreshing the source webpage and sending the current website of the source webpage to the target webpage when a synchronous request sent by the target webpage is received, wherein the current website is used for reloading the webpage in the target webpage based on the current website, or after the source webpage is loaded, the synchronous webpage data generating module is called to generate webpage data used for synchronization from the webpage data contained in the source webpage, and the webpage data used for synchronization is sent to the target webpage;
the data communication module is further used for sending a timer execution instruction and execution result data of the specified system function to the target webpage; the synchronization process control module is also used for sending webpage data which is generated by the synchronization process control module processing the target webpage synchronization request and is used for synchronization to the target webpage; the system is also used for receiving a synchronous execution completion notification sent by the target webpage;
the target web page further comprises:
the webpage timer execution control module is used for stopping the execution of the timer when the execution of the timer in the target webpage is monitored; the source webpage is also used for executing the specified execution content based on the timer execution instruction according to the timer execution instruction received from the source webpage;
the system function execution control module is used for searching a corresponding execution result in the specified system function execution result information according to the specified system function execution result information received from the source webpage when the execution of the specified system function in the target webpage is monitored, and setting the execution result of the specified system function in the target webpage based on the execution result;
the synchronous process control module is further configured to generate a synchronous execution completion notification after completing a synchronous execution operation corresponding to the synchronous data sent by the source webpage in the target webpage; the webpage data replacing module is also used for reloading the target webpage according to the received website information after a webpage synchronous request is sent to the source webpage for the first time, or calling the webpage data replacing module to replace the webpage data according to the received webpage data;
the data communication module is further configured to receive the timer execution instruction sent by the source web page and execution result data generated by an execution result of the specified system function; and is further configured to send a synchronization execution completion notification to the source web page.
In a fourth aspect, the present application further provides a computer program product, which when being read and executed by one or more processors can implement the method provided by any one of the implementation manners of any one aspect.
Drawings
Fig. 1 is a schematic view illustrating a webpage synchronization process according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating processing of different types of web page requests in a synchronization process according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a process for synchronizing web page data according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a process of generating and updating a synchronization status identifier on two sides of a synchronization according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a process of performing synchronization by monitoring data content of a source web page according to an embodiment of the present application;
fig. 6 is a schematic flowchart of generating and processing a web page data verification request according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart illustrating a process of performing synchronization by monitoring data content of a target web page according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a synchronization process for monitoring and processing a web page timer according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a synchronization process for monitoring and processing a specified system function according to an embodiment of the present application;
FIG. 10 is a flow diagram illustrating a control process flow for synchronization provided by an embodiment of the present application;
fig. 11 is a schematic flowchart of a process executed after synchronization is first established between a source web page and a target web page according to an embodiment of the present application;
fig. 12 is a schematic flowchart of another execution process after synchronization is established between a source web page and a target web page for the first time according to the embodiment of the present application;
fig. 13 is a schematic structural diagram of a web page synchronization system according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of another web page synchronization system according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of another web page synchronization system according to an embodiment of the present application.
Detailed Description
The embodiments of the present application are in part illustrative of the present application and are not intended to be limiting of the present application.
Embodiments of the present application will now be described with reference to the accompanying drawings, and it is to be understood that the described embodiments are merely illustrative of some, but not all, embodiments of the present application. As can be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The method mainly aims to realize synchronization between two webpages, and in the method, the two webpages for synchronization are defined as a source webpage and a target webpage, and webpage synchronization is to transmit webpage operation and webpage change executed in the source webpage to the target webpage, so that the target webpage keeps the same state as the source webpage, including synchronization of webpage browsing, operation and the like. In addition, the web page synchronization is not limited to two web pages, and in a synchronization process, a source web page and a plurality of target web pages are synchronized, and the principle of the synchronization is the same as that of the synchronization between the two web pages. It should be noted that the above-mentioned "one-time synchronization" refers to a process in which one web page changes and another web page changes, so that both the source web page and the target web page are concepts defined with respect to one-time synchronization, and the roles of the source web page and the target web page can be switched during the synchronization process.
And regarding the establishment of webpage synchronization, a user A accesses a website to enter a first webpage, a user B accesses the same or related website to enter a second webpage, a source webpage and a target webpage which are synchronized at this time are established according to business requirements, and the synchronization from the source webpage to the target webpage is executed.
According to the purpose of synchronization, the display and operation synchronization between the source webpage and the target webpage is realized through the application, as shown in fig. 1, the method comprises the following steps:
in the source web page:
s101, monitoring a webpage event;
s102, judging the types of the monitored webpage events, wherein the types comprise S1021 user operation and S1022 webpage requests;
s103, collecting user operation and data of the user operation, and generating webpage operation instruction data;
s104, acquiring request information and response information of the webpage request based on the webpage request, and generating webpage request record data;
s105, sending webpage operation instruction data and webpage request record data to a target webpage;
in the target web page:
s106, receiving webpage operation instruction data and webpage request record data;
s107, judging the type of the received synchronous data, including S1071 webpage operation instruction data and S1072 webpage request record data;
s108, executing the webpage operation instruction based on the webpage operation instruction contained in the webpage operation instruction data;
s109, storing webpage request record data;
s110, monitoring a webpage request;
s111, intercepting the webpage request;
s112, searching corresponding data records in the webpage request record data according to the monitored webpage request;
s113, searching the corresponding data records obtained from the webpage request record data, and returning the response data contained in the data records as the response data of the current webpage request.
In the above steps, S101 monitors various web page events occurring in a source web page, S102 determines a type of the monitored web page event, and when it is determined that the web page event is a user operation, step S103 is executed, data of the user operation behavior and the user operation is collected based on the user operation, and web page operation instruction data is generated from the collected data, where the web page operation instruction data includes a web page operation instruction for restoring the user operation in a target web page, and related operation data for executing the current web page operation, such as: and when the user executes the input operation, recording the input operation as a webpage operation instruction, recording the input data content as operation data of the current webpage operation, and generating webpage operation instruction data based on the operation data and the operation data.
In the above steps, when it is determined in S102 that the monitored web page event type is a web page request, S104 is executed to collect request information and response information based on the web page request, and generate request log data. Here, the web page request refers to interaction generated outside the web page, such as sending a request to a server and obtaining Response data, and the like, and the types of the web page request include, but are not limited to, an XMLHttpRequest (XHR) request, a JS request, a CSS request, a picture (Img) request, a Media (Media) request, a Font (Font) request, a document (doc) request, a websocket (ws) request, a manifiest request, and the like Inquiring the parameter (Query String Parameters) information and the like of the character strings, wherein the response information comprises JSON, XML, other character String information and the like, and generating the record data of the current XHR request based on one or more of the information contained in the request information and the response information according to the monitored XHR request. In addition, it should be noted that the web page request in the present application is not limited to requesting data from the outside through a network, and should be understood that the web page interacts with the outside in any way or obtains data. It should be noted that the web page request in the embodiment of the present application does not include a web page request generated to implement the method provided by the present application.
And executing S105 to send the acquired data to the target webpage according to the webpage operation instruction data acquired in the step S103 and the webpage request record data acquired in the step S104. Optionally, S105 sends the collected data to a synchronization server, and the synchronization server receives and sends the collected data to the target webpage. Preferably, S105 transmits data and S106 receives data, and the data is transmitted by establishing WebSocket communication between the source web page, the target web page, and the synchronization server.
According to the steps, on the side of the target webpage, after S106 receives the synchronous data directly or indirectly sent from the source webpage, the type of the synchronous data is judged in S107, when the synchronous data is webpage operation instruction data, S108 is executed, and the webpage operation instruction is executed based on the webpage operation instruction and the webpage operation data contained in the webpage operation instruction data so as to restore the operation of the user in the source webpage, thereby achieving the effect of synchronizing the user operation; when the type of the synchronization data is the web page request record data, S109 is executed to store the web page request record data for use by the web page request in the simulation processing target web page.
According to the above steps, after a web page request occurs in a target web page, S110 monitors the web page request, S111 intercepts the web page request, and obtains response data from web page request record data according to the monitored web page request, that is, S112 searches for corresponding data records in the stored web page request record data, and returns a response data portion contained in the search result as response data of the web page request at this time by executing S113. Therefore, the webpage request in the target webpage and the response data of the webpage request in the source webpage are kept consistent, the synchronization effect of the webpage request and the source webpage is realized, meanwhile, the target webpage is prevented from repeatedly requesting data to the outside of the webpage, and the interaction disorder with the server is avoided. Wherein the interaction with the server is confused, such as: if the target web page sends the same web page request, repeated processing is caused at the server, and finally, the result is that the plus 1 calculation is executed and stored at the server for a plurality of times, thereby causing confusion.
According to the method provided by the above embodiment, when the method is implemented specifically, preferably, the above steps S101 to S105 in the source webpage are implemented by one JS library, the above steps S106 to S113 in the target webpage are implemented by another JS library, or all or part of the above steps are implemented by one JS library, so that the corresponding JS libraries are introduced into the source webpage and the target webpage, and relevant webpage synchronization setting and parameter configuration are performed, so that the webpage capable of performing synchronization can be generated quickly.
According to the method provided by the embodiment, the same user operation effect and the same webpage request processing result are realized in the target webpage based on the user operation behavior and the webpage request occurring in the source webpage, the data transmission amount in the synchronization process is small, and the problems of interaction confusion between the webpage and the server in the synchronization process and the like are avoided.
In one possible implementation, please refer to fig. 2, the following is detailed:
on one side of a source webpage, acquiring request data and response data based on a webpage request to generate webpage request record data, and the steps are as follows:
s201, monitoring a webpage event, and when judging that the type of the monitored webpage event is a webpage request;
s202, judging whether the webpage request type needs to acquire data to generate webpage request record data according to the type of the webpage request and a preset webpage request processing rule. The judgment result comprises S2021 acquisition and S2022 acquisition, wherein step S203 is executed when the judgment result is S2021, and step S204 is executed when the judgment result is S2022;
s203, not processing;
s204, acquiring specified data item content as request data and specified data items as response data according to the type of the webpage request, and generating the request data and the response data into webpage request record data according to the corresponding relation;
s205, sending the webpage request record data.
On the side of the target web page, recording the web page request generated by data processing based on the received web page request, and the steps are as follows:
s206, receiving webpage request record data;
s207, storing webpage request record data;
s208, monitoring a webpage request;
s209, determining whether the webpage request needs to be intercepted according to a preset webpage request type processing rule. Judging results comprise that S2091 is not intercepted and S2092 is intercepted, if the judgment result is S2091, the step S210 is executed, and if the judgment result is S2092, the step S211 is executed;
s210, normally requesting data from the outside according to the webpage request;
s211, intercepting the webpage request;
s212, corresponding response data is obtained from the webpage request record data.
Referring to the above steps, after the web page request is monitored in the source web page in S201, S202 is executed to determine the type of the web page request, so as to determine whether the type needs to collect web page request record data, that is, to collect web page request record data for a web page request requiring response data provided by the web page request record data on one side of the target web page; and the webpage requests of the target webpage needing to normally request the data are not processed. The predetermined web page request processing rule, for example, sets an XMLHttpRequest request, a WebSocket request, and a Manifest request as acquisition web page request record data, and sets no processing for a JS request, a CSS request, a picture (Img) request, a Media (Media) request, a Font (Font) request, a document (doc) request, and the like. In S204, for different types of web page requests, according to a predetermined rule, correspondingly acquiring specified data item content, for example, for an xmlhttprequest (xhr) request, acquiring a RequestURL, a RequestMethod, a Status Code, a Query String Parameters, and a Response character String as acquisition data items; for a picture (Img) request, collecting RequestURL, Requestmethod, Status Code and Query String Parameters as collected data items; for WebSocket (WS) requests, Data in RequestURL, Requestmethod, Status Code and Messages are collected as collected Data items, and the like. The above-mentioned collection rules used for some web page requests are exemplified, and the requirements that the rules need to satisfy are that, after a web page request is monitored in a target web page, according to the information provided by the web page request, the data item can be used to find the corresponding data record of the web page request, and the data item collected based on the rules satisfies the necessary conditions for generating the response information.
Referring to the above steps, after S206 receives the web page request record data in the target web page, S207 is executed to save the web page request record data in the target web page, so as to establish a web page request simulation service in the target web page, so as to provide search and response data for the specified type of web page request simulation, and refer to step S212 for processing the type of web page request. When a web page request occurs in the target web page, monitoring is performed in S208, type judgment is performed in S209, whether interception processing is performed or not is selected according to the judgment result, and external request data is normally requested or response data is acquired through web page request simulation service. As in the above example of the processing rule for the web page request, when an XMLHttpRequest request occurs in a target web page, the web page request is intercepted, corresponding response data is obtained in web page request recording data, and when an image request occurs, an image is normally obtained to the outside.
According to the implementation mode, the corresponding processing mode is selected in the source webpage according to the webpage request type, so that the webpage request record data are generated by collecting data aiming at the content of dynamic interaction between the webpage and the outside, and the collection of static webpage resource content is abandoned. Meanwhile, the source webpage is prevented from transmitting a large amount of static network resource data to the target webpage, and the synchronization efficiency is effectively improved.
In one possible implementation manner, the source web page sends synchronization data to the target web page, and further includes web page data, please refer to fig. 3, which is described as follows:
on the source web page side:
s301, collecting partial or all webpage data in a source webpage;
s302, generating webpage data for synchronization;
s303, sending the webpage data for synchronization to a target webpage;
on the target web page side:
s304, receiving the webpage data for synchronization;
s305, correspondingly updating the webpage data content in the target webpage based on the webpage data contained in the webpage data for synchronization.
In the above embodiments and other embodiments of the present Application, the web page data includes, but is not limited to, web page HTML element data (HTML Elements), web page resource data (Sources), web page program data (Application-related data, such as Manifest), web page Storage data (Storage data, such as Loca lStorage, Session Storage, local database, Cookies, etc.), Cache data (Cache data, such as Cache Storage, Application Cache, etc.), and the like. The webpage data used for synchronization is webpage data sent by a source webpage to a target webpage in a synchronization process, and is used for the target webpage to correspondingly replace webpage data content in the target webpage based on webpage data content contained in the target webpage.
According to the implementation mode, the method for synchronizing the webpage data is provided, the webpage data used for synchronizing is used as effective supplement of webpage operation instruction data and webpage request record data, and when the consistency check of the webpage data on two sides in the synchronization process at the beginning of the synchronization establishment finds difference, the webpage data synchronization is realized through the method.
In one possible implementation manner, during the synchronization process, the synchronization status identifier is used to control the synchronization process, please refer to fig. 4, which is detailed as follows:
on the source web page side:
s401, generating synchronous data in a source webpage;
s402, generating a synchronous state identifier corresponding to the synchronous data;
s403, sending the synchronous state identifier to a target webpage;
on the target web page side:
s404, receiving the synchronous state identifier;
s405, executing corresponding synchronous operation in the target webpage;
s406, reading the synchronous state identifier corresponding to the synchronous data, and updating the synchronous state identifier stored in the target webpage based on the synchronous state identifier.
In the above implementation, S401 performs an action of synchronizing to the target web page every time synchronization data is generated in the source web page, and thus, a synchronization status identifier is established based on each generation of synchronization data in S402, where the synchronization status identifier corresponds to one synchronization. The synchronous state identification of the implementation mode is beneficial to identifying the synchronous states of the source webpage and the target webpage and controlling the synchronous process. Optionally, the generated synchronization status identifier has a continuous characteristic. Optionally, the source webpage sends the synchronization data to the target webpage each time, and the synchronization data carries the synchronization status identification information. Optionally, after the synchronization status identifier is received in S404, it is checked whether the received synchronization status identifier is continuous according to the synchronization status identifier corresponding to the current synchronization status of the target web page, so as to ensure an unreleased synchronization operation, and when a omission is found, a synchronization web page data verification request is initiated. In the present application, the synchronization data includes various data sent by the source web page to the target web page for performing synchronization, including but not limited to web page operation instruction data, web page request record data, web page data for synchronization, timer execution instructions, execution result data of specified system functions, synchronization data generated by web site information, and the like.
In a possible implementation manner, a change of a web page in a source web page is not necessarily caused by a user operation or a web page request, but also includes a change of a web page content caused by a special situation such as a web page internal program operation, and for this situation, the implementation manner implements a synchronization effect by sending source web page data to a target web page, as shown in fig. 5, as follows in detail:
on the source web page side:
s501, monitoring that the webpage data content of a source webpage changes;
s502, judging whether the synchronous state identifier stored in the source webpage is updated or not, and executing S503 when no update is judged;
s503, generating webpage data for synchronization based on the changed webpage data content;
s504, sending the webpage data for synchronization to a target webpage;
on the target web page side:
s505, receiving the webpage data for synchronization;
s506, correspondingly updating the webpage data content in the target webpage based on the webpage data contained in the webpage data used for synchronization.
In the above implementation manner, S501 monitors whether the content of the web page data changes, for example, a MutationObserver is used, changes to the DOM tree are monitored, after a DOM is changed, an event is generated by the change, S502 is executed in the event to determine whether the synchronization status identifier is updated, and after it is monitored that there is no corresponding update, S503 is executed to generate the web page data for synchronization. By the implementation mode, the purpose of the same webpage display effect at two sides can be achieved by sending webpage data and updating in a target webpage aiming at the condition that webpage content changes caused by the operation of a webpage internal program, such as an execution program of a webpage internal timer.
In one possible implementation manner, the target webpage actively sends a synchronous webpage data verification request to the source webpage, and the source webpage generates webpage data for synchronization so as to replace the webpage data in the target webpage. As shown in fig. 6, the detailed steps are as follows:
on the target web page side:
s601, generating a second message abstract based on the webpage data identified in the target webpage by the identification information according to the identification information of the webpage data;
s602, generating a webpage data record to be verified according to the identification information and the second message abstract;
s603, generating a synchronous webpage data verification request based on one or more webpage data records to be verified;
s604, generating a synchronous webpage data verification request based on identification information corresponding to one or more webpage data to be acquired in a source webpage;
s605, sending a synchronous webpage data verification request;
on the source web page side:
s606, receiving a synchronous webpage data verification request;
s607, acquiring a webpage data record to be verified;
and S608, judging the type of the webpage data record to be verified. When the differentiated web page data is acquired for S6081, perform step S609; when it is S6082 that the web page data is acquired according to the identification information of the web page data, step S612 is executed;
s609, acquiring a second message abstract generated by the webpage data identified in the target webpage by the identification information;
s610, acquiring corresponding webpage data in a source webpage according to the identification information, and generating a first message abstract;
s611, comparing the first message digest with the second message digest, and if the first message digest is not identical to the second message digest, generating the web page data in the source web page identified by the identification information as the web page data for synchronization;
s612, generating the webpage data in the source webpage identified by the identification information of the webpage data into webpage data for synchronization;
s613, sending the webpage data for synchronization;
on the target web page side:
s614, receiving the webpage data for synchronization;
s615, the webpage data content in the target webpage is replaced correspondingly based on the webpage data contained in the webpage data.
In the above implementation manner, the target web page may initiate the synchronous web page data verification request to the source web page by one of the following manners: the first method is that a message abstract of webpage data contained in a target webpage is sent to a source webpage to check the consistency of the target webpage data, and the steps S601-S603 are referred to, wherein the method is based on the webpage data check purpose; in the second mode, the identification information of the web page data is sent to the source web page, the source web page is requested to return the web page data corresponding to the identification information, and referring to step S604, the mode is based on the purpose of requesting the web page data. Corresponding to the two initiating modes of the web page data verification request, in a source web page, S608 judges the type of a web page data record to be verified included in the web page data verification request, and when it is determined that the web page data is acquired according to the identification information of the web page data, that is, corresponding to the first mode, based on the purpose of requesting the web page data, directly searches for the corresponding web page data content in the source web page, and generates a web page data return for synchronization; when it is determined that differentiated web page data is acquired, that is, corresponding to the second mode, based on the purpose of web page data verification, step S609 is executed to acquire a message digest generated by the web page data of the target web page, step S610 is executed to generate corresponding web page data into another message digest in the source web page, through the comparison operation of step S611, when the message digests generated by the two are different, it is determined that the portion of web page data is different, the portion of web page data is sent to the target web page, and step S615 is executed to update the web page data. Optionally, the message digests generated in S601 and S610 generate the message digests for the web page data corresponding to each node according to the structure of the web page data (e.g., DOM tree), store the generated message digests correspondingly according to the structure of the web page data, and finally generate the structured first message digest and the structured second message digest, and in S611, the difference part nodes to be synchronized are obtained according to the corresponding comparison of the stored structures of the message digests, and the web page data to be synchronized is extracted according to the nodes, so as to generate the web page data for synchronization.
The implementation modes respectively provide methods for verifying the target webpage and acquiring the webpage data, and in a specific implementation scene, for example, when webpage synchronization is established for the first time, the webpage data are acquired through the implementation method; when the difference between the webpage data in the target webpage and the source webpage is judged to exist, the webpage data are checked and updated through the implementation method, for example, the difference problems caused by the running environment of the webpage browsers on two sides in synchronization, independently running webpage programs, timer execution programs, local related system function execution and the like can all result in different webpage data, so that different webpage display results are presented.
Optionally, the above implementation manner may be decomposed into two independent implementation manners, for example, the steps of S601, S602, S603, S605, S606, S607, S609, S610, S611, S613, S614, and S615 are combined into one implementation manner, so as to achieve the purpose of acquiring and updating the web page data based on the web page data verification purpose; the steps of S604, S605, S606, S607, S612, S613, S614, and S615 are combined into another implementation manner to achieve the purpose of acquiring and updating the web page data based on the purpose of requesting the web page data.
In a possible implementation manner, when the target web page does not receive the synchronous data, it monitors that the web page data changes, and initiates a synchronous web page data verification request to the source web page, with reference to fig. 7, the detailed steps are as follows:
on the target web page side:
s701, monitoring that the webpage data content of the target webpage changes;
s702, judging whether the synchronous state identifier stored in the target webpage has corresponding update, and executing S703 when no update is confirmed;
s703, generating a synchronous webpage data verification request based on the identification information of the webpage data corresponding to the changed webpage data content;
s704, sending the synchronous webpage data verification request to a source webpage;
on the source web page side:
s705, receiving the synchronous webpage data verification request;
s706, processing the synchronous webpage data verification request, and generating webpage data for synchronization according to the webpage data in the source webpage identified by the identification information of the webpage data;
s707, sending the webpage data for synchronization;
on the target web page side:
s708, receiving the webpage data for synchronization;
s709, based on the web page data contained in the replacement object, the web page data content in the replacement object is corresponded.
In the above implementation manner, S701 monitors whether the content of the web page data changes, and a monitoring manner such as a MutationObserver may also be used; in S702, it is determined whether the synchronization status flag is updated, and optionally, S702 may also determine whether the webpage synchronization data is received or whether the synchronization operation is executed; s706 refers to the above embodiment for the detailed steps of processing the web page data verification request. By the implementation mode, the purpose of the same webpage display effect at two sides can be achieved by sending the webpage data verification request aiming at the situation that the webpage content is changed due to the running of the internal program of the target webpage, such as the execution program of the internal timer of the webpage.
In a specific implementation scenario, in addition to the above implementation manners, the implementation manner of the synchronous webpage data verification request further includes that the source webpage initiates a synchronous webpage data verification request to the target webpage (the request includes message summary information generated based on the source webpage data) so as to verify consistency of the webpage data in the target webpage; a source webpage or a target webpage sends a synchronous webpage data verification request to the other side according to a preset time interval so as to regularly verify the consistency of webpage data in the synchronization process; after the corresponding synchronous operation is completed in the target webpage, an execution notice is sent, and a synchronous webpage data verification request is sent to the source webpage, so that the consistency of the webpage data is verified after each synchronous operation is completed.
In another possible implementation, the synchronization is performed by analyzing changes in the running web page, such as: user operation, a web page request, execution of a web page internal timer (e.g., setTimeout), etc., the following implementation provides processing of timer execution in a web page synchronization process, please refer to fig. 8, which is detailed as follows:
on the source web page side:
s801, monitoring the execution of a timer;
s802, generating a timer execution instruction for executing in the target webpage based on the execution content of the timer;
s803, sending the timer execution instruction;
on the target web page side:
s804, receiving the timer execution instruction;
s805, executing the specified execution content based on the timer execution instruction;
s806, monitoring the execution of a timer;
s807, the timer execution is stopped.
By the implementation mode, the execution of the timer in the target webpage is shielded, the asynchronous condition caused by the simultaneous execution of the timers at the two sides is avoided, the timer execution instruction sent by the source webpage is received, the timer execution instruction comprises the content executed by the timer in the source webpage, and then the same content is executed in the target webpage, so that the aim of executing the timers at the two sides in the same way is fulfilled, and the two sides keep the same execution effect. It should be noted that the timer execution instruction may also serve as a synchronization data, and optionally, the synchronization status identification information is carried in the sending process of the timer execution instruction.
In another possible implementation manner, the same web page program is executed on both sides of the synchronization, and in the case of ensuring that the timers execute completely the same, there is still a case of execution inconsistency, such as system functions including obtaining system time, obtaining IP, etc. in the program, which may result in incomplete synchronization, and this implementation manner handles in the synchronization process for a particular system function, please refer to fig. 9, the detailed steps are as follows:
on the source web page side:
s901, monitoring the execution of a specified system function;
s902, obtaining the result of the execution of the specified system function to generate execution result data;
s903, sending the execution result data;
on the target web page side:
s904, receiving the execution result data;
s905, storing the execution result data;
s906, monitoring the execution of the specified system function;
and S907, searching the corresponding execution result in the stored execution result data to be used as the execution result of the system function.
In the above implementation manner, the specified system function refers to a function that is executed in different time, different execution environments, or different browsers and has inconsistent execution results. By the implementation mode, the consistency of the execution results of the system functions specified in the target webpage and the source webpage is ensured.
In a possible implementation manner, considering that factors such as independent operation of web page programs on two sides of synchronization, data transmission, network delay, etc. may cause abnormality of web page synchronization, the implementation manner provides a pipelined synchronization process control method, please refer to fig. 10, which includes the following detailed steps:
on the source web page side:
s1001, generating synchronous data;
s1002, updating synchronous identification information of a source webpage;
s1003, suspending program execution in the source webpage;
s1004, sending synchronous data and synchronous identification;
on the target web page side:
s1005, receiving the synchronous data and the synchronous identification;
s1006, executing synchronous operation;
s1007, generating a synchronization execution completion notification;
s1008, sending the synchronous execution completion notice;
on the source web page side:
s1009, receiving the synchronous execution completion notification sent by the target webpage;
and S1010, continuing to execute the program in the source webpage.
Through the implementation mode, after the target webpage completes the synchronization operation corresponding to the source webpage, the execution completion notification is sent to the source webpage, the source webpage continues executing, the next synchronization is carried out, and the whole webpage is synchronized orderly.
In another possible implementation manner, considering that the present application performs synchronization by independently running the web page programs on both sides of the synchronization, the present implementation manner provides a method for enabling both sides of the synchronization to obtain the same initial running state, please refer to fig. 11, and the detailed steps are as follows:
on the source web page side:
s1101, receiving a synchronization request sent by the target webpage;
s1102, refreshing the source webpage;
s1103, generating synchronous data based on the current website of the source webpage;
s1104, sending the synchronous data;
on the target web page side:
s1105, receiving the synchronous data;
s1106, the target webpage is reloaded based on the website information contained in the webpage.
Through the implementation mode, when the target webpage and the source webpage are synchronized for the first time, the source webpage is refreshed, the current website is sent to the target webpage, and the target webpage is loaded based on the website at the same time, so that the target webpage and the source webpage obtain the same initial running state (if variable assigned values are the same). Preferably, in the refreshing process of the source webpage, according to the method provided by the other embodiments of the present application, the webpage request record data is generated, and the webpage request occurring in the loading process of the target webpage is processed in the target webpage according to the webpage request record data, so that repeated interaction with the server in the loading process is avoided, and the two synchronous sides obtain the same running state. It should be noted that the synchronization data generated by the website information in the implementation method can also be used as one of the synchronization data.
With reference to fig. 12, S1103 in the above implementation is replaced with S1203, and synchronization data is generated based on web page data included in the source web page; accordingly, S1106 is replaced with S1206, and the web page data in the target web page is replaced based on the received web page data. Except for the above differences, the flow of the present implementation is basically the same as that of the previous implementation, and is not described herein again.
In a specific implementation scenario, the implementation of web page synchronization provided in this application may be implemented by one or more combinations of the web page synchronization methods provided in the above embodiments, and in each embodiment, the execution sequence of some steps is not particularly limited, and in a specific implementation, the steps may be executed simultaneously, or may also be executed sequentially according to a preset order.
The following describes each constituent module of the web page synchronization system in detail with reference to fig. 13:
the synchronization system comprises a source webpage 10 and a target webpage 20.
The source web page 10 includes:
a user operation acquisition module 101, configured to acquire data of a user operation and a user operation based on the user operation occurring in a source web page;
a web page operation instruction data generating module 102, configured to generate web page operation instruction data based on the user operation and the data of the user operation acquired by the user operation acquiring module 101;
a web page request acquisition module 103, configured to acquire request information of the web page request based on the web page request in the source web page, and acquire response information of the web page request;
a web page request record data generating module 104, configured to generate request data according to the request information acquired by the web page request acquiring module 103, generate response data according to the response information acquired by the web page request acquiring module 103, and generate the request data and the response data as web page request record data;
the data communication module 105 is configured to send the webpage operation instruction data and the webpage request record data to the target webpage;
the target web page 20 includes:
a web page operation instruction execution module 201, configured to execute the web page operation instruction based on the web page operation instruction included in the web page operation instruction data;
a web page request monitoring module 202, configured to monitor a web page request occurring in a target web page;
the web page request simulation service module 203 is configured to intercept the web page request according to the web page request monitored in the web page request monitoring module 202, search a corresponding data record in the web page request record data according to request information of the web page request, and return response data included in the data record as response data of the web page request in the current target web page;
the data communication module 204 is configured to receive the webpage operation instruction data and the webpage request record data sent by the source webpage.
In one possible web page synchronization system, please refer to fig. 14:
the source web page 10 further includes:
a synchronous process control module 106, configured to perform synchronous process control, where the synchronous process control includes generating a synchronous state identifier according to synchronous data sent by a source web page, where the synchronous state identifier is used to identify a synchronous state, and the type of the synchronous data includes, but is not limited to, web page operation instruction data, web page request record data, web page data used for synchronization, and the like;
a web page data monitoring module 107, configured to monitor whether web page data in a source web page changes;
the web page data synchronization checking module 108 is configured to check, based on a synchronization web page data checking request sent by the target web page, consistency of web page data corresponding to the same web page identifier in the source web page and the target web page according to a web page data record to be checked included in the web page synchronization data;
a synchronized web page data generating module 109, configured to generate web page data for synchronization according to the web page data in the source web page; the system is also used for generating webpage data for synchronization according to the identification information of the webpage data sent by the target webpage and based on the corresponding webpage data content of the identification information of the webpage data in the source webpage; the web page data synchronization verification module 108 is further configured to generate web page data for synchronization based on corresponding web page data in the source web page when the web page data synchronization verification module 108 verifies that the web page data of the target web page is inconsistent with the web page data of the source web page; the web page data monitoring module 107 is further configured to determine whether the synchronization status identifier stored in the source web page is updated after monitoring that the content of the web page data is changed, and generate web page data for synchronization based on the changed content of the web page data when it is determined that the information of the web page status identifier is not updated;
the data communication module 105 is further configured to send the synchronization status identifier and the webpage data for synchronization to the target webpage, and receive a synchronization webpage data check request sent by the target webpage;
the target web page 20 further includes:
a synchronous process control module 205, configured to execute synchronous process control in the target webpage, where the synchronous process control includes, according to the received synchronous data sent by the source webpage, after executing corresponding synchronous operation in the target webpage, reading a synchronous state identifier corresponding to the synchronous data, and updating the synchronous state identifier stored in the target webpage based on the synchronous state identifier;
a web page request processing module 206, configured to obtain, according to the web page request monitored by the web page request monitoring module 202 and based on the type of the web page request, according to a predetermined web page request processing rule, a processing manner of the web page request, and process the web page request according to the processing manner, where the web page request processing manner includes intercepting the web page request and sending the web page request information to the web page request simulation service module 203 for processing, and not intercepting the web page request;
the webpage data monitoring module 207 is used for monitoring whether webpage data in a target webpage are changed;
a synchronous webpage data verification request generating module 208, configured to generate a synchronous webpage data verification request, where the synchronous webpage data verification request is used to be sent to the source webpage to verify consistency of webpage data included in the target webpage and the source webpage in a webpage synchronization process;
a web page data replacing module 209, configured to update, according to the received web page data for synchronization from the source web page, the web page data in the target web page correspondingly according to the web page data content included in the web page data for synchronization;
the data communication module 204 is further configured to receive the synchronization status identifier sent by the source web page, the web page data for synchronization, and send the synchronization web page data verification request.
In another possible web page synchronization system, please refer to fig. 15:
the source web page 10 further includes:
a web page timer monitoring processing module 110, configured to monitor a timer in the source web page, and generate a timer execution instruction for execution in the target web page based on execution content of the timer after monitoring that the timer is executed;
a special system function monitoring processing module 111, configured to monitor execution of a specified system function on the source web page, and when it is monitored that the specified system function is executed, obtain an execution result of the specified system function to generate execution result data;
the synchronous process control module 106 is further configured to suspend program execution in the source web page after the synchronous state identifier is updated every time in the source web page, and continue program execution in the source web page until a synchronous execution completion notification sent by the target web page is received; the source webpage is also used for refreshing the source webpage when a synchronization request sent by the target webpage is received, and after the source webpage is loaded, the current website of the source webpage is generated into synchronization data, or a synchronization webpage data generation module 109 is called to generate webpage data contained in the source webpage into webpage data used for synchronization;
the data communication module 105 is further configured to send the timer execution instruction and execution result data generated as a result of the execution of the specified system function to the target webpage; also for sending, to the target web page, web page data for synchronization generated by the synchronization process control module 106 processing the target web page synchronization request; the system is also used for receiving a synchronous execution completion notification sent by the target webpage;
the target web page 20 further includes:
the webpage timer execution control module 210 is configured to stop execution of the timer when it is monitored that the timer in the target webpage is executed; the source webpage is also used for executing the specified execution content based on the timer execution instruction according to the timer execution instruction received from the source webpage;
the system function execution control module 211 is configured to, when it is monitored that the specified system function in the target web page is executed, search, according to the result information of the execution of the specified system function received from the source web page, a corresponding execution result in the result information of the execution of the specified system function, and set an execution result of the specified system function in the target web page based on the execution result;
the synchronous process control module 205 is further configured to generate a synchronous execution completion notification after completing the synchronous execution operation corresponding to the synchronous data sent by the source webpage in the target webpage; the web page data replacing module 209 is also used for calling the web page data replacing module to replace the web page data according to the received web page data after a web page synchronization request is sent to the source web page for the first time;
the data communication module 204 is further configured to receive the timer execution instruction sent by the source web page and execution result data generated as a result of the execution of the specified system function; and is further configured to send a synchronization execution completion notification to the source web page.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state Disk, SolidState Disk), among others.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present application, and all the changes or substitutions should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A webpage synchronization method is characterized in that webpage operation and display synchronization applied to a source webpage and a target webpage are synchronized, and the method is applied to the source webpage and comprises the following steps:
monitoring user operation occurring in the source webpage, acquiring data of the user operation and the user operation based on the user operation, and generating webpage operation instruction data;
monitoring a webpage request in the source webpage, acquiring request information of the webpage request to generate request data based on the webpage request, acquiring response information of the webpage request to generate response data, and generating the request data and the response data into webpage request recording data according to a corresponding relation;
sending the webpage operation instruction data and the webpage request record data to the target webpage;
the webpage operation instruction data is used for receiving the target webpage and executing the webpage operation instructions contained in the target webpage so as to simulate user operation in the source webpage in the target webpage; the webpage request record data is used for receiving the target webpage, and provides corresponding response data for the webpage request corresponding to the request data in the target webpage based on the request data and the response data contained in the webpage request record data so as to simulate the processing of the webpage request in the source webpage in the target webpage.
2. The method of claim 1, wherein collecting the request data and the response data based on the web page request further comprises:
judging whether the webpage request type needs to acquire request data or not according to the type of the webpage request and a preset webpage request processing rule, and responding the data to generate webpage request record data;
and acquiring a specified data item as the request data and a specified data item as the response data according to the type of the webpage request, and generating the request data and the response data into webpage request record data according to a corresponding relation.
3. The method according to claim 1, wherein when the source webpage and the target webpage are synchronized for the first time or during the webpage synchronization, the method further comprises generating webpage data for synchronization based on all or part of the webpage data in the source webpage, and sending the webpage data for synchronization to the target webpage;
the webpage data used for synchronization are received by the target webpage, and webpage data content in the target webpage is correspondingly updated based on the webpage data contained in the webpage data, so that the webpage data of the target webpage and the webpage data of the source webpage are kept synchronized.
4. The method of claim 3, wherein generating the web page data for synchronization in the source web page further comprises:
receiving a synchronous webpage data verification request sent by the target webpage, wherein the synchronous webpage data verification request comprises one or more webpage data records to be verified, the webpage data records to be verified comprise identification information of the webpage data, and the identification information corresponds to the webpage data of the specified part in the source webpage and the target webpage;
according to the webpage data record to be verified contained in the synchronous webpage data verification request, executing the following operations:
generating the webpage data in the source webpage identified by the identification information of the webpage data into the webpage data for synchronization, and sending the webpage data for synchronization to the target webpage;
or when it is determined that the to-be-verified webpage data record further includes a second message digest generated based on the webpage data identified by the identification information in the target webpage, acquiring corresponding webpage data in the source webpage according to the identification information of the webpage data in the to-be-verified webpage data record, generating a first message digest based on the acquired webpage data, comparing the first message digest corresponding to the identification information of the webpage data with the second message digest, when it is determined that the two are different, generating the webpage data in the source webpage identified by the identification information of the webpage data into the webpage data for synchronization, and sending the webpage data for synchronization to the target webpage.
5. The method according to claim 1 or 3, wherein generating synchronization data in the source web page further comprises generating a synchronization status identifier corresponding to the synchronization data, wherein the synchronization data is data sent by the source web page to the target web page for performing web page synchronization, and the synchronization status identifier is used for identifying a synchronization status in a synchronization process;
and sending the synchronous data to the target webpage, and further sending the synchronous state identification to the target webpage.
6. The method according to claim 1, further comprising monitoring whether the web page data content of the source web page changes, after monitoring that the web page data content changes, determining whether the synchronization status identifier stored in the source web page has a corresponding update, generating web page data for synchronization based on the changed web page data content when it is determined that the synchronization status identifier is not updated, and sending the web page data for synchronization to the target web page.
7. A method for synchronizing web pages, which is applied to synchronizing web page operation and display from a source web page to a target web page, and is applied to the target web page, and comprises the following steps:
receiving webpage operation instruction data and/or webpage request record data sent by the source webpage, wherein the webpage request record data comprise request data generated based on request information of a webpage request in the source webpage and response data generated based on response information of the webpage request in the source webpage;
executing the webpage operation instruction based on the webpage operation instruction contained in the webpage operation instruction data;
monitoring the webpage requests in the target webpage, intercepting the monitored webpage requests, finding corresponding webpage request record data records in the webpage request record data according to the request information of the intercepted webpage requests, and returning response data contained in the webpage request record data records as the response data of the intercepted webpage requests.
8. The method according to claim 7, wherein after the target web page monitors the web page request, the method further comprises, based on the type of the web page request, determining according to a predetermined web page request processing rule, obtaining a processing mode of the web page request, and processing the web page request according to the processing mode, where the processing mode of the web page request includes intercepting or not intercepting the web page request, and when it is determined that the web page request is intercepted, finding a corresponding web page request record data record in the web page request record data based on the web page request, and returning response data included in the web page request record data record as response data of the intercepted web page request.
9. The method of claim 7, further comprising receiving webpage data for synchronization sent by the source webpage, and updating the webpage data in the target webpage according to webpage data content included in the webpage data for synchronization.
10. The method of claim 7, further comprising:
generating a webpage data record to be verified according to the identification information of the webpage data in the target webpage, or generating a second message abstract based on the webpage data identified in the target webpage by the identification information of the webpage data, and generating the webpage data record to be verified according to the identification information and the second message abstract;
generating a synchronous webpage data verification request based on one or more webpage data records to be verified;
and sending the synchronous webpage data verification request to the source webpage.
11. The method according to claims 7 and 9, wherein after the target web page performs a corresponding synchronization operation in the target web page according to the received synchronization data sent by the source web page, the method further includes reading a synchronization status identifier corresponding to the synchronization data, and updating the synchronization status identifier stored in the target web page based on the synchronization status identifier, wherein the synchronization data is data received by the target web page and used for performing web page synchronization, and the synchronization status identifier stored in the target web page is used for identifying a synchronization status of the target web page.
12. The method according to claim 10, further comprising monitoring a change in the content of the web page data of the target web page, determining whether the synchronization status identifier stored in the target web page is updated after monitoring that the content of the web page data is changed, generating a synchronization web page data check request based on the identification information of the web page data corresponding to the changed content of the web page data when it is determined that the synchronization status identifier stored in the target web page is not updated, and sending the synchronization web page data check request to the source web page.
13. A webpage synchronization system is used for realizing webpage display and operation synchronization from a source webpage to a target webpage, and is characterized in that the system comprises the source webpage and the target webpage, and the source webpage comprises:
the user operation acquisition module is used for acquiring data of user operation and user operation based on the user operation generated in the source webpage;
the webpage operation instruction data generation module is used for generating webpage operation instruction data based on the user operation and the data of the user operation acquired by the user operation acquisition module;
the webpage request acquisition module is used for acquiring request information of the webpage request and acquiring response information of the webpage request based on the webpage request in the source webpage;
the webpage request record data generating module is used for generating request data according to the request information acquired by the webpage request acquisition module, generating response data according to the response information acquired by the webpage request acquisition module, and generating the request data and the response data into webpage request record data;
the data communication module is used for sending the webpage operation instruction data and the webpage request record data to the target webpage;
the target webpage comprises:
the webpage operation instruction execution module is used for executing the webpage operation instruction based on the webpage operation instruction contained in the webpage operation instruction data;
the webpage request monitoring module is used for monitoring a webpage request generated in a target webpage;
the webpage request simulation service module is used for intercepting the webpage request according to the webpage request monitored in the target webpage, finding a corresponding webpage request record data record in the webpage request record data according to the request information of the intercepted webpage request, and returning response data contained in the webpage request record data record as the response data of the intercepted webpage request;
and the data communication module is used for receiving the webpage operation instruction data and the webpage request record data sent by the source webpage.
14. The system of claim 13,
the source web page further includes:
the synchronous process control module is used for executing synchronous process control and comprises the steps of generating a synchronous state identifier according to synchronous data sent by a source webpage, wherein the synchronous state identifier is used for identifying a synchronous state, and the synchronous data are data which are sent to a target webpage by the source webpage and are used for executing webpage synchronization;
the webpage data monitoring module is used for monitoring whether the webpage data in the source webpage are changed;
the webpage data synchronization checking module is used for checking the consistency of the webpage data corresponding to the same webpage identifier in the source webpage and the target webpage according to the webpage data record to be checked contained in the synchronous webpage data checking request received from the target webpage;
the synchronous webpage data generating module is used for generating webpage data for synchronization according to the webpage data in the source webpage; the system is also used for generating webpage data for synchronization according to the identification information of the webpage data sent by the target webpage and based on the corresponding webpage data content of the identification information of the webpage data in the source webpage; the webpage data synchronization checking module is used for checking whether the webpage data of the target webpage are consistent with the webpage data of the source webpage or not; the webpage data monitoring module is also used for judging whether the synchronization state identification stored in the source webpage is updated or not after monitoring that the webpage data content is changed, and generating webpage data for synchronization based on the changed webpage data content when the webpage state identification information is not updated;
the data communication module is further configured to send the synchronization status identifier and the webpage data for synchronization to the target webpage, and is further configured to receive a synchronization webpage data check request sent by the target webpage;
the target web page further comprises:
the synchronous process control module is used for executing synchronous process control in the target webpage and comprises the steps of executing corresponding synchronous operation in the target webpage according to the received synchronous data sent by the source webpage, reading a synchronous state identifier corresponding to the synchronous data and updating the synchronous state identifier stored in the target webpage based on the synchronous state identifier;
the webpage request processing module is used for acquiring a processing mode of the webpage request according to the webpage request monitored by the webpage request monitoring module, judging according to a preset webpage request processing rule based on the type of the webpage request, and processing the webpage request according to the processing mode, wherein the webpage request processing mode comprises the steps of intercepting the webpage request and sending webpage request information to the webpage request simulation service module for processing and not intercepting the webpage request;
the webpage data monitoring module is used for monitoring whether webpage data in a target webpage are changed;
the synchronous webpage data verification request generating module is used for generating a synchronous webpage data verification request which is used for sending to the source webpage so as to verify the consistency of webpage data contained in the target webpage and the source webpage in the webpage synchronization process;
the webpage data replacement module is used for correspondingly updating the webpage data in the target webpage according to the webpage data for synchronization received from the source webpage and the webpage data content contained in the webpage data for synchronization;
the data communication module is further configured to receive the synchronization status identifier sent by the source webpage, the webpage data for synchronization, and send the synchronization webpage data verification request.
CN202110182456.4A 2021-02-10 2021-02-10 Webpage synchronization method and system Active CN112988263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110182456.4A CN112988263B (en) 2021-02-10 2021-02-10 Webpage synchronization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110182456.4A CN112988263B (en) 2021-02-10 2021-02-10 Webpage synchronization method and system

Publications (2)

Publication Number Publication Date
CN112988263A true CN112988263A (en) 2021-06-18
CN112988263B CN112988263B (en) 2023-11-28

Family

ID=76393322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110182456.4A Active CN112988263B (en) 2021-02-10 2021-02-10 Webpage synchronization method and system

Country Status (1)

Country Link
CN (1) CN112988263B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020089659A (en) * 2001-05-24 2002-11-30 주식회사 비즈모델라인 System and Method for syncronizing web browser of multi-users by using the direct data communication(P2P) between clients
CN1774707A (en) * 2003-05-22 2006-05-17 思科技术公司 Peer-to-peer dynamic web page sharing
US20110314329A1 (en) * 2010-06-16 2011-12-22 Oracle International Corporation Shared error searching
JP2012049771A (en) * 2010-08-26 2012-03-08 Kddi Corp Page content synchronization method for synchronizing page content among terminal, synchronization server and program
KR20150004054A (en) * 2013-07-02 2015-01-12 에스케이플래닛 주식회사 System and method for web service based on interworking between browser
WO2016073469A1 (en) * 2014-11-03 2016-05-12 Interdigital Technology Corporation Scalable privacy protected web content sharing mechanism for web based applications
CN107872437A (en) * 2016-09-27 2018-04-03 阿里巴巴集团控股有限公司 A kind of method, apparatus and server for service request
CN109446457A (en) * 2018-09-25 2019-03-08 平安普惠企业管理有限公司 Update method, terminal device and the medium of page data
CN110580318A (en) * 2018-05-21 2019-12-17 腾讯科技(深圳)有限公司 Information display method and device and storage medium
CN110647578A (en) * 2019-08-14 2020-01-03 平安普惠企业管理有限公司 Method and device for synchronously displaying page information, computer equipment and storage medium
CN110765208A (en) * 2019-10-22 2020-02-07 成都知道创宇信息技术有限公司 Data synchronization method and device, electronic equipment and storage medium
CN111107145A (en) * 2019-12-17 2020-05-05 青岛希望鸟科技有限公司 Online synchronous communication system based on HTML5 webpage
CN111552643A (en) * 2020-04-27 2020-08-18 深圳壹账通智能科技有限公司 Multi-browser webpage access synchronization method and system
CN111581564A (en) * 2020-05-10 2020-08-25 青岛希望鸟科技有限公司 Webpage synchronous communication method realized by applying Canvas

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020089659A (en) * 2001-05-24 2002-11-30 주식회사 비즈모델라인 System and Method for syncronizing web browser of multi-users by using the direct data communication(P2P) between clients
CN1774707A (en) * 2003-05-22 2006-05-17 思科技术公司 Peer-to-peer dynamic web page sharing
US20110314329A1 (en) * 2010-06-16 2011-12-22 Oracle International Corporation Shared error searching
JP2012049771A (en) * 2010-08-26 2012-03-08 Kddi Corp Page content synchronization method for synchronizing page content among terminal, synchronization server and program
KR20150004054A (en) * 2013-07-02 2015-01-12 에스케이플래닛 주식회사 System and method for web service based on interworking between browser
WO2016073469A1 (en) * 2014-11-03 2016-05-12 Interdigital Technology Corporation Scalable privacy protected web content sharing mechanism for web based applications
CN107872437A (en) * 2016-09-27 2018-04-03 阿里巴巴集团控股有限公司 A kind of method, apparatus and server for service request
CN110580318A (en) * 2018-05-21 2019-12-17 腾讯科技(深圳)有限公司 Information display method and device and storage medium
CN109446457A (en) * 2018-09-25 2019-03-08 平安普惠企业管理有限公司 Update method, terminal device and the medium of page data
CN110647578A (en) * 2019-08-14 2020-01-03 平安普惠企业管理有限公司 Method and device for synchronously displaying page information, computer equipment and storage medium
CN110765208A (en) * 2019-10-22 2020-02-07 成都知道创宇信息技术有限公司 Data synchronization method and device, electronic equipment and storage medium
CN111107145A (en) * 2019-12-17 2020-05-05 青岛希望鸟科技有限公司 Online synchronous communication system based on HTML5 webpage
CN111552643A (en) * 2020-04-27 2020-08-18 深圳壹账通智能科技有限公司 Multi-browser webpage access synchronization method and system
CN111581564A (en) * 2020-05-10 2020-08-25 青岛希望鸟科技有限公司 Webpage synchronous communication method realized by applying Canvas

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁思率 等: "基于内容管理***和内容分发网络的网站群***静态化技术", 计算机应用, no. 1, pages 328 - 331 *

Also Published As

Publication number Publication date
CN112988263B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
US10860406B2 (en) Information processing device and monitoring method
US9064029B2 (en) Dynamically identifying and evaluating component hierarchy for rendering content components on a webpage
CN102597993B (en) Managing application state information by means of uniform resource identifier (URI)
CN109446457A (en) Update method, terminal device and the medium of page data
US20170357524A1 (en) Automated software configuration management
CN111010364B (en) System for offline object-based storage and simulation of REST responses
CN107276842B (en) Interface test method and device and electronic equipment
US20180159724A1 (en) Automatic task tracking
US20110302285A1 (en) Update server to update rendered content
CN110457632B (en) Webpage loading processing method and device
CN112988263B (en) Webpage synchronization method and system
Noskov Smart City Webgis Applications: Proof of Work Concept For High-Level Quality-Of-Service Assurance
CN113420288B (en) Container mirror image sensitive information detection system and method
CN115455006A (en) Data processing method, data processing device, electronic device, and storage medium
CN111147226A (en) Data storage method, device and storage medium
CN105610908B (en) A kind of samba service implementing method and system based on Android device
CN113031960B (en) Code compiling method, device, server and storage medium
CN113010475B (en) Method and apparatus for storing track data
KR102521784B1 (en) Access management apparatus and method for managing database access based on web application server
US11863632B2 (en) Method and system for application performance neutral, network bandwidth optimized capturing of resources used during the interaction of user with a web-based application to create monitoring data for an accurate visual reconstruction of the user experience
Piskun et al. Progressive web applications as means of increasing web services functionality
CN110351222B (en) Data security processing method, device and system
Vanini et al. Was the clock correct? Exploring timestamp interpretation through time anchors for digital forensic event reconstruction
CN115952344A (en) Feature acquisition method, system, storage medium and terminal equipment

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