CN114968400A - Webpage synchronization method and device, storage medium and electronic equipment - Google Patents

Webpage synchronization method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114968400A
CN114968400A CN202210549144.7A CN202210549144A CN114968400A CN 114968400 A CN114968400 A CN 114968400A CN 202210549144 A CN202210549144 A CN 202210549144A CN 114968400 A CN114968400 A CN 114968400A
Authority
CN
China
Prior art keywords
terminal
target webpage
state
state data
webpage
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.)
Pending
Application number
CN202210549144.7A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210549144.7A priority Critical patent/CN114968400A/en
Publication of CN114968400A publication Critical patent/CN114968400A/en
Priority to PCT/CN2022/139967 priority patent/WO2023221495A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F9/44526Plug-ins; Add-ons
    • 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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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

Landscapes

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

Abstract

The application discloses a webpage synchronization method, a webpage synchronization device, a storage medium and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of monitoring the state of a target webpage to change based on an installed first state management plug-in, obtaining first state data after the target webpage changes, updating the target webpage based on the first state data, uploading the first state data to a server connected through the first state management plug-in, wherein the server is used for updating the target webpage of a second terminal based on the first state data when the target webpage is opened at the second terminal, and the first terminal and the second terminal log in the same account number of the target webpage.

Description

Webpage synchronization method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for synchronizing webpages, a storage medium, and an electronic device.
Background
Science and technology is continuously improving the work and life of people, and in order to meet the needs of work and life of people, various intelligent electronic devices are widely applied to the work and life of people, and one user has the use right of multiple electronic devices. For example, a user may use a desktop computer to work in a company, or a notebook computer to work at home, and may use a mobile phone to chase a drama or a tablet computer to chase a drama, etc
In some scenarios, when a user performs a task on an electronic device without completing the task, there may be a need to continue a previous task in another electronic device and a need to synchronize the performance of the task between the two electronic devices. The key to meeting the requirements of such users is to quickly realize data synchronization between two devices.
Disclosure of Invention
The webpage synchronization method, the webpage synchronization device, the storage medium and the electronic equipment can achieve synchronization of webpage data between two electronic equipment which open the same target webpage. The technical scheme is as follows:
in a first aspect, a method for synchronizing webpages provided in an embodiment of the present application is applied to a first terminal, and the method includes:
monitoring the state change of a target webpage based on an installed first state management plug-in, and acquiring first state data after the change of the target webpage;
and updating the target webpage based on the first state data, and uploading the first state data to a server connected through the first state management plug-in, wherein the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
In a second aspect, a method for synchronizing web pages provided in an embodiment of the present application is applied to a server, and the method includes:
receiving first state data sent by a first terminal, wherein the first state data is state data obtained after a first state management plug-in installed in the first terminal monitors that a target webpage has a state change;
and when the target webpage is opened by the second terminal, updating the target webpage of the second terminal based on the first state data, wherein the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
In a third aspect, an embodiment of the present application provides a web page synchronization apparatus, where the apparatus includes:
the first state acquisition module is used for monitoring the state change of a target webpage based on the installed first state management plug-in and acquiring first state data after the change of the target webpage;
the first state updating module is used for updating the target webpage based on the first state data and uploading the first state data to a server connected through the first state management plug-in, the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
In a fourth aspect, an embodiment of the present application provides a web page synchronization apparatus, where the apparatus includes:
the first state receiving module is used for receiving first state data sent by a first terminal, wherein the first state data is state data obtained after a first state management plug-in installed in the first terminal monitors that a target webpage has a state change;
and the first state synchronization module is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
In a fifth aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a sixth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
In one or more embodiments of the application, when a first terminal and a second terminal open a target webpage with the same account number and a first state management plug-in installed in the first terminal monitors that a state of the target webpage changes, first state data after the change of the target webpage is acquired, then the target webpage of the first terminal is updated based on the first state data, and the first state data is uploaded to a server connected through the first state management plug-in, so that the server updates the target webpage of the second terminal based on the first state data when the second terminal opens the target webpage; by adopting the method and the device, a specific operating system is not required, a specific application programming interface is not required, and the state management plug-in for monitoring the state of the target webpage is used for sending the state data after the state change to the second terminal when the data of the target webpage of the first terminal is changed so as to synchronously update the webpage state of the target webpage of the second terminal, so that the synchronization of the webpage data is realized between two electronic devices for opening the same target webpage.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a system architecture diagram of a web page synchronization method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating an example of restoring a target web page according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 8 is a flowchart of a web page synchronization method according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating an example of a target web page state change according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram illustrating an example of rendering a target webpage by a second terminal according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application;
fig. 15 shows a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the prior art, solutions for application data synchronization and application state synchronization between the same applications in different devices exist in both a hongmeng operating system and an IOS operating system. However, the two operating systems can only implement application data synchronization and application state synchronization between the same applications among different devices for native applications of the operating systems, cannot implement data synchronization between web pages of different devices, and rely on a specific application programming interface in the operating system, and thus have great limitations.
Based on this, the application provides a webpage synchronization method, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage changes based on a first state management plug-in installed in the first terminal, first state data after the target webpage changes are acquired, then the target webpage of the first terminal is updated based on the first state data, and the first state data is uploaded to a server connected through the first state management plug-in, so that the server updates the target webpage of the second terminal based on the first state data when the second terminal opens the target webpage; by adopting the method and the device, a specific operating system is not required, a specific application programming interface is not required, and the state management plug-in for monitoring the state of the target webpage is used for sending the state data after the state change to the second terminal when the data of the target webpage of the first terminal is changed so as to synchronously update the webpage state of the target webpage of the second terminal, so that the synchronization of the webpage data is realized between two electronic devices for opening the same target webpage.
The following is a detailed description with reference to specific examples. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. The flow diagrams depicted in the figures are merely exemplary and need not be performed in the order of the steps shown. For example, some steps are parallel, and there is no strict sequence relationship in logic, so the actual execution sequence is variable.
Fig. 1 is a system architecture diagram of a web page synchronization method according to an embodiment of the present application. As shown in fig. 1, the system architecture diagram includes a first terminal 101, a network 102, a server 103, and a second terminal 104. Interaction between the first terminal 101, the server 103 and the second terminal 104 may be achieved through the network 102.
The first terminal 101 may be hardware or software. When the first terminal is hardware, it may be various electronic devices including, but not limited to, a smart watch, a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the first terminal is software, it may be installed in the electronic device listed above, and it may be implemented as multiple software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited in this respect.
Network 102 may include various types of wired or wireless communication links, such as: the wired communication link includes an optical fiber, a twisted pair wire, or a coaxial cable, and the Wireless communication link includes a bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link, etc.
The server 103 may be a server or a server cluster providing various services, such as a background management server providing support for a website browsed by a user using the first terminal 101.
The second terminal 104 may be hardware or software. When the second terminal is hardware, it may be various electronic devices including, but not limited to, a smart watch, a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the second terminal is software, it may be installed in the electronic device listed above, and it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, and is not limited in this respect.
In one embodiment, when a first terminal and a second terminal open a target webpage with the same account number and a first state management plug-in installed in the first terminal monitors that the state of the target webpage changes, first state data after the change of the target webpage of the first terminal is acquired, then the target webpage of the first terminal is updated based on the first state data, and the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, a specific application programming interface is not needed, and the state data after the change of the state is sent to the second terminal by the state management plug-in monitoring the state of the target webpage when the data of the target webpage of the first terminal changes, the webpage state of the target webpage of the second terminal is synchronously updated, and webpage data are synchronized between two electronic devices which open the same target webpage.
The system architecture shown in fig. 1 is described in detail below with reference to specific embodiments. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. The flow diagrams depicted in the figures are merely exemplary and need not be performed in the order of the steps shown. For example, some steps are parallel, and there is no strict sequence relationship in logic, so the actual execution sequence is variable.
Please refer to fig. 2, which is a flowchart illustrating a web page synchronization method according to an embodiment of the present disclosure. In a specific embodiment, the web page synchronization method may be applied to a web page synchronization apparatus or an electronic device configured with the web page synchronization apparatus. The following will describe a specific flow of the present embodiment by taking an execution subject as an electronic device as an example. As will be described in detail with respect to the flow shown in fig. 2, the web page synchronization method may specifically include the following steps:
s102, monitoring the state change of a target webpage based on the installed first state management plug-in, and acquiring first state data after the change of the target webpage;
specifically, after the first terminal opens the target webpage, the first state management plug-in the first terminal may detect the webpage state of the target webpage, and when detecting that the webpage state of the target webpage changes, obtain first state data after the target webpage changes.
In the development process of an application running a target webpage, a first state management plug-in is written in a state management module of the application, the state management module is used for maintaining the mapping relation between state data and a page view, a User Interface (UI) layer of the application can be controlled according to the state data to update the page view, the first state management plug-in is a plug-in written in the state management module during application development, the page state of the target webpage in the application can be monitored, connection can be established between the first state management plug-in and a server corresponding to the target webpage, and when the state of the target webpage changes, the first state management plug-in uploads the changed state data to the server.
In one embodiment, after a target webpage is opened by a first terminal, a first state management plug-in the first terminal monitors the state of the target webpage, when a user operates certain components in the target webpage and tries to cause the state of the target webpage to change, the first terminal sends an HTTP request corresponding to the user operation to a server, the server processes the HTTP request sent by the first terminal and returns a processing result to the first terminal, and the first terminal generates first state data after the target webpage changes according to the processing result returned by the server.
And S104, updating the target webpage based on the first state data, uploading the first state data to a server connected through the first state management plug-in, wherein the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the accounts of the first terminal and the second terminal for logging in the target webpage are the same.
Specifically, the UI layer of the first terminal acquires the first state data, and the UI layer calls the corresponding component to re-render the page view of the target webpage according to the first state data, so that the target webpage in the first terminal is updated. Meanwhile, the first state management plug-in sends the first state data after the target webpage is changed to the server, and the server can update the target webpage of the second terminal based on the first state data when the second terminal which uses the same account number as the first terminal to log in the target webpage opens the target webpage.
In one embodiment, after the first state management plug-in sends the first state data after the target webpage is changed to the server, the server may store the first state data, and send the first state data to the second terminal when it is determined that a second terminal logging in the target webpage with the same account as the first terminal exists, so that a UI layer of the second terminal re-renders a page view of the target webpage running on the second terminal according to the first state data, and completes updating of the target webpage in the second terminal.
Optionally, if there is no second terminal that uses the same account as the first terminal to log in the target webpage after the first status management plugin sends the changed first status data of the target webpage to the server, after a period of time, the second terminal opens the target webpage, and after a second state management plug-in the application corresponding to the target webpage in the second terminal is connected to the server, the second state management plug-in sends a historical state data query request to the server to query whether the server has the historical state data uploaded by the first terminal, after the first state data is inquired, the first state data is synchronized to a state management module in the second terminal through the second state management plug-in, and the UI layer of the second terminal re-renders the page view of the target webpage running in the second terminal according to the first state data, and the target webpage in the second terminal is updated.
Optionally, after the first state management plug-in sends the changed first state data of the target webpage to the server, a second terminal that uses the same account number as the first terminal to log in the target webpage already exists, and the second terminal is connected to the server for a period of time, the server actively pushes the first state data uploaded by the first terminal to a state management module of the second terminal, so that a UI layer of the second terminal re-renders a page view of the target webpage running at the second terminal according to the first state data, and the target webpage in the second terminal is updated.
It should be noted that, in the embodiment of the present application, a storage environment for state data of a target webpage is established in a server, and is used for storing the state data of the target webpage uploaded by a terminal, and the state data may be subjected to data isolation through a webpage application and a user account.
In an embodiment, the relationship between the first terminal and the second terminal is not limited to the same account number for logging in the target web page, and may also be other preset rules and association relationships set for implementing synchronization of the target web page between the first terminal and the second terminal. For example, the WIFI networks connected to the first terminal and the second terminal may be the same, the device identifications of the first terminal and the second terminal are associated, the bluetooth connection has been established between the first terminal and the second terminal, and the like.
Optionally, after the first terminal logs in the target webpage, the second terminal establishes a webpage synchronization association relationship with the first terminal when logging in the target webpage, so that after the second terminal logs in the target webpage, webpage synchronization between the first terminal and the second terminal can be achieved. The web page synchronization association relationship may be that the network IPs of the first terminal and the second terminal for logging in the target web page are the same, and that a certain key used when the first terminal and the second terminal log in the target web page is the same. For example, when the method is applied to a multi-player game battle scene, player 1 logs in game 6638 through a first terminal, and player 2 logs in game 6638 through a second terminal, at this time, because player 1 and player 2 log in the same game, the synchronization of game 6638 can be realized at the first terminal and the second terminal, wherein the game serial number of game 6638 is the webpage synchronization incidence relation between the first terminal and the second terminal.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, first state data after the target webpage of the first terminal is changed are acquired, then the target webpage of the first terminal is updated based on the first state data, and the first state data are uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the target webpage is opened by the second terminal, the second terminal updates the target webpage of the second terminal based on the first state data, a specific application programming interface is not needed, and the state data after the state change are sent to the second terminal by the state management plug-in monitoring the state of the target webpage when the data of the target webpage of the first terminal is changed, the webpage state of the target webpage of the second terminal is synchronously updated, and webpage data are synchronized between two electronic devices which open the same target webpage.
In one embodiment, when the first terminal opens the target webpage for the first time, the latest historical state data of the target webpage stored by the server is directly restored to the webpage corresponding to the historical state data at the first terminal. Please refer to fig. 3, which is a flowchart illustrating a web page synchronization method according to an embodiment of the present disclosure. As shown in fig. 3, the web page synchronization method may include the steps of:
s202, if the target webpage is monitored to be opened, connection is established between the management plug-in and the server based on the first state;
specifically, when the first terminal opens the target webpage for the first time, a first state management plug-in the application of the target webpage in the first terminal establishes connection with a server corresponding to the target webpage.
S204, inquiring whether historical state data corresponding to the target webpage exists in the server or not;
specifically, after the first state management plug-in and the server corresponding to the target webpage are connected, based on the connection, the first terminal queries whether historical state data corresponding to the target webpage exists in the server.
The historical state data is the state data uploaded to the server before the first terminal opens the target webpage and the terminal logging in the target webpage with the same account number last time logs out of the target webpage, namely the latest state data stored in the server.
S206, if the historical state data corresponding to the target webpage exists in the server, synchronizing the historical state data to the first state management plug-in, and updating the target webpage based on the historical state data;
specifically, when the first terminal queries that the server stores historical state data corresponding to the target webpage, the historical state data are synchronized to a first state management plug-in of the first terminal and stored in a state management module, so that a UI layer of the first terminal renders a page view of the target webpage running at the first terminal according to the historical state data, and the target webpage opened at the first terminal is restored to a state before the target webpage is logged in and logged out by using the same account at the last time.
And S208, if the server is inquired that the historical state data corresponding to the target webpage does not exist, acquiring and displaying the homepage data of the target webpage from the server.
Specifically, when the server does not have the historical state data corresponding to the target webpage, a flow is opened according to the standard of the target webpage, the homepage data of the target webpage are obtained from the server, and the main page of the target webpage is rendered and displayed at the first terminal.
Fig. 4 is a schematic diagram illustrating an example of restoring a target web page according to an embodiment of the present application. As shown in fig. 4, when the target web page shown in the figure is opened by the first terminal, before the target web page is not completely loaded and displayed, the first terminal may query whether historical state data corresponding to the target web page exists in the server, when the corresponding historical state data does not exist in the server, a home page displaying the target web page is rendered, and when the historical state data corresponding to the target web page exists in the server, a web page 2 displaying the target web page corresponding to the historical state data is rendered.
In the embodiment of the application, when the target webpage is opened by the first terminal for the first time, whether historical state data corresponding to the target webpage exists in the server is queried based on the first state management plugin, and if the historical state data exists, the historical state data are synchronized to the first terminal, so that the target webpage in the first terminal is restored to the display state corresponding to the historical state data, the operation progress of a user on the target webpage at the last time is linked, the user is prevented from restoring the historical progress of the target webpage through repeated operation, and the operation efficiency of the user on the target webpage is improved.
Please refer to fig. 5, which is a flowchart illustrating a web page synchronization method according to an embodiment of the present disclosure. As shown in fig. 5, the web page synchronization method may include the steps of:
s302, monitoring the state change of the target webpage based on the installed first state management plug-in, and acquiring first state data after the change of the target webpage;
specifically, please refer to step S302 for detailed description in step S102 in another embodiment of the present application, which is not repeated herein.
S304, updating the target webpage based on the first state data, uploading the first state data to a server connected through a first state management plug-in, wherein the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same;
specifically, please refer to step S304 for detailed description in step S104 in another embodiment of the present application, which is not repeated herein.
S306, receiving second state data sent by the server, wherein the second state data is state data of a target webpage in the second terminal after the state of the target webpage is changed;
specifically, the account numbers of the second terminal and the first terminal for logging in the target webpage are the same, so that when the state of the target webpage of the second terminal changes, the second state management plug-in of the second terminal sends the second state data after the state change to the server, the server pushes the second state data to the first terminal running the target webpage, that is, the first terminal receives the second state data sent by the server and stores the second state data to the state management module.
And S308, updating the target webpage of the first terminal based on the second state data.
Specifically, after receiving second state data of the target webpage in the second terminal sent by the server, the UI layer of the first terminal re-renders the page view of the target webpage running in the first terminal according to the second state data, and completes updating of the target webpage in the first terminal, so that the target webpage in the first terminal and the target webpage in the second terminal are kept synchronized.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of the first terminal are changed, webpage states of the target webpage of the second terminal are synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage states of the target webpage of the first terminal are synchronously updated, and webpage data synchronization is achieved between two electronic devices which open the same target webpage.
Fig. 6 is a schematic flow chart of a web page synchronization method according to an embodiment of the present application. Applied to a server, as shown in fig. 6, the web page synchronization method may include the following steps:
s402, receiving first state data sent by a first terminal, wherein the first state data is state data of a target webpage after a first state management plug-in installed in the first terminal monitors that the state of the target webpage changes;
specifically, when the state of the target webpage in the first terminal changes, first state data sent by the first terminal after the state of the target webpage changes are received.
S404, when the second terminal opens the target webpage, the target webpage of the second terminal is updated based on the first state data, and the accounts of the first terminal and the second terminal for logging in the target webpage are the same.
Optionally, after the server receives the first state data sent by the first terminal, if the target webpage of the second terminal is currently in an open state, the first state data is pushed to the second terminal through a connection established between a second state management plug-in of the second terminal and the server, and the first state data is used to indicate that the target webpage of the second terminal is updated, so that after the second terminal receives the first state data pushed by the server, the UI layer of the second terminal re-renders a page view of the target webpage running at the second terminal according to the first state data, and completes updating of the target webpage in the second terminal, so that the target webpage at the second terminal and the target webpage at the first terminal are kept synchronous.
Optionally, after the server receives the first state data sent by the first terminal, if the target webpage of the second terminal is currently in an unopened state, when the second terminal opens the target webpage, the server receives a connection request sent by the second terminal through the installed second state management plugin, after the server establishes a connection with the second state management plugin, the server receives a first state data query request sent by the second terminal based on the installed second state management plugin, and sends the first state data to the second state management plugin of the second terminal, where the first state data is used to instruct the second terminal to update the target webpage, so that after the second terminal receives the first state data pushed by the server, the UI layer of the second terminal re-renders the view page of the target webpage running on the second terminal according to the first state data, and completes updating of the target webpage in the second terminal, and keeping the target webpage of the second terminal synchronous with the target webpage of the first terminal.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plugin installed in the first terminal, first state data after the target webpage of the first terminal is changed is acquired, then the target webpage of the first terminal is updated based on the first state data, and the first state data is uploaded to a server connected through the first state management plugin, so that the server sends the first state data to the second terminal when the target webpage is opened by the second terminal, the second terminal updates the target webpage of the second terminal based on the first state data, a specific application programming interface is not needed, the state management plugin monitoring the state of the target webpage sends the state data after the state change to the second terminal when the data of the target webpage of the first terminal is changed, the webpage state of the target webpage of the second terminal is synchronously updated, and webpage data are synchronized between two electronic devices which open the same target webpage.
Please refer to fig. 7, which is a flowchart illustrating a web page synchronization method according to an embodiment of the present disclosure. Applied to a server, as shown in fig. 7, the web page synchronization method may include the steps of:
s502, receiving first state data sent by a first terminal, wherein the first state data is state data obtained after a first state management plug-in installed in the first terminal monitors that a target webpage has a state change;
specifically, please refer to step S502 for detailed description in step S402 in another embodiment of the present application, which is not repeated herein.
S504, when the second terminal opens the target webpage, updating the target webpage of the second terminal based on the first state data, wherein the account numbers of the first terminal and the second terminal for logging in the target webpage are the same;
specifically, please refer to step S504 for detailed description in step S404 in another embodiment of the present application, which is not repeated herein.
S506, receiving second state data sent by the second terminal, wherein the second state data is state data of a target webpage after a second state management plug-in installed in the second terminal monitors that the state of the target webpage changes;
specifically, the account numbers of the second terminal and the first terminal for logging in the target webpage are the same, so that when the state of the target webpage of the second terminal changes, the second state management plug-in of the second terminal sends the second state data after the state change to the server, that is, the server receives the second state data sent by the second terminal.
And S508, sending the second state data to the first state management plug-in of the first terminal, wherein the second state data is used for indicating the first terminal to update the target webpage.
Specifically, after receiving second state data sent by the second terminal, the account numbers of the second terminal and the first terminal for logging in the target webpage are the same, the server pushes the second state data to a first state management plug-in of the first terminal and stores the second state data in a state management module of the first terminal, a page view of the target webpage running in the first terminal is re-rendered by a UI layer of the first terminal according to the second state data, updating of the target webpage in the first terminal is completed, and the target webpage in the first terminal and the target webpage in the second terminal are kept synchronous.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of the first terminal are changed, webpage states of the target webpage of the second terminal are synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage states of the target webpage of the first terminal are synchronously updated, and webpage data synchronization is achieved between two electronic devices which open the same target webpage.
Please refer to fig. 8, which is a flowchart illustrating a web page synchronization method according to an embodiment of the present disclosure. As shown in fig. 8, the web page synchronization method may include the steps of:
s1, when the first terminal opens the target webpage, inquiring whether the server stores the historical state data corresponding to the target webpage;
specifically, when the first terminal opens the target webpage, a first state management plug-in the first terminal establishes connection with the server, and queries whether historical state data corresponding to the target webpage exists in the server, wherein the historical state data is state data uploaded to the server before the first terminal opens the target webpage and a terminal which logs in the target webpage last time by using the same account number logs out of the target webpage, namely latest state data stored in the server.
S2, if the historical state data corresponding to the target webpage are stored in the server, the first terminal renders and displays the target webpage of the first terminal according to the historical state data;
specifically, if the server stores historical state data corresponding to the target webpage, the historical state data is synchronized to the first terminal through the first state management plug-in, and the target webpage of the first terminal is rendered and displayed according to the historical state data. Reference may be made to fig. 4 as well.
S3, if the historical state data corresponding to the target webpage does not exist in the server, the first terminal renders and displays a main page of the target webpage of the first terminal;
s4, when the state of the target webpage in the first terminal changes, the first terminal uploads and stores the first state data after the state change to a server;
specifically, after the first terminal opens the target webpage, a first state management plug-in the first terminal monitors the state of the target webpage in the first terminal, and when the state of the target webpage in the first terminal changes, first state data after the state change is uploaded and stored to the server.
Fig. 9 is a schematic diagram illustrating an example of a state change of a target web page according to an embodiment of the present application. As shown in fig. 9, a target web page in the first terminal is initially displayed on the home page, and in response to an operation of the target web page by a user, the target web page jumps from the home page to the web page 1, and the state of the target web page changes, so that the first terminal uploads first state data corresponding to the web page 1 with the changed state to the server.
S5, the server judges whether a second terminal using the same account number of the first terminal to log in the target webpage exists, if so, the step S6 is executed, and if not, the step S7 is executed;
s6, the server pushes the first state data to the second terminal, and the second terminal re-renders and displays the target webpage in the second terminal according to the first state data;
specifically, the account numbers of the first terminal and the second terminal for logging in the target webpage are the same, if the target webpage is opened by the second terminal before the first terminal uploads the first state data, the server pushes the first state data to the second terminal, and the second terminal re-renders and displays the target webpage in the second terminal according to the first state data.
Please refer to fig. 10, which is a schematic diagram illustrating an example of rendering a target webpage by a second terminal according to an embodiment of the present application. As shown in fig. 10, before the second terminal does not receive the first state data, the current target webpage is located on the main page, after receiving the first state data pushed by the server, the second terminal re-renders and displays the target webpage in the second terminal according to the first state data, and the target webpage of the second terminal jumps from the main page to the webpage 1 which is the same as the webpage of the first terminal.
S7, when the second terminal opens the target webpage, the second terminal inquires whether the server stores the historical state data corresponding to the target webpage;
s8, when the first state data uploaded by the first terminal stored in the server is inquired, the second terminal acquires the first state data;
and S9, the second terminal re-renders and displays the target webpage in the second terminal according to the first state data.
The steps S7-S9 can be referred to the detailed descriptions of steps S1-S2.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of the first terminal are changed, webpage states of the target webpage of the second terminal are synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage states of the target webpage of the first terminal are synchronously updated, and webpage data synchronization is achieved between two electronic devices which open the same target webpage.
The following describes in detail a web page synchronization apparatus provided in an embodiment of the present application with reference to fig. 11. It should be noted that, the web page synchronization apparatus shown in fig. 11 is used for executing the method of the embodiment shown in fig. 2, fig. 3 and fig. 5 of the present application, and for convenience of description, only the portion related to the embodiment of the present application is shown, and details of the specific technology are not disclosed, please refer to the embodiment shown in fig. 2, fig. 3 and fig. 5 of the present application.
Fig. 11 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application. As shown in fig. 11, the web page synchronizing apparatus 1 may be implemented by software, hardware, or a combination of both as all or a part of a terminal device. According to some embodiments, the web page synchronization apparatus 1 includes a first state obtaining module 11 and a first state updating module 12, which specifically include:
the first state obtaining module 11 is configured to obtain first state data of a target webpage after the target webpage changes, based on the change of the state of the target webpage monitored by the installed first state management plugin;
the first state updating module 12 is configured to update the target webpage based on the first state data, and upload the first state data to a server connected through the first state management plug-in, where the server is configured to update the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and accounts of the first terminal and the second terminal logging in the target webpage are the same.
Optionally, please refer to fig. 12, which is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application. As shown in fig. 12, the web page synchronizing apparatus further includes a history state recovery module 13, which is specifically configured to:
if the target webpage is monitored to be opened, connection is established between the management plug-in and the server based on the first state;
inquiring whether historical state data corresponding to the target webpage exists in the server or not;
if the historical state data corresponding to the target webpage exists in the server, the historical state data are synchronized to the first state management plug-in, and the target webpage is updated based on the historical state data;
and if the historical state data corresponding to the target webpage does not exist in the server, acquiring and displaying the homepage data of the target webpage from the server.
Optionally, please refer to fig. 12, which is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application. As shown in fig. 12, the web page synchronizing apparatus further includes:
a second state receiving module 14, configured to receive second state data sent by the server, where the second state data is state data of a target webpage in the second terminal after a state change occurs;
and the second state updating module 15 is configured to update the target webpage of the first terminal based on the second state data.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of the first terminal are changed, webpage states of the target webpage of the second terminal are synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage states of the target webpage of the first terminal are synchronously updated, and webpage data synchronization is achieved between two electronic devices which open the same target webpage.
The web page synchronization apparatus provided in the embodiment of the present application will be described in detail below with reference to fig. 13. It should be noted that, the web page synchronization apparatus shown in fig. 13 is used for executing the method of the embodiments shown in fig. 6 and fig. 7 of the present application, and for convenience of description, only the portion related to the embodiments of the present application is shown, and details of the specific technology are not disclosed, please refer to the embodiments shown in fig. 6 and fig. 7 of the present application.
Fig. 13 is a schematic structural diagram of a web page synchronization apparatus according to an embodiment of the present application. As shown in fig. 13, the web page synchronizing apparatus 2 may be implemented by software, hardware, or a combination of both as all or a part of the terminal device. According to some embodiments, the web page synchronization apparatus 2 includes a first state receiving module 21 and a first state synchronization module 22, and specifically includes:
the first state receiving module 21 is configured to receive first state data sent by a first terminal, where the first state data is state data of a target webpage after a first state management plug-in installed in the first terminal monitors that a state of the target webpage changes;
and the first state synchronization module 22 is configured to update the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, where account numbers of the first terminal and the second terminal logging in the target webpage are the same.
Optionally, the first state synchronization module 22 is specifically configured to:
if the target webpage of the second terminal is in an open state currently, pushing the first state data to the second terminal, wherein the first state data is used for indicating that the target webpage of the second terminal is updated;
if the target webpage of the second terminal is not in an opened state currently, receiving a connection request sent by the second terminal through the installed second state management plug-in when the target webpage is opened by the second terminal;
after the connection is established, receiving a first state data query request sent by the second terminal based on the installed second state management plug-in, and sending the first state data to the second state management plug-in, wherein the first state data is used for indicating the second terminal to update a target webpage.
Optionally, please refer to fig. 14, which is a schematic structural diagram of a web page synchronization apparatus provided in an embodiment of the present application. As shown in fig. 14, the web page synchronizing apparatus further includes a history status sending module 23, which is specifically configured to:
when a target webpage is opened by a first terminal, receiving a connection request sent by the first terminal based on an installed first state management plug-in, and establishing connection with the first state management plug-in;
and receiving a historical state data query request sent by the first terminal based on the first state management plug-in, querying historical state data corresponding to the target webpage and sending the historical state data to the first state management plug-in, wherein the historical state data is used for indicating the first terminal to update the target webpage.
Optionally, please refer to fig. 14, which is a schematic structural diagram of a web page synchronization apparatus provided in an embodiment of the present application. As shown in fig. 14, the web page synchronizing apparatus further includes:
a second state obtaining module 24, configured to receive second state data sent by the second terminal, where the second state data is state data of a target webpage after a second state management plug-in installed in the second terminal monitors that a state of the target webpage changes;
a second state synchronization module 25, configured to send the second state data to the first state management plugin of the first terminal, where the second state is used to instruct the first terminal to update a target webpage.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of a first terminal are changed, the webpage state of the target webpage of the second terminal is synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage state of the target webpage of the first terminal is synchronously updated, and webpage data synchronization is achieved between two electronic devices opening the same target webpage.
It should be noted that, when the web page synchronization apparatus provided in the foregoing embodiment executes the web page synchronization method, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the embodiments of the web page synchronization apparatus and the web page synchronization method provided in the above embodiments belong to the same concept, and details of implementation processes thereof are referred to as method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
A computer storage medium further provided in the embodiments of the present application may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and being executed by the method for synchronizing webpages in the embodiments shown in fig. 1 to 10, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to 10, which is not described herein again.
A computer program product further provided in the present application stores at least one instruction, where the at least one instruction is loaded by the processor and executed by the method for synchronizing webpages according to the embodiment shown in fig. 1 to 10, and a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to 10, which is not described herein again.
Referring to fig. 15, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. The electronic device in the present application may comprise one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device using various interfaces and lines, performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user page, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 120 includes a Non-Transitory Computer-Readable Storage Medium (Non-transient Computer-Readable Medium). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, and the like), instructions for implementing the above method embodiments, and the like, and the operating system may be an Android (Android) system, including a system based on Android system depth development, an IOS system developed by apple, including a system based on IOS system depth development, or other systems.
The memory 120 may be divided into an operating system space, where an operating system runs, and a user space, where native and third-party applications run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens.
The touch display screen can be designed as a full-face screen, a curved screen or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the electronic devices illustrated in the above-described figures do not constitute limitations on the electronic devices, which may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. For example, the electronic device further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a Wireless Fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the electronic device shown in fig. 15, the processor 110 may be configured to call a web page synchronization program stored in the memory 120 and execute the web page synchronization program to implement the web page synchronization method according to the various method embodiments of the present application.
In the embodiment of the application, when a first terminal and a second terminal open a target webpage with the same account number and the state of the target webpage is monitored to be changed based on a first state management plug-in installed in the first terminal, the first state data is uploaded to a server connected through the first state management plug-in, so that the server sends the first state data to the second terminal when the second terminal opens the target webpage, the second terminal updates the target webpage of the second terminal based on the first state data, similarly, when the state of the target webpage of the second terminal is changed, the second terminal sends second state data after the state of the target webpage in the second terminal is changed to the server, the server pushes the second state data to the first terminal, and then the first terminal updates the target webpage of the first terminal based on the second state data, the method comprises the steps that a specific application programming interface is not needed, state data after state change are sent to a second terminal through a state management plug-in for monitoring the state of a target webpage when data of the target webpage of the first terminal are changed, webpage states of the target webpage of the second terminal are synchronously updated, when the data of the target webpage of the second terminal are changed, the webpage states of the target webpage of the first terminal are synchronously updated, and webpage data synchronization is achieved between two electronic devices which open the same target webpage.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (11)

