CN112597417A - Page updating method and device, electronic equipment and storage medium - Google Patents

Page updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112597417A
CN112597417A CN202011508029.2A CN202011508029A CN112597417A CN 112597417 A CN112597417 A CN 112597417A CN 202011508029 A CN202011508029 A CN 202011508029A CN 112597417 A CN112597417 A CN 112597417A
Authority
CN
China
Prior art keywords
data
page
data model
target
model
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
CN202011508029.2A
Other languages
Chinese (zh)
Other versions
CN112597417B (en
Inventor
李全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011508029.2A priority Critical patent/CN112597417B/en
Publication of CN112597417A publication Critical patent/CN112597417A/en
Application granted granted Critical
Publication of CN112597417B publication Critical patent/CN112597417B/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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The disclosure relates to a page updating method, a page updating device, electronic equipment and a storage medium, and belongs to the technical field of computers. The page updating method comprises the following steps: the method comprises the steps of obtaining a plurality of historical data records of a target page, responding to the fact that a page playback operation is detected by a data model, restoring corresponding data in the data model into historical data indicated by the target historical data record based on the target historical data record corresponding to the page playback operation, and updating the target page based on the restored data model. According to the method provided by the embodiment of the disclosure, under the condition that the target page has a plurality of historical data records, the data model in the target page adopts a detection mode, data in the data model is automatically restored to historical data through detected page playback operation, and then the target page is updated based on the restored data model, so that the updated page is displayed according to the restored data model, and page playback is realized.

Description

Page updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page updating method and apparatus, an electronic device, and a storage medium.
Background
Generally, an applied page is composed of a plurality of components, and with the development of computer technology, the functions of the page are richer and more diversified, and the number of the contained components is increased. By running the data of multiple components, the corresponding page can be exposed.
Generally, during the process of displaying a page, data of components in the page may be updated, so that the page is updated, but after the update, the page may also need to be restored to a historical page, and therefore, a method for updating the page is needed to realize page playback.
Disclosure of Invention
The disclosure provides a page updating method, a page updating device, an electronic device and a storage medium, which can achieve the effect of page playback.
According to an aspect of the embodiments of the present disclosure, there is provided a page update method, including:
acquiring a plurality of historical data records carrying indication marks of a target page, wherein the indication marks are used for indicating data models corresponding to components generating the historical data records;
responding to a data model to detect page playback operation, and restoring corresponding data in the data model into historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, wherein the data model corresponds to an indication identifier carried by the target historical data record;
and updating the target page based on the restored data model.
According to the method provided by the embodiment of the disclosure, under the condition that the target page has a plurality of historical data records, the data model in the target page adopts a detection mode, data in the data model is automatically restored to historical data through detected page playback operation, and then the target page is updated based on the restored data model, so that the updated page is displayed according to the restored data model, and page playback is realized.
In some embodiments, the data model includes a detection interface and a data update interface, the detection interface is used for detecting page playback operation of historical data records;
the restoring, in response to a data model detecting a page playback operation and based on a target history data record corresponding to the page playback operation, corresponding data in the data model to history data indicated by the target history data record includes:
in response to the detection interface detecting the page playback operation, invoking the data update interface;
and restoring corresponding data in the data model into historical data indicated by the target historical data record through the data updating interface.
The page playback operation corresponding to the data model is detected through the detection interface and the data updating interface in the data model, so that the page playback operation can be responded timely, the data in the data model is restored to historical data based on the data updating interface, the accuracy of data restoration is guaranteed, and the page playback can be accurately realized timely.
In some embodiments, the obtaining the plurality of historical data records of the target page includes:
responding to data updating operation of a data model corresponding to the target page, and updating data in the data model;
and generating a historical data record based on the data updating operation, wherein the historical data record carries the indication mark corresponding to the data model.
And generating a historical data record by aiming at the data updating operation executed in the page so as to ensure that the effect of page playback can be realized based on the generated historical data record subsequently.
In some embodiments, the data model of the component in the target page is stored in a data container, the method further comprising:
and when the data container is operated, generating an indication identifier for the data model according to the identifier of the data container and the identifier of the data model in the data container.
And generating an indication identifier for the data model through the identifier of the data model and the identifier of the data container where the data model is located, so that the indication identifier has uniqueness, and the unique data model can be determined through the indication identifier.
In some embodiments, the identifier of the data model is a component identifier of a corresponding component of the data model, and the indication identifier includes the data container identifier and the corresponding component identifier.
In some embodiments, the updating the target page based on the restored data model includes:
in response to receiving a data updating message sent by the data model, calling the restored data model through a target component corresponding to the data model;
and re-rendering the target component in the target page according to the data in the restored data model.
After the data in the data model in the page is sent and restored, the corresponding target component is re-rendered according to the data in the restored data model, so that the target component in the updated page is ensured to be displayed according to the historical data, the page is similar to the page corresponding to the historical data record, and the automatic playback of the page is realized.
In some embodiments, the data model further comprises a subscription component identification indicating a subscription component that invoked the data model;
and the data updating message is a message sent by the data model to a subscription component corresponding to the data model when the data in the data model is reduced.
When the data of the data model is sent and restored, the message is sent to the corresponding subscription component, so that the subscription component recalls the restored data model for re-rendering, and the effect of automatically updating the page is achieved.
In some embodiments, the data model includes a scheduler having the subscription component identification stored therein;
and the data updating message is a message sent to the subscription component corresponding to the data model by the dispatcher when the data in the data model is reduced.
According to still another aspect of the embodiments of the present disclosure, there is provided a page updating apparatus, including:
the acquisition unit is configured to execute acquisition of a plurality of historical data records carrying indication marks of a target page, wherein the indication marks are used for indicating data models corresponding to components generating the historical data records;
the restoring unit is configured to execute, in response to a data model detecting a page playback operation, restoring corresponding data in the data model to historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, where the data model corresponds to an indication identifier carried by the target historical data record;
and the updating unit is configured to update the target page based on the restored data model.
In some embodiments, the data model includes a detection interface and a data update interface, the detection interface is used for detecting page playback operation of historical data records;
the reduction unit comprises:
a first calling subunit configured to perform calling the data update interface in response to the detection interface detecting the page playback operation;
a restoring subunit configured to perform restoring, through the data update interface, corresponding data in the data model to historical data indicated by the target historical data record.
In some embodiments, the obtaining unit includes:
the updating subunit is configured to execute data updating operation responding to a data model corresponding to the target page and update data in the data model;
and the generating subunit is configured to execute data updating operation and generate a historical data record, wherein the historical data record carries the indication identifier corresponding to the data model.
In some embodiments, the data model of the component in the target page is stored in a data container, the apparatus further comprising:
and the generating unit is configured to execute generation of an indication identifier for the data model according to the identifier of the data container and the identifier of the data model in the data container when the data container is operated.
In some embodiments, the identifier of the data model is a component identifier of a corresponding component of the data model, and the indication identifier includes the data container identifier and the corresponding component identifier.
In some embodiments, the update unit includes:
the second calling subunit is configured to execute calling of the restored data model through a target component corresponding to the data model in response to receiving of a data updating message sent by the data model;
a rendering subunit configured to perform re-rendering of the target component in the target page according to the data in the restored data model.
In some embodiments, the data model further comprises a subscription component identification indicating a subscription component that invoked the data model;
and the data updating message is a message sent by the data model to a subscription component corresponding to the data model when the data in the data model is reduced.
In some embodiments, the data model includes a scheduler having the subscription component identification stored therein;
and the data updating message is a message sent to the subscription component corresponding to the data model by the dispatcher when the data in the data model is reduced.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the page update method of the above aspect.
According to yet another aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page updating method of the above aspect.
According to yet another aspect of the embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the page updating method of the above aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a page update method in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a page update method in accordance with an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating a display panel of a page playback plug-in according to an exemplary embodiment.
Fig. 4 is a schematic diagram of a React frame shown in accordance with an exemplary embodiment.
FIG. 5 is a flow diagram illustrating a component invoking a data model in accordance with an exemplary embodiment.
Fig. 6 is a block diagram illustrating a page update apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a page update apparatus according to an example embodiment.
Fig. 8 is a block diagram illustrating a terminal according to an example embodiment.
FIG. 9 is a block diagram illustrating a server in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the description of the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
As used in this disclosure, the terms "at least one," "a plurality," "each," "any," at least one includes one, two, or more than two, and a plurality includes two or more than two, each referring to each of the corresponding plurality, and any referring to any one of the plurality. For example, the plurality of history data records includes 3 history data records, each of the 3 history data records refers to each of the 3 history data records, and any one of the 3 history data records refers to any one of the 3 history data records, which can be the first, the second, or the third.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in the present disclosure is information authorized by the user or sufficiently authorized by each party.
The page updating method provided by the embodiment of the disclosure can be applied to computer equipment. In some embodiments, the computer device is a terminal, for example, the terminal is a mobile phone, a tablet, a computer, or the like. In some embodiments, the computer device is a server, for example, the server is a server, or a server cluster composed of several servers, or a cloud computing service center.
The following embodiments are intended to briefly explain the principles of the present disclosure, and fig. 1 is a flowchart illustrating a page updating method according to an exemplary embodiment, referring to fig. 1, the method applied to a computer device includes the following steps:
101. the computer equipment obtains a plurality of historical data records carrying the indication marks of the target page.
Each historical data record carries an indication identifier, and the indication identifier is used for indicating a data model corresponding to a component generating the historical data record.
102. And the computer equipment responds to the detection of the page playback operation by the data model, and restores corresponding data in the data model to historical data indicated by the target historical data record based on the target historical data record corresponding to the page playback operation.
The data model is a model corresponding to the component in the target page, and the data model corresponds to the indication identifier carried by the target historical data record, namely the indication identifier carried by the target historical data record corresponds to the data model. And when the data model detects page playback operation aiming at the target historical data record and the target historical data record carries the indication identification corresponding to the data model, restoring the corresponding data in the data model into the historical data indicated by the target historical data record, thereby realizing the data restoration in the data model.
103. And the computer equipment updates the target page based on the restored data model.
And after the data in the data model is restored, updating the target page through the restored data model so as to display the components in the target page according to the restored data model.
According to the method provided by the embodiment of the disclosure, under the condition that the target page has a plurality of historical data records, the data model in the target page adopts a detection mode, data in the data model is automatically restored to historical data through detected page playback operation, and then the target page is updated based on the restored data model, so that the updated page is displayed according to the restored data model, and page playback is realized.
In some embodiments, the data model includes a detection interface for detecting page playback operations on historical data records and a data update interface;
in response to the data model detecting a page playback operation, restoring corresponding data in the data model to historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, including:
calling a data updating interface in response to the detection interface detecting the page playback operation;
and restoring the corresponding data in the data model into historical data indicated by the target historical data record through the data updating interface.
In some embodiments, obtaining multiple history data records of a target page, which carry indication identifiers, includes:
updating data in the data model in response to the data updating operation of the data model corresponding to the target page;
and generating a historical data record based on the data updating operation, wherein the historical data record carries an indication mark corresponding to the data model.
In some embodiments, the data model of the component in the target page is stored in a data container, the method further comprising:
and when the data container is operated, generating an indication identifier for the data model according to the identifier of the data container and the identifier of the data model in the data container.
In some embodiments, the identifier of the data model is a component identifier of a corresponding component of the data model, and the indication identifier includes a data container identifier and a corresponding component identifier.
In some embodiments, updating the target page based on the restored data model includes:
in response to receiving a data updating message sent by the data model, calling the restored data model through a target component corresponding to the data model;
and re-rendering the target component in the target page according to the data in the restored data model.
In some embodiments, the data model further includes a subscription component identification indicating a subscription component that invoked the data model;
the data updating message is a message sent by the data model to the subscription component corresponding to the data model when the data in the data model is reduced.
In some embodiments, the data model includes a scheduler having a subscription component identification stored therein;
the data updating message is a message sent by the dispatcher to the subscription component corresponding to the data model when the data in the data model is reduced.
The following embodiments are described by taking a process of implementing page update through a detection interface and a data update interface included in a data model as an example. Fig. 2 is a flowchart illustrating a page updating method according to an exemplary embodiment, referring to fig. 2, the method is applied to a computer device, and includes the following steps:
201. the computer equipment obtains a plurality of historical data records carrying the indication marks of the target page.
Each historical data record carries an indication identifier, and the indication identifier is used for indicating a data model corresponding to a component for generating the historical data record. The indication mark is a unique mark for indicating the data model, and the indication marks of different data models are different.
In the embodiment of the disclosure, the target page is composed of a plurality of components, and the display of the page can be realized by running the data of the plurality of components. In the process of displaying the target page, data corresponding to the components in the target page are updated by executing data updating operation in the target page, when the data updating operation is executed each time, a corresponding historical data record is generated based on the data updating operation, the currently displayed target page is updated, and the target page can be restored to the historical page based on the historical data record subsequently, so that the page can be played back.
In some embodiments, the process of generating a historical data record comprises: and responding to the data updating operation of the data model corresponding to the target page, updating the data in the data model, and generating a historical data record based on the data updating operation. The data model corresponding to the target page refers to a data model of a component in the target page, and the historical data record carries an indication identifier corresponding to the data model.
When the target page is displayed, once data updating operation is performed on the data model of any component in the target page, a historical data record is generated based on the data updating operation, and the historical data record carries an indication mark corresponding to the data model. And generating a plurality of historical data records corresponding to the data model by performing data updating operation on the data model of any component for a plurality of times in the target page, or generating the historical data records corresponding to the data model of each component by performing data updating operation on the data models of the components for a plurality of times in the target page respectively, thereby obtaining the plurality of historical data records.
In some embodiments, the data model of the component in the target page is stored in a data container, and the process of generating the indication for the data model includes: and when the data container is operated, generating an indication identifier for the data model according to the identifier of the data container and the identifier of the data model in the data container.
The data container is used for storing a container of the data model, and in some embodiments, the data container is a global data container of the application or a local data container of the application. For example, for an application, the data models corresponding to all components of the application are stored in a data container, that is, the data container is a global data container; or, the application includes a plurality of pages, each page corresponds to a data container, and the data models corresponding to the plurality of components in each page are stored in the corresponding data containers, so that the data containers are local data containers.
The data model of the component in the target page is loaded into the data container by operating the data model, and the indication identifier is generated for the data model by the data container identifier and the identifier of the data model, so that the uniqueness of the indication identifier is ensured, and the data model can be determined by the indication identifier subsequently.
In a possible implementation manner of the foregoing embodiment, when the data container is executed, an indication identifier is generated for each data model in the data container according to the data container identifier and the identifier of each data model in the data container. Wherein, the indication marks corresponding to different data models are different. For example, the indication identifier corresponding to any data model includes the identifier of the data container and the identifier of the data model.
In a possible implementation manner of the foregoing embodiment, the target page is a page in an application, and each page corresponds to a data container, and when the application is started, the data container is run, and the data model of the component in the target page is loaded into the data container, so as to generate an indication identifier for each data model. When a plurality of corresponding data containers are applied, the identifiers of the data models included in different data containers may be the same, and an indication identifier is generated for each data model through the data container identifiers and the identifiers of the data models, so as to ensure the uniqueness of the indication identifiers.
In a possible implementation manner of the foregoing embodiment, the identifier of the data model is a component identifier of a component corresponding to the data model, and the indication identifier generated for the data model includes a data container identifier and a corresponding component identifier. Wherein the data container identification is an identification of a data container in which the data model is located.
In some embodiments, if the computer device has a web application installed therein, the web application including a page playback plug-in, then step 201 includes: and acquiring a plurality of historical data records of the target page from the page playback plug-in. The target page is a page in a webpage application, and the page playback plug-in is used for storing a plurality of historical data records of the target page. When the computer equipment displays the target page, the data in the data model corresponding to the target page is updated to generate a historical data record, the generated historical data record is stored in the page playback plug-in, the generated multiple historical data records can be displayed through the page playback plug-in, and the data in the data model corresponding to the target page is restored through the multiple historical data records in the page playback plug-in. For example, a Redox devtool (page playback plug-in) is included in the web application, and time travel (page playback) of a page is enabled by the Redox devtool. As shown in fig. 3, the display panel of the page playback plug-in includes a search box corresponding to backlog, generated history data records, and history data records of completed page playback, where the search box is used to search the history data records in the display panel, the generated history data records include history data record 1 and history data record 2, different history data records are distinguished by an indication identifier of a corresponding data model, and the number of history data records of completed page playback is 0, which indicates that the history data records of completed page playback are not included yet. On a display panel of the page playback plug-in, performing a page playback operation on the historical data record 1, for example, clicking the historical data record 1, displaying a page playback option, detecting a confirmation operation on the page playback option, on the display panel of the page playback plug-in, displaying data corresponding to the historical data record 1, for example, displaying data and a header of the historical data record 1, and subsequently, through the historical data record 1, realizing page playback of the target page.
202. The computer device invokes a data update interface in the data model in response to the detection interface in the data model detecting a page playback operation.
The page playback operation is an operation for any one of the plurality of history data records, and the page playback operation is an operation for playing back a target page to a history page corresponding to the history data record. For example, for a target data model, in the history page, the data in the target data model includes history data indicated by the history data record, and in the target page, the data in the target data model includes other data corresponding to the history data, the page playback operation is performed to restore the other data corresponding to the history data in the target data model to the history data, so that the target page after subsequent update is similar to the history page. For example, the page playback operation is a jump operation, a jump option corresponding to the historical data record of any data model is displayed in response to a click operation on the historical data record, and a trigger operation on the jump option, namely the page playback operation for the historical data record, is responded so as to restore the corresponding data in the data model to the data indicated by the historical data.
Through the page playback operation, data in the data model corresponding to the historical data record is restored subsequently, so that the components in the data model are displayed according to the data in the historical data record, and the page playback effect is achieved.
In the embodiment of the present disclosure, each data model includes a detection interface and a data update interface, and for any data model, the detection interface in the data model is used to detect a page playback operation on a history data record, and the history data record carries an indication identifier corresponding to the data model. The data updating interface in the data model is used for updating data in the data model.
For any data model, if the detection interface in the data model detects a page playback operation on a history data record, and the history data record carries an indication identifier corresponding to the data model, the data in the data model needs to be updated subsequently according to the history data record, so that the data update interface in the data model is called to update the data in the data model subsequently through the data update interface.
In some embodiments, the data model includes a data processing interface, the detection interface being generated when the data processing interface is running, through which page playback operations can be detected; through the detection interface, the data updating interface can be called, and data in the data model can be updated through the data updating interface.
In some embodiments, if the computer device has a web application installed therein, the web application including a page playback plug-in, then step 202 includes: and in response to the detection interface in any data model detecting the page playback operation in the page playback plug-in, calling a data updating interface in the data model.
When a target page is started, loading a data model (model) of a component in the target page into a data container (Store) through a useStore (a data loading interface), and establishing a binding relationship between each data model and the page playback plug-in, so that a detection interface can detect a page playback operation executed in the page playback plug-in.
203. And the computer equipment restores the corresponding data in the data model into the historical data indicated by the target historical data record corresponding to the page playback operation through the data updating interface in the data model.
The data model corresponds to an indication identifier carried in the target historical data record, for example, the indication identifier corresponding to the data model is the same as the indication identifier carried in the target historical data record.
Because the page playback operation is an operation for the target history data record, and the target history data record includes history data, after the data model detects the page playback operation, the data corresponding to the history data in the data model is restored to the history data through the data update interface in the data model, so that the restored data model includes the history data.
For example, the data model includes a plurality of data, such as data 1, data 2, and data 3, and the historical data indicated by the target historical data record corresponds to the data 3, the data 3 in the data model is restored to the historical data through the data update interface in the data model, that is, the restored data model includes data 1, data 2, and the historical data.
In some embodiments, the data model includes a plurality of types of data, and the target historical data record indicates that the historical data is of the target type, then step 203 includes: determining data belonging to a target type in the data model through a data updating interface in the data model, and restoring the data belonging to the target type in the data model into historical data indicated by the target historical data record. The data in the data model is restored according to the target type of the historical data indicated by the target historical data record, so that the accuracy of data restoration is ensured, page playback is carried out on the restored data subsequently, and the accuracy of page playback is ensured.
In some embodiments, the data model further comprises a data storage interface for storing data in the data model; a process for restoring data in a data model, comprising: and updating the data in the data storage interface through the data updating interface based on the historical data indicated by the target historical data record. The data in the data storage interface is updated through the data updating interface, so that the accuracy of data updating is ensured.
For example, the data model includes State (data storage interface), Reducer (data update interface, or data update function), and Effects (data processing interface), and after Effects receive a data update request, the Reducer is called, and the data stored in State is updated based on the historical data indicated by the target historical data record.
It should be noted that, in the embodiment of the present disclosure, the data in the data model is restored through the detection interface and the data update interface in the data model, but in another embodiment, step 203 and step 203 need not be executed, and other manners can be adopted, in response to any data model detecting a page playback operation, based on a target historical data record corresponding to the page playback operation, corresponding data in the data model is restored to historical data indicated by the target historical data record.
204. And when the computer equipment restores the data in the data model, sending the message to the subscription component corresponding to the data model through the data model.
Wherein the data model includes a subscription component identification indicating a subscription component that invokes the data model. For example, for any data model, the components subscribed to the data model include component 1, component 2, and component 3, and the data model includes the component identifications of component 1, component 2, and component 3.
And when the data of the data model is restored, sending a data updating message to the subscription component so that the subscription component re-calls the data model after receiving the data updating message to re-render the subscription component by the restored data model.
In some embodiments, the data model includes a scheduler, then this step 204 includes: in response to the data in the data model being restored, a data update message is sent to the subscription component in the data model identifying the corresponding subscription component based on a scheduler in the data model. Wherein, the dispatcher stores the subscription component identification. For example, a subscription component identification of other subscription components that subscribe to the data model is also included in the scheduler.
The scheduler in the data model can detect the data change condition in the data model, and when the data in the data model is restored, the data updating message is sent to the subscription component, so that the data model called by the subscription component can be updated in time.
205. And the computer equipment responds to the received data updating message sent by the data model and calls the restored data model through the target component corresponding to the data model.
Wherein, the target component is a component calling the data model, and the data update message is used for indicating that the data of the data model is updated. And when the data in the data model is changed, the target component is instructed to re-call the restored data model through the data updating message, so that the target component re-renders according to the restored data model, and the target page is updated.
In some embodiments, this step 205 includes: sending a model calling message to an index interface of a data container through a target component corresponding to the data model, receiving the model calling message through the index interface of the data container, inquiring the data model corresponding to an indication identifier carried by the model calling message in the data container, and sending the inquired data model to the target component through the index interface.
The index interface is used for inquiring the data model corresponding to the indication identification. The model calling message is a message for requesting the data container to acquire the data model by the component, and the model calling message comprises an indication identifier corresponding to the data model requested to be called by the target component. In some embodiments, the data model is the target component's own data model, i.e., the target component invokes the target component's own data model; alternatively, the data model is not the target component's own data model, i.e., the target component calls the data model of other components. For example, the target component can call the data model of the target component itself and can also call the data models of other components, and then the target component stores the indication identifier corresponding to the data model of the target component itself and the indication identifiers corresponding to the data models of other components, and sends the model call message to the index interface of the data container, so that the data container returns the data model corresponding to the component identifier in the model call message.
206. And the computer equipment re-renders the target component in the target page according to the data in the restored data model.
And the computer equipment re-renders the target component in the target page according to the data in the reduced data model so as to display the target component according to the data in the reduced data model, namely, the target page is updated, so that the updated target page is displayed according to the page corresponding to the target historical data record, and the page playback is realized.
It should be noted that the embodiment of the present disclosure is only described in the context of updating the target component through the data update message sent by the data model, and in another embodiment, the step 204 and the step 206 need not be executed, and other ways can be taken to update the target page based on the restored data model.
In the detected page playback operation process, the computer device is provided with a web application, the target page is a page in the target application, the web application comprises a page playback plug-in, the page playback operation in the page playback plug-in is detected through a detection interface in the data model on the basis of the binding relationship between the data model and the page playback plug-in, so as to realize page playback, and when the target page is closed, the binding relationship between the data model and the page playback plug-in needs to be disconnected.
In some embodiments, the computer device has installed a web application including a page playback plug-in, after step 206, the method further comprising: when the target page is closed, the binding relationship between the data model corresponding to the target page and the page playback plug-in is disconnected through a data unloading interface (such as an unsubscripte). When the target page is closed, the binding relationship between the data model corresponding to the target page and the page playback plug-in is disconnected, so that the consumption of the memory is reduced, and the memory resource is saved.
The method provided by the embodiment of the disclosure can be applied to a script library framework (such as React) for constructing a user interface, and the user interface can be constructed based on the React framework. For example, the React development framework is a ReactHooks (a new component construction approach) framework. In the development system of the React framework, the page of the application is composed of components, and data among the components are transmitted in a unidirectional mode. According to the page updating method provided by the embodiment of the disclosure, the data model of the component is assembled in the data container by taking the data model as a basic unit, so that the component can directly call the data model of the data container, and when the component is newly added to the applied page, the component can be updated by associating the component file of the newly added component with the configuration file of the data container, all data in the data container does not need to be reconfigured, the application flexibility is improved, and the code maintainability is improved. According to the page updating method provided by the embodiment of the disclosure, a page playback frame with multiple data models is configured for the read frame, and the page playback can be realized under the condition that the page corresponds to multiple data models, so that the application performance is improved.
According to the method provided by the embodiment of the disclosure, under the condition that the target page has a plurality of historical data records, the data model in the target page adopts a detection mode, data in the data model is automatically restored to historical data through detected page playback operation, and then the target page is updated based on the restored data model, so that the updated page is displayed according to the restored data model, and page playback is realized.
And the page playback operation corresponding to the data model is detected through the detection interface and the data updating interface in the data model, so that the page playback operation can be responded in time, the data in the data model is restored to historical data based on the data updating interface, the accuracy of data restoration is ensured, and the page playback can be accurately realized in time.
And generating a historical data record by aiming at the data updating operation executed in the page, so as to ensure that the page playback effect can be realized based on the generated historical data record.
And generating an indication identifier for the data model through the identifier of the data model and the identifier of the data container where the data model is located, so that the indication identifier has uniqueness, and the unique data model can be determined through the indication identifier.
And after the data in the data model in the page is sent and restored, re-rendering the corresponding target component according to the data in the restored data model to ensure that the target component in the updated page is displayed according to the historical data, so that the page is similar to the page corresponding to the historical data record, and automatic playback of the page is realized.
And when the data of the data model is sent and restored, the message is sent to the corresponding subscription component, so that the subscription component recalls the restored data model for re-rendering, and the effect of automatically updating the page is achieved.
Based on the page updating method provided by the above embodiment, a schematic diagram of an act frame is provided, and as shown in fig. 4, the act frame can be used for displaying a page.
For a web application comprising a plurality of pages, each page comprising a plurality of components, configuring a data container for each page, creating a specified directory for each page. For any page, naming the component files of the components in the page by the identifiers of the components, storing the component files in a designated directory corresponding to the page, storing the configuration files of a data container in the designated directory, and adding the component identifiers corresponding to a plurality of component files in the designated directory in the configuration files to realize the association between the components and the data container.
When the webpage application is started, the data container is operated, the component file is subjected to boundary check to ensure the accuracy of the component file, after the boundary check of the component file passes, the component file related to the configuration file of the data container is converted into a data model through an analyzer and the container aggregation action of the data container, a mounting container (React Context) is created for each data model in the data container, and the data model is stored in the mounting container. And storing the subscription component identification of the data model in the scheduler of each data model.
The data model in the data container is mounted on the component in the page display through the container in which the data container is mounted, so that the component can send the model calling message to the data container through the mounting container, the data container carries out model indexing on the component identifier carried in the model calling message to determine the data model corresponding to the component identifier, and the data model is sent to the component, and the process of calling the data model by the component is shown in fig. 5. After the component receives the data model returned by the data container, the data storage interface, the data updating interface and the data processing interface which are included by the data model can be obtained, and the page is rendered based on the data stored in the data storage interface so as to display the rendered page. By the page updating method provided by the embodiment of the disclosure, after corresponding data in any data model is restored to historical data indicated by a historical data record, a data updating message is sent to a subscription component subscribing to the data model, and after the subscription component receives the data updating message, the subscription component recalls the restored data model according to the process of calling the data model by the component shown in fig. 5, and re-renders the subscription component in a target page according to the data in the restored data model, thereby realizing page updating.
On the basis of displaying the page through the fact frame, when data updating operation is performed in the displayed page, corresponding historical data records are generated, and then the page playback effect can be achieved based on the page updating method provided by the embodiment.
Fig. 6 is a block diagram illustrating a page update apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes:
an obtaining unit 601 configured to perform obtaining of a plurality of historical data record indication identifiers carrying indication identifiers of a target page, wherein the historical data record indication identifiers are used for indicating data models corresponding to components generating historical data records;
the restoring unit 602 is configured to execute, in response to the data model detecting a page playback operation, restoring corresponding data in the data model to historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, where the data model corresponds to an indication identifier carried by the target historical data record;
an updating unit 603 configured to perform updating the target page based on the restored data model.
According to the device provided by the embodiment of the disclosure, under the condition that the target page has a plurality of historical data records, the data model in the target page adopts a detection mode, data in the data model is automatically restored to historical data through detected page playback operation, and then the target page is updated based on the restored data model, so that the updated page is displayed according to the restored data model, and page playback is realized.
In some embodiments, the data model includes a detection interface for detecting page playback operations on historical data records and a data update interface;
as shown in fig. 7, the reduction unit 602 includes:
a first call subunit 6021 configured to perform calling the data update interface in response to the detection of the page playback operation by the interface;
a reduction subunit 6022 configured to perform reduction of the corresponding data in the data model to the historical data indicated by the target historical data record through the data update interface.
In some embodiments, as shown in fig. 7, the obtaining unit 601 includes:
an updating subunit 6011 configured to perform, in response to a data updating operation on the data model corresponding to the target page, updating data in the data model;
and a generating subunit 6012 configured to perform a data updating operation, and generate a history data record, where the history data record carries an indication identifier corresponding to the data model.
In some embodiments, the data model of the component in the target page is stored in a data container, as shown in FIG. 7, the apparatus further comprising:
the generating unit 604 is configured to execute, when the data container is executed, generating an indication identifier for the data model according to the data container identifier and the identifier of the data model in the data container.
In some embodiments, the identifier of the data model is a component identifier of a corresponding component of the data model, and the indication identifier includes a data container identifier and a corresponding component identifier.
In some embodiments, as shown in fig. 7, the updating unit 603 includes:
a second invoking subunit 6031, configured to execute, in response to receiving the data update message sent by the data model, invoking the restored data model by a target component corresponding to the data model;
a rendering subunit 6032 configured to perform re-rendering of the target component in the target page according to the data in the restored data model.
In some embodiments, the data model further includes a subscription component identification indicating a subscription component that invoked the data model;
the data updating message is a message sent by the data model to the subscription component corresponding to the data model when the data in the data model is reduced.
In some embodiments, the data model includes a scheduler having a subscription component identification stored therein;
the data updating message is a message sent by the dispatcher to the subscription component corresponding to the data model when the data in the data model is reduced.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
In an exemplary embodiment, there is also provided an electronic device, characterized in that the electronic device includes:
one or more processors;
volatile or non-volatile memory for storing one or more processor-executable instructions;
wherein the one or more processors are configured to perform the steps performed by the terminal or the server in the page updating method.
In some embodiments, the electronic device is provided as a terminal. Fig. 8 is a block diagram illustrating a structure of a terminal 800 according to an example embodiment. The terminal 800 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
The terminal 800 includes: a processor 801 and a memory 802.
The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 802 is used to store at least one program code for execution by the processor 801 to implement the page update methods provided by the method embodiments of the present disclosure.
In some embodiments, the terminal 800 may further include: a peripheral interface 803 and at least one peripheral. The processor 801, memory 802 and peripheral interface 803 may be connected by bus or signal lines. Various peripheral devices may be connected to peripheral interface 803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808, and a power supply 809.
The peripheral interface 803 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, memory 802, and peripheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral interface 803 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
The Radio Frequency circuit 804 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 804 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 804 converts an electrical signal into an electromagnetic signal to be transmitted, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 804 may also include NFC (Near Field Communication) related circuits, which are not limited by this disclosure.
The display screen 805 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 805 is a touch display, the display 805 also has the ability to capture touch signals on or above the surface of the display 805. The touch signal may be input to the processor 801 as a control signal for processing. At this point, the display 805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 805 may be one, disposed on a front panel of the terminal 800; in other embodiments, the display 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in other embodiments, the display 805 may be a flexible display disposed on a curved surface or a folded surface of the terminal 800. Even further, the display 805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 806 is used to capture images or video. Optionally, camera assembly 806 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 801 for processing or inputting the electric signals to the radio frequency circuit 804 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 800. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 807 may also include a headphone jack.
The positioning component 808 is used to locate the current geographic position of the terminal 800 for navigation or LBS (Location Based Service). The Positioning component 808 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 809 is used to provide power to various components in terminal 800. The power supply 809 can be ac, dc, disposable or rechargeable. When the power supply 809 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: acceleration sensor 811, gyro sensor 812, pressure sensor 813, fingerprint sensor 814, optical sensor 815 and proximity sensor 816.
The acceleration sensor 811 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 800. For example, the acceleration sensor 811 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 801 may control the display 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 812 may detect a body direction and a rotation angle of the terminal 800, and the gyro sensor 812 may cooperate with the acceleration sensor 811 to acquire a 3D motion of the user with respect to the terminal 800. From the data collected by the gyro sensor 812, the processor 801 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 813 may be disposed on the side frames of terminal 800 and/or underneath display 805. When the pressure sensor 813 is disposed on the side frame of the terminal 800, the holding signal of the user to the terminal 800 can be detected, and the processor 801 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed at a lower layer of the display screen 805, the processor 801 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 814 is used for collecting a fingerprint of the user, and the processor 801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 814 may be disposed on the front, back, or side of terminal 800. When a physical button or a vendor Logo is provided on the terminal 800, the fingerprint sensor 814 may be integrated with the physical button or the vendor Logo.
The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, processor 801 may control the display brightness of display 805 based on the ambient light intensity collected by optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display 805 is reduced. In another embodiment, the processor 801 may also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 815.
A proximity sensor 816, also called a distance sensor, is provided on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front surface of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 gradually decreases, the processor 801 controls the display 805 to switch from the bright screen state to the dark screen state; when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 becomes gradually larger, the display 805 is controlled by the processor 801 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is not intended to be limiting of terminal 800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In some embodiments, the electronic device is provided as a server. Fig. 9 is a schematic structural diagram of a server according to an exemplary embodiment, where the server 900 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 901 and one or more memories 902, where the memory 902 stores at least one program code, and the at least one program code is loaded and executed by the processors 901 to implement the methods provided by the above method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, which when program code in the storage medium is executed by a processor of an electronic device, enables the electronic device to perform the steps performed by a terminal or a server in the above-described page update method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is further provided, wherein instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the steps performed by the terminal or the server in the above-mentioned page updating method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A page updating method, characterized in that the method comprises:
acquiring a plurality of historical data records carrying indication marks of a target page, wherein the indication marks are used for indicating data models corresponding to components generating the historical data records;
responding to a data model to detect page playback operation, and restoring corresponding data in the data model into historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, wherein the data model corresponds to an indication identifier carried by the target historical data record;
and updating the target page based on the restored data model.
2. The method of claim 1, wherein the data model comprises a detection interface and a data update interface, the detection interface is used for detecting page playback operation of historical data records;
the restoring, in response to a data model detecting a page playback operation and based on a target history data record corresponding to the page playback operation, corresponding data in the data model to history data indicated by the target history data record includes:
in response to the detection interface detecting the page playback operation, invoking the data update interface;
and restoring corresponding data in the data model into historical data indicated by the target historical data record through the data updating interface.
3. The method according to claim 1, wherein the obtaining of multiple history data records of the target page, which carry the indication identifier, comprises:
responding to data updating operation of a data model corresponding to the target page, and updating data in the data model;
and generating a historical data record based on the data updating operation, wherein the historical data record carries the indication mark corresponding to the data model.
4. The method of claim 1, wherein the data model of the component in the target page is stored in a data container, the method further comprising:
and when the data container is operated, generating an indication identifier for the data model according to the identifier of the data container and the identifier of the data model in the data container.
5. The method of claim 4, wherein the identifier of the data model is a component identifier of a corresponding component of the data model, and the indication identifier comprises the data container identifier and the corresponding component identifier.
6. The method of claim 1, wherein updating the target page based on the restored data model comprises:
in response to receiving a data updating message sent by the data model, calling the restored data model through a target component corresponding to the data model;
and re-rendering the target component in the target page according to the data in the restored data model.
7. The method of claim 6, wherein the data model further comprises a subscription component identification indicating a subscription component that invokes the data model;
and the data updating message is a message sent by the data model to a subscription component corresponding to the data model when the data in the data model is reduced.
8. A page update apparatus, characterized in that the apparatus comprises:
the acquisition unit is configured to execute acquisition of a plurality of historical data records carrying indication marks of a target page, wherein the indication marks are used for indicating data models corresponding to components generating the historical data records;
the restoring unit is configured to execute, in response to a data model detecting a page playback operation, restoring corresponding data in the data model to historical data indicated by a target historical data record based on the target historical data record corresponding to the page playback operation, where the data model corresponds to an indication identifier carried by the target historical data record;
and the updating unit is configured to update the target page based on the restored data model.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the page update method of any of claims 1 to 7.
10. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page update method of any of claims 1 to 7.
CN202011508029.2A 2020-12-18 2020-12-18 Page updating method and device, electronic equipment and storage medium Active CN112597417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011508029.2A CN112597417B (en) 2020-12-18 2020-12-18 Page updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011508029.2A CN112597417B (en) 2020-12-18 2020-12-18 Page updating method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112597417A true CN112597417A (en) 2021-04-02
CN112597417B CN112597417B (en) 2024-03-12

Family

ID=75199416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011508029.2A Active CN112597417B (en) 2020-12-18 2020-12-18 Page updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112597417B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253442A (en) * 2021-12-20 2022-03-29 杭州海康机器人技术有限公司 Module processing method and device for foreground and background separation system and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation
CN102902805A (en) * 2012-10-15 2013-01-30 东软集团股份有限公司 Page access method and device
CN103748584A (en) * 2011-08-26 2014-04-23 国际商业机器公司 Automatic detection of item lists within a web page
CN105260424A (en) * 2015-09-28 2016-01-20 北京奇虎科技有限公司 Processing method and apparatus for webpage browsing historical records and most common accesses of user
US20160088036A1 (en) * 2014-09-24 2016-03-24 Sonos, Inc. Playback Updates
CN108769211A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 The method for routing and computer readable storage medium of client device, webpage
CN110109665A (en) * 2018-10-18 2019-08-09 神思旭辉医疗信息技术有限责任公司 A kind of front end UI system and method based on container encapsulation
CN110134902A (en) * 2019-05-14 2019-08-16 北京达佳互联信息技术有限公司 Data information generation method, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611399A (en) * 2007-02-16 2009-12-23 罗凡 Webpage, website modeling and generation
CN103748584A (en) * 2011-08-26 2014-04-23 国际商业机器公司 Automatic detection of item lists within a web page
CN102902805A (en) * 2012-10-15 2013-01-30 东软集团股份有限公司 Page access method and device
US20160088036A1 (en) * 2014-09-24 2016-03-24 Sonos, Inc. Playback Updates
CN105260424A (en) * 2015-09-28 2016-01-20 北京奇虎科技有限公司 Processing method and apparatus for webpage browsing historical records and most common accesses of user
CN108769211A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 The method for routing and computer readable storage medium of client device, webpage
CN110109665A (en) * 2018-10-18 2019-08-09 神思旭辉医疗信息技术有限责任公司 A kind of front end UI system and method based on container encapsulation
CN110134902A (en) * 2019-05-14 2019-08-16 北京达佳互联信息技术有限公司 Data information generation method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253442A (en) * 2021-12-20 2022-03-29 杭州海康机器人技术有限公司 Module processing method and device for foreground and background separation system and storage medium

Also Published As

Publication number Publication date
CN112597417B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN110308956B (en) Application interface display method and device and mobile terminal
CN110569220B (en) Game resource file display method and device, terminal and storage medium
CN108717365B (en) Method and device for executing function in application program
CN110288689B (en) Method and device for rendering electronic map
CN110147503B (en) Information issuing method and device, computer equipment and storage medium
CN111858382A (en) Application program testing method, device, server, system and storage medium
CN108848492B (en) Method, device, terminal and storage medium for starting user identity identification card
CN112612539B (en) Data model unloading method and device, electronic equipment and storage medium
CN112770177B (en) Multimedia file generation method, multimedia file release method and device
CN112118353A (en) Information display method, device, terminal and computer readable storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
CN111008083A (en) Page communication method and device, electronic equipment and storage medium
CN110825465A (en) Log data processing method and device, electronic equipment and storage medium
CN112181915A (en) Method, device, terminal and storage medium for executing service
CN112612540B (en) Data model configuration method, device, electronic equipment and storage medium
CN111694521B (en) Method, device and system for storing file
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN113051015A (en) Page rendering method and device, electronic equipment and storage medium
CN113268234A (en) Page generation method, device, terminal and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN112596810B (en) Loading prompt information display method and device, electronic equipment and storage medium
CN113342645B (en) Method, device, equipment and storage medium for testing business function
CN113064537B (en) Media resource playing method, device, equipment, medium and product

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