CN107256151B - Page rendering processing method and device and terminal - Google Patents

Page rendering processing method and device and terminal Download PDF

Info

Publication number
CN107256151B
CN107256151B CN201710390181.7A CN201710390181A CN107256151B CN 107256151 B CN107256151 B CN 107256151B CN 201710390181 A CN201710390181 A CN 201710390181A CN 107256151 B CN107256151 B CN 107256151B
Authority
CN
China
Prior art keywords
new data
data set
value
historical data
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710390181.7A
Other languages
Chinese (zh)
Other versions
CN107256151A (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 Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710390181.7A priority Critical patent/CN107256151B/en
Publication of CN107256151A publication Critical patent/CN107256151A/en
Application granted granted Critical
Publication of CN107256151B publication Critical patent/CN107256151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The disclosure relates to a page rendering processing method, a page rendering processing device and a terminal, wherein the method comprises the following steps: determining that the md5 value of the new data is different from the md5 value of the history data, when determining that a history data group corresponding to the new data group exists in the history data, if determining that the md5 value of the new data group is the same as the md5 value of the history data group, determining that the history data group is unchanged when determining that the order of the new data group is the same as the order of the history data group, and determining that the history data group is replaced with the new data group when determining that the order of the new data group is different from the order of the history data group, for each new data group in the new data. The content of the page is partially rendered, so that the time consumption for rendering the page is reduced, and the excessive performance of the terminal cannot be consumed; when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.

Description

Page rendering processing method and device and terminal
Technical Field
The present disclosure relates to the field of web page processing technologies, and in particular, to a method, an apparatus, and a terminal for processing page rendering.
Background
The system of the mobile terminal and each application program have different pages. Hybrid mode mobile application (Hybrid App) is gradually becoming the main mode of page coding by virtue of the advantages of high development efficiency, high updating speed, superior experience and the like. For an application program with shorter data timeliness, the page data of the application program needs to be updated frequently; when a user accesses a page of such an application, the terminal often needs to re-render the page to present the latest page to the user.
In the related art, for the same page of an application program in a terminal, the terminal may adopt data a as page rendering data, and then adopt the data a to render a current page, and the terminal may store the data a in a local Storage or a local terminal; and then when the user accesses the page for the second time or the terminal needs to update the page, in order to shorten the page visible time, the data A is often used for rendering, then the terminal acquires new data B of the current page from the remote server, the terminal compares whether the data A and the new data B are the same, and if the data A and the new data B are different, the terminal renders the current page by using the new data B.
However, in the related art, as long as the terminal determines that the data a and the new data B have different places, the terminal replaces the data a with the new data B, and then renders the current page. In such a way, when the difference between the two data is not large, the page is completely re-rendered, so that time is consumed, and the performance of the terminal is consumed; in addition, when the difference between the two pieces of data is not large, the page is also completely re-rendered, so that in the re-rendering process of the page, the page can flash a white screen, a shaking phenomenon occurs, and the user experience is poor.
Disclosure of Invention
In order to solve the problems that rendering time is consumed and the performance of a terminal is consumed in the related technology, a page can flash a white screen and a jitter phenomenon occurs in the process of re-rendering the page, the disclosure provides a page rendering processing method and device and the terminal.
According to a first aspect of the embodiments of the present disclosure, there is provided a processing method for page rendering, including:
acquiring new data of a page to be rendered, and acquiring a message digest Algorithm fifth version (MessageDigest MD5, MD5 for short) value of the new data and an MD5 value of historical data of the page to be rendered;
determining whether the md5 value for the new data is the same as the md5 value for the historical data;
if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set;
for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set.
Further, before determining that the new data group is in the same order as the historical data group and determining that the new data group is in the same order as the historical data group, the method further includes:
determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
and if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set.
Further, the method further comprises:
for each of the new data sets, determining to replace the historical data set with the new data set if the md5 value of the new data set is determined to be different from the md5 value of the historical data set.
Further, the method further comprises:
if the md5 value of the new data is determined to be different from the md5 value of the historical data, for each new data set in the new data, when it is determined that no historical data set corresponding to the new data set exists in the historical data, a new node is obtained according to the new data set, and the new node is added behind a previous node corresponding to the new data set.
Further, the method further comprises:
if the md5 value of the new data is determined to be the same as the md5 value of the historical data, determining that the historical data of the page to be rendered is unchanged.
Further, the acquiring new data of the page to be rendered includes:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the page is rendered, when the new data is determined to be different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a processing apparatus for page rendering, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is configured to acquire new data of a page to be rendered, and acquire the md5 value of the new data and the md5 value of historical data of the page to be rendered;
a first determination module configured to determine whether the md5 value of the new data is the same as the md5 value of the historical data;
a second determination module configured to determine, for each new data group of the new data, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, whether the md5 value of the new data group is the same as the md5 value of the historical data group when it is determined that a historical data group corresponding to the new data group exists in the historical data;
a first rendering module configured to, for each of the new data sets, determine that the historical data set is unchanged when it is determined that the order of the new data sets is the same as the order of the historical data sets if it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set, and determine to replace the historical data set with the new data set when it is determined that the order of the new data set is not the same as the order of the historical data set.
Further, the first rendering module is specifically configured to:
for each new data set in the new data, determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set;
determining that the historical data sets are unchanged when it is determined that the order of the new data sets is the same as the order of the historical data sets, and determining to replace the historical data sets with the new data sets when it is determined that the order of the new data sets is different from the order of the historical data sets.
Further, the apparatus further comprises:
a second rendering module configured to, for each of the new data sets, determine to replace the historical data set with the new data set if it is determined that the md5 value of the new data set is different from the md5 value of the historical data set.
Further, the apparatus further comprises:
a third rendering module configured to, for each new data group in the new data, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, obtain a new node from the new data group when it is determined that the historical data corresponding to the new data group does not exist in the historical data, and add the new node after a previous node corresponding to the new data group.
Further, the apparatus further comprises:
a fourth rendering module configured to determine that the historical data of the page to be rendered is unchanged if it is determined that the md5 value of the new data is the same as the md5 value of the historical data.
Further, the obtaining module is specifically configured to:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the page is rendered, when the new data is determined to be different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: acquiring new data of a page to be rendered, and acquiring an md5 value of the new data and an md5 value of historical data of the page to be rendered; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the page is rendered, when the new data is determined to be different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
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 invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flowchart illustrating a first embodiment of a method for processing page rendering according to an illustrative embodiment;
FIG. 2 is a flowchart illustrating a second embodiment of a method for page rendering according to an illustrative embodiment;
FIG. 3 is a block diagram illustrating a third embodiment of a page rendering processing apparatus, according to an illustrative embodiment;
FIG. 4 is a block diagram illustrating a fourth embodiment of a page rendering processing apparatus according to an illustrative embodiment;
FIG. 5 is a block diagram illustrating entities of a terminal in accordance with an exemplary embodiment;
fig. 6 is a block diagram illustrating a terminal device 800 according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a first embodiment of a page rendering processing method according to an exemplary embodiment, where as shown in fig. 1, the page rendering processing method is used in a terminal, and the terminal includes a mobile terminal, a personal terminal and the like, such as a touch screen mobile phone, a tablet computer, a personal computer and the like, and the method includes the following steps.
In step S11, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of history data of the page to be rendered are acquired.
In this step, the terminal may obtain new data of the current page to be rendered from the remote server, and determine historical data of the current page to be rendered at the same time. Wherein the new data comprises at least one data group, and the historical data comprises at least one data group.
The terminal then determines the md5 value for the new data and the md5 value for the historical data for the page to be rendered. The md5 algorithm is a hash function widely used in the field of computer security to provide integrity protection for messages; md5 functions to allow large volumes of information to be "compressed" into a secure format before the private key is signed by the digital signature software. And md5 can be used for consistency verification of data; md5 is data with the same value, and the content in the data is the same.
In step S12, it is determined whether the md5 value of the new data is the same as the md5 value of the history data.
In this step, the new data will carry md5 value, and the history data will also carry md5 value. The terminal may determine whether the md5 value of the new data is the same as the md5 value of the historical data for determining whether the new data is the same as the historical data.
For example, the terminal saves the data1 when rendering the page for the first time, and when rendering the page for the second time, the terminal compares the md5 values of the data for the two times after acquiring the data2 from the remote server.
In step S13, if it is determined that the md5 value of the new data is different from the md5 value of the history data, it is determined, for each new data group in the new data, whether the md5 value of the new data group is the same as the md5 value of the history data group when it is determined that there is a history data group corresponding to the new data group in the history data.
In this step, if the terminal determines that the md5 value of the new data is different from the md5 value of the history data, the terminal may determine that the new data is different from the history data. Then, the terminal traverses all the new data groups in the new data, traverses each new data group, and compares each new data group in the new data with a historical data group in the historical data.
For each new data group in the new data, the terminal determines whether a history data group corresponding to the new data group exists in the history data. For each new data set in the new data, if the terminal determines that a history data set corresponding to the new data set exists in the history data, the terminal judges whether the md5 value of the new data set is the same as the md5 value of the history data set.
For example, the terminal saves the data1 when rendering the page for the first time, and acquires the data2 from the remote server when rendering the page for the second time; if the terminal determines that the md5 value of the data1 is different from the md5 value of the data2, the terminal traverses all data groups i in the data 2; then, the terminal acquires id _ i of the new data set i, and then the terminal searches whether a history data set data1[ id _ i ] corresponding to the new data set i exists in the data1 according to id _ i; if the terminal finds the historical data group data1[ id _ i ] corresponding to the new data group i, the terminal needs to compare whether the md5 value of the current new data group data2[ id _ i ] is the same as the md5 value of the historical data group data1[ id _ i ].
In step S14, for each new data set of the new data, if it is determined that the md5 value of the new data set is the same as the md5 value of the history data set, it is determined that the history data set is unchanged when it is determined that the order of the new data set is the same as the order of the history data set, and it is determined that the history data set is replaced with the new data set when it is determined that the order of the new data set is different from the order of the history data set.
In this step, after step S13, if the terminal determines that the md5 value of the new data set is the same as the md5 value of the history data set for each new data set in the new data, it needs to determine whether the order of the new data set is the same as the order of the history data set.
Then, for each new data set in the new data, if the terminal determines that the sequence of the new data set is the same as the sequence of the historical data set, determining not to replace the historical data set with the new data set; and for each new data set in the new data, if the sequence of the new data set is different from that of the historical data set, the terminal determines to replace the historical data set with the new data set.
In the embodiment, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of historical data of the page to be rendered are acquired; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value of the new data is different from the md5 value of the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value of the new data set is the same as the md5 value of the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, the historical data set is determined to be unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and the new data set is determined to replace the historical data set when the order of the new data set is determined to be different from the order of the historical data set. When the page is rendered, when the new data is different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
Fig. 2 is a flowchart illustrating a second embodiment of a processing method for page rendering according to an exemplary embodiment, where as shown in fig. 2, the method includes the following steps.
In step S21, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of history data of the page to be rendered are acquired.
The acquiring new data of the page to be rendered includes:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
In this step, the page may be rendered for the first time by using the first-time data, and the first-time data becomes history data. Whether new data corresponding to the historical data of the page to be rendered is acquired needs to be judged first, and when the terminal determines that the new data corresponding to the historical data of the page to be rendered is acquired, the process of performing the embodiment on the page to be rendered is explained, and the subsequent steps are executed. When determining that the new data corresponding to the historical data of the page to be rendered is not acquired, the terminal indicates that the new data corresponding to the historical data does not exist, and then when rendering the current page to be rendered, the terminal directly deletes the historical data, and does not execute the subsequent steps of the embodiment.
When the history data is acquired, the following codes can be adopted:
Figure BDA0001307316570000091
when the present embodiment acquires new data, the following codes may be used:
Figure BDA0001307316570000092
in this embodiment, the first rendering of the page is performed by using the first data, and may be implemented by using the following codes:
Figure BDA0001307316570000093
Figure BDA0001307316570000101
in step S22, it is determined whether the md5 value of the new data is the same as the md5 value of the history data.
In this step, the step is referred to step S12 of fig. 1.
In step S23, if it is determined that the md5 value of the new data is different from the md5 value of the history data, it is determined, for each new data group in the new data, whether the md5 value of the new data group is the same as the md5 value of the history data group when it is determined that there is a history data group corresponding to the new data group in the history data.
In this step, the step is referred to step S13 of fig. 1.
In step S24, for each new data set in the new data, if it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set, determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group; if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set; and if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set. Determining that the historical data sets are unchanged when it is determined that the order of the new data sets is the same as the order of the historical data sets, and determining to replace the historical data sets with the new data sets when it is determined that the order of the new data sets is different from the order of the historical data sets.
In this step, after step S23, if the terminal determines that the md5 value of the new data set is the same as the md5 value of the history data set for each new data set in the new data, it needs to determine whether the order of the new data set is the same as the order of the history data set.
When judging whether the sequence of the new data set is the same as the sequence of the historical data set or not, if the terminal determines that the preamble mark of the new data set and the preamble mark of the historical data set do not exist at the same time, the terminal determines that the sequence of the new data set is the same as the sequence of the historical data set. Or when judging whether the sequence of the new data group is the same as the sequence of the historical data group, if the terminal determines whether the preamble mark of the new data group and the preamble mark of the historical data group exist at the same time, and the preamble mark of the new data group is equal to the preamble mark of the historical data group; the terminal determines that the order of the new data sets is the same as the order of the history data sets. Then, for each new data set in the new data, if the terminal determines that the order of the new data set is the same as the order of the history data set, it determines not to replace the history data set with the new data set.
When judging whether the sequence of the new data set is the same as the sequence of the historical data set, if the terminal determines that the current new data set does not accord with the condition whether the preamble identification of the new data set and the preamble identification of the historical data set do not exist at the same time, and does not accord with the condition whether the preamble identification of the new data set and the preamble identification of the historical data set exist at the same time and the preamble identification of the new data set is equal to the preamble identification of the historical data set, the terminal determines that the sequence of the new data set is different from the sequence of the historical data set. Then, for each new data set in the new data, if the order of the new data set is different from the order of the history data set, the terminal determines to replace the history data set with the new data set.
For example, the terminal saves the data1 when rendering the page for the first time, and acquires the data2 from the remote server when rendering the page for the second time; if the terminal determines that the md5 value of the data1 is different from the md5 value of the data2, the terminal traverses all data groups i in the data 2; setting a prevId attribute by the terminal, wherein the prevId is used for storing the id of the previous page node of the current new data set and setting the initial value of prevId to be null; then, the terminal acquires id _ i of the new data set i, and then the terminal searches whether a history data set data1[ id _ i ] corresponding to the new data set i exists in the data1 according to id _ i; if the terminal finds the historical data group data1[ id _ i ] corresponding to the new data group i, the terminal needs to compare whether the md5 value of the current new data group data2[ id _ i ] is the same as the md5 value of the historical data group data1[ id _ i ]; if the terminal determines that the md5 value of the new data group data2[ id _ i ] is the same as the md5 value of the historical data group data1[ id _ i ], the data is not changed, and then the terminal acquires an identifier prevIdm of a previous page node DOM _ i _ prev of a page node DOM _ i corresponding to the historical data group data1[ id _ i ], and a preamble identifier prevId of the new data group data2[ id _ i ], wherein the preamble identifier prevId is an identifier of a previous page node of the new data group data2[ id _ i ], and the prevIdm is an identifier of a previous page node of the historical data group data1[ id _ i ]. Then if the terminal determines that prevIdm and prevId do not exist at the same time or both do exist at the same time and the prevId is equal to prevIdm, it indicates that the current new data group data2[ id _ i ] and the historical data group data1[ id _ i ] have the same data and the same sequence, and then the terminal does not need to process the historical data group data1[ id _ i ], so that the terminal does not render; on the contrary, it is explained that the current data group data2[ id _ i ] and the history data group data1[ id _ i ] have the same data but have different sequences, and then the terminal deletes the page node DOM _ i, generates a new page node DOM _ i 'from the current new data group data2[ id _ i ], and adds the new page node DOM _ i' to the page. In this process, if prevId is not present, it means that DOM _ i' is the first node, put in the first position, and if prevId is present, render the node after DOM _ i _ prev.
In step S25, for each new data set of the new data, if it is determined that the md5 value of the new data set is different from the md5 value of the historical data set, it is determined to replace the historical data set with the new data set.
In this step, after step S23, if the terminal determines that the md5 value of the new data set is different from the md5 value of the history data set for each new data set in the new data set, it indicates that the history data set has changed, and the terminal needs to determine to replace the history data set with the new data set. Step S24 is not performed at this time, and steps S26-S27 are not performed.
For example, if the terminal determines that the historical data group data1[ id _ i ] exists and determines that the md5 values of the new data group data2[ id _ i ] and the historical data group data1[ id _ i ] are different, the data is changed and needs to be re-rendered; then, the terminal then obtains the identity prevIdm of the previous page node DOM _ i _ prev of the page node DOM _ i corresponding to the historical data group data1[ id _ i ], which is the identity of the previous page node of the new data group data2[ id _ i ], and the preamble identity prevId of the new data group data2[ id _ i ], which is the identity of the previous page node of the historical data group data1[ id _ i ]. Then if the terminal determines that prevIdm and prevId do not exist at the same time or both do exist at the same time and the prevId is equal to prevIdm, the terminal indicates that the data of the current new data group data2[ id _ i ] and the data of the historical data group data1[ id _ i ] are different but have the same sequence, then the terminal renders, deletes the page node DOM _ i, generates a new page node DOM _ i' according to the current new data group data2[ id _ i ], and adds the new page node DOM _ i to the page; on the contrary, it is stated that the current data group data2[ id _ i ] and the historical data group data1[ id _ i ] have different data and different sequences, and then the terminal deletes the page node DOM _ i, generates a new page node DOM _ i 'according to the current new data group data2[ id _ i ], and adds the new page node DOM _ i' to the page. After the traversal of each data group of the new data by the terminal is finished, the terminal acquires a corresponding page node DOM _ prevId according to the prevId, if page nodes exist behind the node, the nodes are indicated to be nodes corresponding to the history data, but do not exist in the current new data, so that all the nodes are deleted, and further the history data which does not correspond to the new data is deleted. After the current diff rendering is completed, the terminal needs to reset the value of prevId to null for the next rendering.
In step S26, if it is determined that the md5 value of the new data is different from the md5 value of the history data, for each new data set in the new data, when it is determined that there is no history data set corresponding to the new data set in the history data, a new node is obtained from the new data set, and the new node is added after a previous node corresponding to the new data set.
In this step, after step S22, for each new data set in the new data, the terminal determines that the md5 value of the new data is different from the md5 value of the history data, and when it is determined that there is no history data set corresponding to the new data set in the history data, the terminal also needs to render a page. Steps S23-S25 are not executed at this time, and step S27 is not executed.
For example, if the terminal determines that the historical data set data1[ id _ i ] does not exist, a new page node DOM _ i is directly obtained according to the new data set data2[ id _ i ], and then the new page node DOM _ i is added after DOM _ i _ prev.
In step S27, if it is determined that the md5 value of the new data is the same as the md5 value of the history data, it is determined that the history data of the page to be rendered is unchanged.
In this step, after step S22, if the terminal determines that the md5 value of the new data is the same as the md5 value of the history data, the terminal determines that the history data is not changed, and does not perform rendering, that is, determines that the history data of the page to be rendered is not changed. Steps S23-S26 are not performed at this time.
The steps of this embodiment can be implemented by the following codes:
Figure BDA0001307316570000131
Figure BDA0001307316570000141
Figure BDA0001307316570000151
Figure BDA0001307316570000161
in the embodiment, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of historical data of the page to be rendered are acquired; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value of the new data is different from the md5 value of the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value of the new data set is the same as the md5 value of the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, the historical data set is determined to be unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and the new data set is determined to replace the historical data set when the order of the new data set is determined to be different from the order of the historical data set. When the page is rendered, when the new data is different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, not replacing the historical data set with the new data set; and for each new data set in the new data, determining to replace the historical data set with the new data set if the md5 value of the new data set is determined to be different from the md5 value of the historical data set; if the md5 value of the new data is determined to be different from the md5 value of the historical data, for each new data set in the new data, when it is determined that the historical data set corresponding to the new data set does not exist in the historical data, a new node is obtained according to the new data set, and the new node is added behind a previous node corresponding to the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
Fig. 3 is a block diagram illustrating a third embodiment of a page rendering processing apparatus according to an exemplary embodiment. Referring to fig. 3, the apparatus includes:
the acquiring module 31 is configured to acquire new data of a page to be rendered, and acquire an md5 value of the new data and an md5 value of historical data of the page to be rendered;
a first determination module 32 configured to determine whether the md5 value of the new data is the same as the md5 value of the historical data;
a second determination module 33 configured to, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, determine, for each new data group of the new data, whether the md5 value of the new data group is the same as the md5 value of the historical data group when it is determined that a historical data group corresponding to the new data group exists in the historical data;
a first rendering module 34 configured to, for each of the new data sets, if it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set, determine that the historical data set is unchanged when it is determined that the order of the new data set is the same as the order of the historical data set, and determine to replace the historical data set with the new data set when it is determined that the order of the new data set is not the same as the order of the historical data set.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of historical data of the page to be rendered are acquired; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value of the new data is different from the md5 value of the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value of the new data set is the same as the md5 value of the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, the historical data set is determined to be unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and the new data set is determined to replace the historical data set when the order of the new data set is determined to be different from the order of the historical data set. When the page is rendered, when the new data is different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
Fig. 4 is a block diagram illustrating a fourth embodiment of a page rendering processing apparatus according to an exemplary embodiment. On the basis of the third embodiment, referring to fig. 4, the first rendering module 34 is specifically configured to:
for each new data set in the new data, determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set;
determining that the historical data sets are unchanged when it is determined that the order of the new data sets is the same as the order of the historical data sets, and determining to replace the historical data sets with the new data sets when it is determined that the order of the new data sets is different from the order of the historical data sets.
The apparatus provided in this embodiment further includes:
a second rendering module 41 configured to, for each new data set of the new data, determine to replace the historical data set with the new data set if it is determined that the md5 value of the new data set is different from the md5 value of the historical data set.
A third rendering module 42 configured to, for each new data group in the new data, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, obtain a new node from the new data group when it is determined that the historical data corresponding to the new data group does not exist in the historical data, and add the new node after the previous node corresponding to the new data group.
A fourth rendering module 43 configured to determine that the historical data of the page to be rendered is unchanged if it is determined that the md5 value of the new data is the same as the md5 value of the historical data.
The obtaining module 31 is specifically configured to:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of historical data of the page to be rendered are acquired; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value of the new data is different from the md5 value of the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value of the new data set is the same as the md5 value of the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, the historical data set is determined to be unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and the new data set is determined to replace the historical data set when the order of the new data set is determined to be different from the order of the historical data set. When the page is rendered, when the new data is different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, not replacing the historical data set with the new data set; and for each new data set in the new data, determining to replace the historical data set with the new data set if the md5 value of the new data set is determined to be different from the md5 value of the historical data set; if the md5 value of the new data is determined to be different from the md5 value of the historical data, for each new data set in the new data, when it is determined that the historical data set corresponding to the new data set does not exist in the historical data, a new node is obtained according to the new data set, and the new node is added behind a previous node corresponding to the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
Fig. 5 is a block diagram illustrating entities of a terminal according to an example embodiment. Referring to fig. 5, the terminal may be embodied as: a processor 51, and a memory 52 configured to store processor-executable instructions;
wherein the processor 51 is configured to: acquiring new data of a page to be rendered, and acquiring an md5 value of the new data and an md5 value of historical data of the page to be rendered; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set.
In the above embodiments, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
With regard to the terminal in the above-described embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method and apparatus, and will not be elaborated herein.
In the embodiment, new data of a page to be rendered is acquired, and an md5 value of the new data and an md5 value of historical data of the page to be rendered are acquired; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value of the new data is different from the md5 value of the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value of the new data set is the same as the md5 value of the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, the historical data set is determined to be unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and the new data set is determined to replace the historical data set when the order of the new data set is determined to be different from the order of the historical data set. When the page is rendered, when the new data is different from the historical data, each new data group in the new data is analyzed and compared with each historical data group in the historical data; for each new data set in the new data, when the md5 value of the new data set is determined to be the same as the md5 value of the historical data set and the order of the new data set is different from the order of the historical data set, re-determining to replace the historical data set with the new data set; and when it is determined that the md5 value of the new data set is the same as the md5 value of the historical data set and the order of the new data set is the same as the order of the historical data set, the historical data set is not replaced with the new data set. The method can partially replace the data group of the page, further partially render the content of the page, reduce the time consumption for rendering the page and avoid consuming excessive performance of the terminal; and when the difference between the two data is not large, the page cannot be completely re-rendered, so that the phenomenon of white screen and jitter of the page cannot be caused in the re-rendering process of the page, and the user experience is improved.
Fig. 6 is a block diagram illustrating a terminal device 800 according to an example embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 6, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the terminal device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 800.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. When the terminal device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 814 includes one or more sensors for providing various aspects of state assessment for terminal device 800. For example, sensor assembly 814 may detect an open/closed status of terminal device 800, the relative positioning of components, such as a display and keypad of terminal device 800, sensor assembly 814 may also detect a change in the position of terminal device 800 or a component of terminal device 800, the presence or absence of user contact with terminal device 800, orientation or acceleration/deceleration of terminal device 800, and a change in the temperature of terminal device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of processing page rendering, the method comprising:
acquiring new data of a page to be rendered, and acquiring an md5 value of the new data and an md5 value of historical data of the page to be rendered;
determining whether the md5 value for the new data is the same as the md5 value for the historical data;
if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set;
for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention 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 invention is limited only by the appended claims.

Claims (11)

1. A processing method for page rendering is characterized by comprising the following steps:
acquiring new data of a page to be rendered, and acquiring an md5 value of a fifth version of a message digest algorithm of the new data and an md5 value of historical data of the page to be rendered;
determining whether the md5 value for the new data is the same as the md5 value for the historical data;
if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set;
for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set;
before the determining that the order of the new data group is the same as the order of the history data group, determining that the history data group is unchanged, and determining that the new data group is different from the order of the history data group, and replacing the history data group with the new data group, further includes:
determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
and if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set.
2. The method of claim 1, further comprising:
for each of the new data sets, determining to replace the historical data set with the new data set if the md5 value of the new data set is determined to be different from the md5 value of the historical data set.
3. The method of claim 1, further comprising:
if the md5 value of the new data is determined to be different from the md5 value of the historical data, for each new data set in the new data, when it is determined that no historical data set corresponding to the new data set exists in the historical data, a new node is obtained according to the new data set, and the new node is added behind a previous node corresponding to the new data set.
4. The method according to any one of claims 1-3, further comprising:
if the md5 value of the new data is determined to be the same as the md5 value of the historical data, determining that the historical data of the page to be rendered is unchanged.
5. The method according to any one of claims 1 to 3, wherein the obtaining new data of the page to be rendered comprises:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
6. A processing apparatus for page rendering, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is configured to acquire new data of a page to be rendered, and acquire the md5 value of the new data and the md5 value of historical data of the page to be rendered;
a first determination module configured to determine whether the md5 value of the new data is the same as the md5 value of the historical data;
a second determination module configured to determine, for each new data group of the new data, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, whether the md5 value of the new data group is the same as the md5 value of the historical data group when it is determined that a historical data group corresponding to the new data group exists in the historical data;
a first rendering module configured to, for each of the new data sets, determine that the historical data set is unchanged when the new data set is determined to have the same md5 value as the historical data set if the new data set is determined to have the same md5 value as the historical data set, and determine to replace the historical data set with the new data set when the new data set is determined to have the same order as the historical data set;
the first rendering module is specifically configured to:
for each new data set in the new data, determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set;
determining that the historical data sets are unchanged when it is determined that the order of the new data sets is the same as the order of the historical data sets, and determining to replace the historical data sets with the new data sets when it is determined that the order of the new data sets is different from the order of the historical data sets.
7. The apparatus of claim 6, further comprising:
a second rendering module configured to, for each of the new data sets, determine to replace the historical data set with the new data set if it is determined that the md5 value of the new data set is different from the md5 value of the historical data set.
8. The apparatus of claim 6, further comprising:
a third rendering module configured to, for each new data group in the new data, if it is determined that the md5 value of the new data is different from the md5 value of the historical data, obtain a new node from the new data group when it is determined that the historical data corresponding to the new data group does not exist in the historical data, and add the new node after a previous node corresponding to the new data group.
9. The apparatus of any of claims 6-8, further comprising:
a fourth rendering module configured to determine that the historical data of the page to be rendered is unchanged if it is determined that the md5 value of the new data is the same as the md5 value of the historical data.
10. The apparatus according to any of claims 6-8, wherein the obtaining module is specifically configured to:
determining whether new data corresponding to the historical data of the page to be rendered is acquired;
if determining that new data corresponding to the historical data of the page to be rendered is acquired, executing the step of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered;
and if the new data corresponding to the historical data of the page to be rendered is determined not to be acquired, deleting the historical data, and not executing the steps of acquiring the md5 value of the new data and the md5 value of the historical data of the page to be rendered.
11. A terminal, comprising:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: acquiring new data of a page to be rendered, and acquiring an md5 value of the new data and an md5 value of historical data of the page to be rendered; determining whether the md5 value for the new data is the same as the md5 value for the historical data; if it is determined that the md5 value for the new data is not the same as the md5 value for the historical data, then for each new data set in the new data, upon determining that a historical data set corresponding to the new data set exists in the historical data, determining whether the md5 value for the new data set is the same as the md5 value for the historical data set; for each new data set in the new data, if the md5 value of the new data set is determined to be the same as the md5 value of the historical data set, determining that the historical data set is unchanged when the order of the new data set is determined to be the same as the order of the historical data set, and determining that the historical data set is replaced by the new data set when the order of the new data set is determined to be different from the order of the historical data set;
wherein, before determining that the new data group is in the same order as the historical data group, determining that the historical data group is unchanged, and determining that the new data group is in the same order as the historical data group, and determining that the historical data group is replaced by the new data group, the method further comprises:
determining that the order of the new data set and the order of the historical data set meet a first condition or a second condition; wherein the first condition is whether the preamble identification of the new data group and the preamble identification of the historical data group do not exist at the same time; the second condition is whether the preamble identification of the new data group and the preamble identification of the historical data group exist at the same time, and the preamble identification of the new data group is equal to the preamble identification of the historical data group;
if the sequence of the new data set and the sequence of the historical data set are determined to meet the first condition or the second condition, determining that the sequence of the new data set is the same as the sequence of the historical data set;
and if the sequence of the new data set and the sequence of the historical data set are determined not to accord with the first condition and the second condition, determining that the sequence of the new data set is different from the sequence of the historical data set.
CN201710390181.7A 2017-05-27 2017-05-27 Page rendering processing method and device and terminal Active CN107256151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710390181.7A CN107256151B (en) 2017-05-27 2017-05-27 Page rendering processing method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710390181.7A CN107256151B (en) 2017-05-27 2017-05-27 Page rendering processing method and device and terminal

Publications (2)

Publication Number Publication Date
CN107256151A CN107256151A (en) 2017-10-17
CN107256151B true CN107256151B (en) 2020-09-11

Family

ID=60027425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710390181.7A Active CN107256151B (en) 2017-05-27 2017-05-27 Page rendering processing method and device and terminal

Country Status (1)

Country Link
CN (1) CN107256151B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255486B (en) * 2017-12-19 2021-12-10 东软集团股份有限公司 View conversion method and device for form design and electronic equipment
CN111741257B (en) * 2020-05-21 2022-01-28 深圳市商汤科技有限公司 Data processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526916A (en) * 2008-03-03 2009-09-09 阿里巴巴集团控股有限公司 Method and system for using page-based object flow verification in regression test
CN102624871A (en) * 2012-02-03 2012-08-01 杭州杰唐信息技术有限公司 Remote file synchronizing method realized based on distributed enterprise service bus
CN104965848A (en) * 2015-02-12 2015-10-07 腾讯科技(深圳)有限公司 Front-end resource loading method and apparatus
CN105607927A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Page display method and apparatus
CN106528578A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 An information display method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808618B (en) * 2014-12-31 2019-10-22 阿里巴巴集团控股有限公司 The storage of Feed data and querying method and its device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526916A (en) * 2008-03-03 2009-09-09 阿里巴巴集团控股有限公司 Method and system for using page-based object flow verification in regression test
CN102624871A (en) * 2012-02-03 2012-08-01 杭州杰唐信息技术有限公司 Remote file synchronizing method realized based on distributed enterprise service bus
CN104965848A (en) * 2015-02-12 2015-10-07 腾讯科技(深圳)有限公司 Front-end resource loading method and apparatus
CN106528578A (en) * 2015-09-15 2017-03-22 阿里巴巴集团控股有限公司 An information display method and device
CN105607927A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Page display method and apparatus

Also Published As

Publication number Publication date
CN107256151A (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN105511949B (en) Verification code filling method and device and mobile terminal
CN106897937B (en) Method and device for displaying social sharing information
CN104462296B (en) File management method and device and terminal
CN109388625B (en) Method and device for processing configuration file in multi-distributed file system
CN105808305B (en) Static resource loading method and device
CN107094094B (en) Application networking method and device and terminal
RU2645282C2 (en) Method and device for calling via cloud-cards
CN106775903B (en) Security policy file updating method and device
CN108989062B (en) Method, device, terminal, system and storage medium for updating group member data
CN107423146B (en) Method, device and system for controlling mutual calling of application programs
CN108280342B (en) Application synchronization method and device for application synchronization
CN107256151B (en) Page rendering processing method and device and terminal
CN105095296B (en) File management method and device
CN106919679B (en) Log replay method, device and terminal applied to distributed file system
CN110928425A (en) Information monitoring method and device
CN106506808B (en) Method and device for prompting communication message
CN109522286B (en) Processing method and device of file system
CN107070816B (en) Application identification method and device and mobile terminal
CN110764847A (en) User information processing method and device, electronic equipment and storage medium
CN106712960B (en) Processing method and device of verification code information
CN112351131B (en) Control method and device of electronic equipment, electronic equipment and storage medium
CN110457084B (en) Loading method and device
CN109948012B (en) Serial number generation method and device and storage medium
CN108509641B (en) File backup method, device, server and system
CN109032583B (en) Data interaction 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
GR01 Patent grant
GR01 Patent grant