1. A webpage synchronization method is applied to a first terminal, and the method comprises the following steps:
monitoring the state change of a target webpage based on an installed first state management plug-in, and acquiring first state data after the change of the target webpage;
and updating the target webpage based on the first state data, and uploading the first state data to a server connected through the first state management plug-in, wherein the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
2. The method of claim 1, wherein before the monitoring of the change in the state of the target webpage based on the installed first state management plug-in, further comprising:
if the target webpage is monitored to be opened, connection is established between the management plug-in and the server based on the first state;
inquiring whether historical state data corresponding to the target webpage exists in the server or not;
if the historical state data corresponding to the target webpage exists in the server, the historical state data are synchronized to the first state management plug-in, and the target webpage is updated based on the historical state data;
and if the historical state data corresponding to the target webpage does not exist in the server, acquiring and displaying the homepage data of the target webpage from the server.
3. The method of claim 1, further comprising:
receiving second state data sent by the server, wherein the second state data is state data of a target webpage in the second terminal after the state of the target webpage is changed;
and updating the target webpage of the first terminal based on the second state data.
4. A webpage synchronization method is applied to a server, and the method comprises the following steps:
receiving first state data sent by a first terminal, wherein the first state data is state data obtained after a first state management plug-in installed in the first terminal monitors that a target webpage has a state change;
and when the target webpage is opened by the second terminal, updating the target webpage of the second terminal based on the first state data, wherein the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
5. The method of claim 4, wherein updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal comprises:
if the target webpage of the second terminal is in an open state currently, pushing the first state data to the second terminal, wherein the first state data is used for indicating that the target webpage of the second terminal is updated;
if the target webpage of the second terminal is not in an opened state currently, receiving a connection request sent by the second terminal through the installed second state management plug-in when the target webpage is opened by the second terminal;
after the connection is established, receiving a first state data query request sent by the second terminal based on the installed second state management plug-in, and sending the first state data to the second state management plug-in, wherein the first state data is used for indicating the second terminal to update a target webpage.
6. The method of claim 4, wherein before receiving the first status data sent by the first terminal, the method further comprises:
when a target webpage is opened by a first terminal, receiving a connection request sent by the first terminal based on an installed first state management plug-in, and establishing connection with the first state management plug-in;
and receiving a historical state data query request sent by the first terminal based on the first state management plug-in, querying historical state data corresponding to the target webpage and sending the historical state data to the first state management plug-in, wherein the historical state data is used for indicating the first terminal to update the target webpage.
7. The method of claim 4, further comprising:
receiving second state data sent by the second terminal, wherein the second state data is state data of a target webpage after a second state management plug-in installed in the second terminal monitors that the state of the target webpage changes;
and sending the second state data to the first state management plug-in of the first terminal, wherein the second state data is used for indicating the first terminal to update the target webpage.
8. An apparatus for synchronizing web pages, the apparatus comprising:
the first state acquisition module is used for monitoring the state change of a target webpage based on the installed first state management plug-in and acquiring first state data after the change of the target webpage;
the first state updating module is used for updating the target webpage based on the first state data and uploading the first state data to a server connected through the first state management plug-in, the server is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
9. An apparatus for synchronizing web pages, the apparatus comprising:
the first state receiving module is used for receiving first state data sent by a first terminal, wherein the first state data is state data obtained after a first state management plug-in installed in the first terminal monitors that a target webpage has a state change;
and the first state synchronization module is used for updating the target webpage of the second terminal based on the first state data when the target webpage is opened by the second terminal, and the account numbers of the first terminal and the second terminal for logging in the target webpage are the same.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method of any of claims 1 to 3 or 4 to 7.
11. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of the method according to any of claims 1-3 or 4-7.
CN202210549144.7A 2022-05-20 2022-05-20 Webpage synchronization method and device, storage medium and electronic equipment Pending CN114968400A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210549144.7A CN114968400A (en) 2022-05-20 2022-05-20 Webpage synchronization method and device, storage medium and electronic equipment
PCT/CN2022/139967 WO2023221495A1 (en) 2022-05-20 2022-12-19 Web page synchronization method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210549144.7A CN114968400A (en) 2022-05-20 2022-05-20 Webpage synchronization method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114968400A true CN114968400A (en) 2022-08-30

Family

ID=82984980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210549144.7A Pending CN114968400A (en) 2022-05-20 2022-05-20 Webpage synchronization method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN114968400A (en)
WO (1) WO2023221495A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023221495A1 (en) * 2022-05-20 2023-11-23 Oppo广东移动通信有限公司 Web page synchronization method and apparatus, storage medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488754A (en) * 2013-09-22 2014-01-01 复旦大学 Method for transparent interoperability of heterogeneous document cooperation cloud services
CN108228022A (en) * 2016-12-20 2018-06-29 深圳市优朋普乐传媒发展有限公司 A kind of switching terminal equipment shows the method and device of the page
CN108347464A (en) * 2017-01-23 2018-07-31 国基电子(上海)有限公司 Operating status synchronous method, system and the electronic equipment of application program
CN110633439A (en) * 2018-06-06 2019-12-31 阿里巴巴集团控股有限公司 Page processing method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765753B (en) * 2014-01-08 2020-09-11 腾讯科技(深圳)有限公司 Method and device for browsing webpage
CN109302461B (en) * 2018-09-13 2021-08-31 网易有道信息技术(杭州)有限公司 Information display method, information processing method, information display medium, information processing system and computing equipment
CN109936621B (en) * 2019-01-28 2022-08-26 平安科技(深圳)有限公司 Information security multi-page message pushing method, device, equipment and storage medium
CN111028052A (en) * 2019-11-28 2020-04-17 维沃移动通信有限公司 Interface operation method and electronic equipment
CN114968400A (en) * 2022-05-20 2022-08-30 Oppo广东移动通信有限公司 Webpage synchronization method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488754A (en) * 2013-09-22 2014-01-01 复旦大学 Method for transparent interoperability of heterogeneous document cooperation cloud services
CN108228022A (en) * 2016-12-20 2018-06-29 深圳市优朋普乐传媒发展有限公司 A kind of switching terminal equipment shows the method and device of the page
CN108347464A (en) * 2017-01-23 2018-07-31 国基电子(上海)有限公司 Operating status synchronous method, system and the electronic equipment of application program
CN110633439A (en) * 2018-06-06 2019-12-31 阿里巴巴集团控股有限公司 Page processing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023221495A1 (en) * 2022-05-20 2023-11-23 Oppo广东移动通信有限公司 Web page synchronization method and apparatus, storage medium, and electronic device

Also Published As

Publication number Publication date
WO2023221495A1 (en) 2023-11-23

Similar Documents

Publication Publication Date Title
CN110582017B (en) Video playing method, device, terminal and storage medium
CN105302587B (en) Data-updating method and device
CN111368235B (en) Page rendering and displaying method and device, server and storage medium
CN110096660A (en) Method, apparatus and electronic equipment for loading page picture
CN104657201A (en) Method, device, equipment and system for pushing application program
CN104978358A (en) Method for displaying web page fragment on desktop and system for capturing web page fragment to desktop for displaying
CN115865852A (en) Instant messaging session information processing method and device and electronic equipment
CN104811485A (en) Resource sharing method
WO2023221495A1 (en) Web page synchronization method and apparatus, storage medium, and electronic device
CN113282268B (en) Sound effect configuration method and device, storage medium and electronic equipment
CN103975301A (en) Event service for local client applications through local server
CN113163255B (en) Video playing method, device, terminal and storage medium
CN110704760A (en) Data processing method and device
CN109800378A (en) Content processing method, device and electronic equipment based on custom browser
CN111698337B (en) Method, device and equipment for establishing communication connection
CN104506616A (en) Method, device and system for sending information by browser client side
CN110442416B (en) Method, electronic device and computer-readable medium for presenting information
CN115904514B (en) Method for realizing cloud rendering pixel flow based on three-dimensional scene and terminal equipment
CN105049982B (en) A kind of method for playing music and intelligent sound box based on intelligent sound box
CN104182331A (en) Browser performance test method, browser performance test system and terminal
CN110309454B (en) Interface display method, device, equipment and storage medium
CN103618961A (en) Method, system and browser for displaying video title
CN110568976B (en) Method, device, equipment and storage medium for controlling application display
CN114997124A (en) Table content processing method, device, equipment and storage medium
CN111176679A (en) Application program updating method and device

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