CN110659098B - Data updating method and device, terminal equipment and storage medium - Google Patents

Data updating method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110659098B
CN110659098B CN201910900521.5A CN201910900521A CN110659098B CN 110659098 B CN110659098 B CN 110659098B CN 201910900521 A CN201910900521 A CN 201910900521A CN 110659098 B CN110659098 B CN 110659098B
Authority
CN
China
Prior art keywords
page
data
updated
original data
updating
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
CN201910900521.5A
Other languages
Chinese (zh)
Other versions
CN110659098A (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 Urban Network Neighbor Information Technology Co Ltd
Original Assignee
Beijing Urban Network Neighbor 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 Urban Network Neighbor Information Technology Co Ltd filed Critical Beijing Urban Network Neighbor Information Technology Co Ltd
Priority to CN201910900521.5A priority Critical patent/CN110659098B/en
Publication of CN110659098A publication Critical patent/CN110659098A/en
Application granted granted Critical
Publication of CN110659098B publication Critical patent/CN110659098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

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)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a data updating method, a data updating device, terminal equipment and a storage medium, and aims to improve the network transmission performance of an applet and improve user experience. The method comprises the following steps: the method comprises the steps that a main process of an applet starts a current display page thread to render a current display page, when the updating operation of a user on first display content of the current display page is detected, first original data used for rendering the first display content are obtained from display data of the current display page, an updating function of the current display page is called, the first original data are updated to updated data, second display content identical to the first display content in a parent page of the current display page is obtained, second original data used for rendering the second display content are obtained from the display data of the parent page, whether the second original data need to be updated or not is determined according to the updated data, and under the condition that the updating is needed, the updating function of the parent page is called, and the second original data are updated to the updated data.

Description

Data updating method and device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data updating method, apparatus, terminal device, and storage medium.
Background
Nowadays, the internet is rapidly developed, and small programs are seen everywhere. The applet is an application which can be used without downloading and installing, realizes the dream of 'being reachable by a touch hand' of the application, and can be opened by scanning or searching by a user.
In the process of using the applet, a user often opens a plurality of layers of sub-pages after opening a certain page, so that a multi-layer applet page stack is formed, namely: applet multi-level route nesting. If a user performs related operations on a certain layer of page stack and updates page data, when a parent page is returned (including multi-layer return), the user expects that related data of other parent applet pages can be updated in real time, however, the existing updating mode of the parent page data is not ideal, so that the network transmission performance is poor, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides a data updating method, a data updating device, terminal equipment and a storage medium, and aims to improve the network transmission performance of an applet and improve the user experience.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data updating method, which is applied to an application installed on a user terminal, where an applet runs on the application, and the method includes:
enabling a current display page thread by a main process of the small program to render a current display page;
when the updating operation of a user on the first display content of the current display page is detected, acquiring first original data for rendering the first display content from display data of the current display page;
calling an updating function of the current display page, and updating the first original data into updated data;
acquiring second display content which is the same as the first display content in a parent page of the current display page;
acquiring second original data for rendering the second display content from the display data of the parent page;
determining whether the second original data needs to be updated according to the updated data;
and under the condition that the second original data needs to be updated, calling an updating function of the parent page, and updating the second original data into the updated data.
Optionally, after the updating function of the current display page is called and the first original data is updated to the updated data, the method further includes:
using the updated data to perform local rendering on the area where the first original data is located;
after the updating function of the parent page is called and the second original data is updated to the updated data, the method further includes:
and locally rendering the area where the second original data is located by using the updated data, and keeping the position of the scroll bar of the parent page unchanged.
Optionally, the method further comprises:
detecting a return operation of a user during the display of the current display page by the application;
and under the condition of keeping the position of the scroll bar unchanged, displaying the partially rendered parent page.
Optionally, determining whether the second original data needs to be updated according to the updated data includes:
comparing the updated data with the second original data to determine whether the second original data needs to be updated;
wherein, in a case that the updated data is different from the second original data, it is determined that the second original data needs to be updated.
Optionally, the current display page is obtained by multiple page jumps from an initial page after the applet is started, and the parent page includes the initial page stored in a page stack and a parent page to which the page jumps each time;
calling an update function of the parent page, and updating the second original data into the updated data, including:
calling an updating function of the initial page, and updating second original data on the initial page into the updated data;
and calling an updating function of the page aiming at the parent page to which the page jumps each time, and updating the second original data on the page into the updated data.
In a second aspect, an embodiment of the present invention additionally provides a data updating apparatus, where the apparatus is applied to an application installed on a user terminal, and an applet runs on the application, and the apparatus includes:
the enabling module is used for enabling a current display page thread by a main process of the applet so as to render a current display page;
the first obtaining module is used for obtaining first original data used for rendering first display content from display data of the current display page when the updating operation of a user on the first display content of the current display page is detected;
the first updating module is used for calling an updating function of the current display page and updating the first original data into updated data;
the second acquisition module is used for acquiring second display content which is the same as the first display content in a parent page of the current display page;
a third obtaining module, configured to obtain, from the display data of the parent page, second original data used for rendering the second display content;
the determining module is used for determining whether the second original data needs to be updated according to the updated data;
and the second updating module is used for calling an updating function of the parent-level page under the condition that the second original data needs to be updated, and updating the second original data into the updated data.
Optionally, the apparatus further comprises:
the first local rendering module is used for performing local rendering on the area where the first original data is located by using the updated data;
and the second partial rendering module is used for performing partial rendering on an area where second original data of the data needing to be updated on the parent page is located by using the updated data, and keeping the position of a scroll bar of the parent page unchanged.
Optionally, the apparatus further comprises:
the detection module is used for detecting the return operation of a user during the period of displaying the current display page through the application program;
and the returning module is used for displaying the parent page after the partial rendering under the condition of keeping the position of the scroll bar unchanged.
Optionally, the determining module includes:
a comparison submodule, configured to compare the updated data with the second original data to determine whether the second original data needs to be updated;
and the determining submodule is used for determining that the second original data needs to be updated under the condition that the updated data is different from the second original data.
Optionally, the current display page is obtained by multiple page jumps from an initial page after the applet is started, and the parent page includes the initial page stored in a page stack and a parent page to which the page jumps each time; the second update module includes:
the first updating submodule is used for calling an updating function of the initial page and updating second original data on the initial page into the updated data;
and the second updating submodule is used for calling an updating function of the page aiming at the parent page to which the page jumps each time, and updating the second original data on the page into the updated data.
In a third aspect, an embodiment of the present invention additionally provides a terminal device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data updating method as described in the previous first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data updating method according to the first aspect.
In the embodiment of the invention, when an applet is run on an application program installed on a user terminal, a main process of the applet starts a current display page thread to render a current display page, when an updating operation of a user on first display content of the current display page is detected, first original data for rendering the first display content is obtained from display data of the current display page, an updating function of the current display page is called to update the first original data into updated data, second display content identical to the first display content in a parent page of the current display page is obtained, second original data for rendering the second display content is obtained from display data of the parent page, and whether the second original data needs to be updated or not is determined according to the updated data, and under the condition that the second original data needs to be updated, calling an updating function of the parent page, and updating the second original data into the updated data.
By adopting the data updating method provided by the embodiment of the invention, the first original data corresponding to the first display content can be updated in time when the updating operation of the first display content on the current display page by the user is detected, meanwhile, the second original data needing to be updated on the parent page can be updated in real time through the updating function of the parent page, the data needing to be updated is not required to be acquired from the subprogram parent page on the current display page, the network transmission consumed for acquiring the relevant data information of the parent page is reduced, the network transmission performance is optimized, meanwhile, the user does not sense in the data updating process, and the user experience is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without inventive labor.
FIG. 1 is a flow chart of the steps of a data update method in an embodiment of the present invention;
FIG. 2 is a block flow diagram of a data update method in an embodiment of the invention;
FIG. 3 is a schematic structural diagram of a data updating apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a terminal device in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Before explaining a data updating method provided by the present disclosure, a related art to which the present disclosure relates will be explained first.
The applet is an application which can be used without downloading and installing, realizes the dream of 'being reachable by a touch' of the application, and can be opened by scanning or searching by a user, such as a WeChat applet.
Nowadays, the internet is rapidly developed, and small programs are seen everywhere. During the use of the small program, a user often opens a plurality of layers of pages after opening a certain page, so that the small program multi-level routing nesting is formed. The method comprises the steps that a small program is controlled by a small program frame in a routing mode, the small program maintains all pages of the current small program in a page stack mode, namely, in the routing of the small program pages, the small program frame manages all the pages through the design of a page stack. If a user performs a relevant operation on a certain layer of page and updates page data, when a parent page is returned (including multiple layers of return), the user himself expects relevant data of other parent applet page stacks to be updated in real time. Compared with the page opened later, the page opened first is a parent page, and the page opened later is a child page.
In order to help developers to develop and debug applets conveniently and efficiently, the existing applets provide complete page life cycle functions for the developers, wherein the complete page life cycle functions comprise onLoad, onReady, onShow, onHide and the like, so that the developers can complete related function development more quickly and conveniently, and the onShow life cycle functions are triggered when pages are monitored to be displayed. In the case of the nesting of the multiple levels of routing of the applets, if a user performs a relevant operation on a certain page and updates page data, and then returns to the parent page step by step, the onShow lifecycle functions of the parent page are all triggered, and developers can add processing logic to the onShow lifecycle functions of multiple parent applet pages respectively, so that the relevant data of the parent page is updated in real time.
Due to the processing logic added in the onShow lifecycle function of the parent applet page, if the relevant data of the parent page is updated in real time, the relevant data information of the parent page needs to be re-acquired and the page corresponding module needs to be re-rendered. This operation results in the following drawbacks:
(1) re-acquiring page related data information requires consuming a certain amount of network transmission, and consumes bandwidth in terms of performance.
(2) The re-rendering of the corresponding module of the page needs a certain time, the user has waiting time, and the experience level is not friendly.
(3) If the data is related to pagination, such as a list, the situation of the previous pagination is influenced by re-acquiring the data, and when the user returns to the parent page, the page scroll bar slides to the top without corresponding to the initial position.
The above-mentioned drawbacks result in a poor user experience. After finding the defects of the related art, the applicant provides a data updating method, which can solve the defects and improve the user experience. The data update method is described in detail below.
Referring to fig. 1 and 2, fig. 1 is a flowchart illustrating steps of a data updating method in an embodiment of the present invention, where the method is applied to an application installed on a user terminal, and an applet runs on the application. As shown in fig. 1, the data updating method includes the following steps:
step S101, the main process of the small program starts a current display page thread to render a current display page.
In this embodiment, opening one applet will run the main process of the applet, and each time a user opens one page, the main process of the applet will open at least one WebView thread, for example, opening 4 pages will open at least 4 WebView threads. The currently displayed page is a page which is opened last and can be displayed to the user currently. The main process of the applet renders the current display page by enabling the thread of the current display page, thereby enabling a user to view the current display page on the application program.
It should be noted that, the terminal in this embodiment may be an intelligent device (such as a smart phone), a computer, or a tablet computer, and this embodiment does not specifically limit the terminal.
Step S102, when the updating operation of the first display content of the current display page by the user is detected, obtaining first original data used for rendering the first display content from the display data of the current display page.
In this embodiment, the first display content refers to content that can be operated and updated by a user and is displayed on a current display page, and the user performs an update operation on the first display content of the current display page, which may specifically be a mouse click operation, a finger click operation, or a key input operation, and may also be another operation that can be used to update the first display content of the current display page, which is not limited here.
The content displayed on the applet page is rendered by the corresponding data. Therefore, when the updating operation of the user on the first display content of the current display page is detected, the current display page thread can acquire the first original data for rendering the first display content from the display data of the current display page.
Illustratively, the user opens A, B, C, D these 4 pages in turn, and suppose that page C is a fruit shop page, and three products, apple, orange and peach, are sold, and each product has a corresponding collection button. And then the user opens the apple detail page (the current display page D), a collection button is also arranged in the apple detail page, and the user selects the collection button in the current display page D in a clicking mode. In this example, the favorite button on the apple detail page is the first display content, and the clicking operation of the user on the favorite button on the apple detail page is the updating operation of the user on the first display content of the currently displayed page. When the small program detects that a user clicks a collection button on an apple detail page, first original data used for rendering the collection button can be obtained from display data corresponding to the apple detail page.
Step S103, calling an updating function of the current display page, and updating the first original data into updated data.
In this embodiment, an update function is preset in each page, an update function of a current display page is preset in a current display page, and a parent page function is preset in a parent page. And the updating function of the current display page is used for updating the first original data of the current display page into updated data according to the updating operation of the user on the first display content on the current display page. That is, after the first original data is acquired in step S102, the current display page thread can call an update function of the current display page to update the first original data to the updated data.
In specific application, the current display page thread can acquire a page object of the current display page, the page object contains all information and binding functions of the current display page, and the update function of the current display page is contained, so that the update function of the current display page is called through the current display page thread.
Step S104, second display content which is the same as the first display content in a parent page of the current display page is obtained.
In this embodiment, the parent page and the current display page may have the same display content, that is, the second display content of the parent page is the same as the first display content of the current display page, for example, the parent display page includes a favorite button of an apple, and the current display page also includes a favorite button of an apple, and at this time, the second display content, which is the same as the first display content, in the parent page of the current display page may be obtained.
In this embodiment, the number of the parent pages may be one or multiple, and still taking A, B, C, D4 pages in which the user opens the applet on the application program in sequence as an example, compared with a page opened later, the page opened first is a parent page, the page opened later is a child page, that is, the page D is a currently displayed page or is called a child page, and the page a, the page B, and the page C are parent pages relative to the page D. In one possible embodiment, it is possible that page B and page C have second display content that is the same as the first display content, while page A does not have second display content that is the same as the first display content.
Step S105, obtaining second original data for rendering the second display content from the display data of the parent page.
After the second display content identical to the first display content is acquired, second original data for rendering the second display content may be acquired from the display data of the parent page.
And step S106, determining whether the second original data needs to be updated according to the updated data.
In this embodiment, it is considered that updating the first original data on the current display page does not necessarily result in updating the second original data on the parent page, and therefore, whether the second original data needs to be updated may be determined according to the updated data. In particular, the updated data may be compared to second original data to determine whether the second original data needs to be updated.
And comparing the updated data with the second original data to obtain two results, wherein one result is that the updated data is different from the second original data, and at the moment, the second original data needs to be updated, and the other result is that the updated data is the same as the second original data, and at the moment, the second original data does not need to be updated. In this embodiment, whether the second original data needs to be updated can be accurately determined by comparing whether the updated data is the same as the second original data.
Step S107, when the second original data needs to be updated, an update function of the parent page is called, and the second original data is updated to the updated data.
In this embodiment, a parent page update function associated with data established on the current display page is preset in the parent page, and the update function of the parent page is used to update the second original data that needs to be updated on the parent page to the updated data according to the updated data, that is, after it is determined in step S106 that the second original data needs to be updated, the parent page thread can call the update function of the parent page to update the second original data to the updated data.
During specific application, the parent page thread can acquire a page object of the parent page, the page object contains all information and binding functions of the parent page, and the update function of the parent page is contained, so that the update function of the parent page is called through the parent page thread.
By executing the data updating method comprising the steps S101 to S107, when an applet runs on an application installed in a user terminal, a main process of the applet enables a current display page thread to render a current display page, when an updating operation of a user on first display content of the current display page is detected, first original data for rendering the first display content is acquired from display data of the current display page, an updating function of the current display page is called to update the first original data to updated data, second display content identical to the first display content in a parent page of the current display page is acquired, second original data for rendering the second display content is acquired from display data of the parent page, and whether the second original data needs to be updated is determined according to the updated data, and under the condition that the second original data needs to be updated, calling an updating function of the parent page, and updating the second original data into the updated data. By the method, when the updating operation of the first display content on the current display page by the user is detected, the first original data corresponding to the first display content can be updated in time, meanwhile, the second original data needing to be updated on the parent page can be updated in real time through the updating function of the parent page, the data needing to be updated are not required to be acquired from the small program parent page on the current display page, network transmission consumed for acquiring relevant data information of the parent page is reduced, network transmission performance is optimized, meanwhile, the user does not feel during the data updating process, and user experience is improved.
In this embodiment, the first original data and the updated data of the current display page are both background data, and cannot be visually seen and operated by the user, but only after rendering, can be seen and operated. Therefore, in order to intuitively display the updated data to the user, after the update function of the current display page is called to update the first original data into the updated data, the current display page thread may perform local rendering on the area where the first original data is located by using the updated data, so as to obtain the updated first display content.
For example, before the update operation by the user, the favorite button of the apple details page is in a gray state, and after the update operation, the favorite button of the apple details page is in a lighted state after partial rendering with the updated data, and other areas such as the purchase state of the apple details page are not changed.
In this embodiment, the second original data and the updated data on the parent page are also background data, and similarly, after the update function of the parent page is called and the second original data is updated to the updated data, the parent page thread may use the updated data to perform local rendering on the area where the second original data is located, and keep the position of the scroll bar of the parent page unchanged, so as to obtain the updated second display content.
For example, the apple favorite button on the parent page (fruit shop page) is in a gray state before the user update operation, and after the update operation and partial rendering with the updated data, the apple favorite button on the fruit shop page is in a lit state, and other areas such as the purchase state on the fruit shop page are not changed.
In this embodiment, the updated data of the first original data is used to perform local rendering on the area where the first original data is located, the updated data is used to perform local rendering on the area where the second original data is located, and the position of the scroll bar of the parent page is kept unchanged, where the local rendering refers to local refreshing of the page, that is, only the area where the data is changed is refreshed, and the area where the data is not changed is not refreshed, so that consumed network transmission can be reduced, the performance of the applet is optimized, and the position of the scroll bar of the parent page is kept unchanged, so that the user can return to the position where the user clicks the child page when returning to the parent page, and user experience is further improved.
In an embodiment of the application, when a plurality of parent pages are provided, the current display page is obtained by page jumping for a plurality of times from an initial page initialized by an applet, and the initial page and the pages to which the pages jump except the current display page each time are both parent pages of the current display page, so that the parent pages also include the initial page stored in a page stack and the pages to which the pages jump each time.
In this embodiment, the initial page refers to a page that is opened by the applet first. Still take the example that the user opens A, B, C, D4 pages of the applet on the application in turn, where page a, page B, and page C are all parent pages of page D, and page a is also the original page.
When the parent page includes the initial page stored in the page stack and the page to which the page jumps each time, the update function of the parent page is called to update the second original data to the updated data, and specifically, the following steps may be performed:
step S1071, call an update function of the initial page, and update the second original data on the initial page to updated data.
Step S1072, for the page to which the page jumps each time, call the update function of the page, and update the second original data on the page to the updated data.
At this time, considering that there are a plurality of parent pages, and a plurality of parent pages are updated simultaneously, an optional implementation is as follows:
and asynchronously sending the updated data to the initial page and the parent-level page thread corresponding to the page to which the page is jumped each time through the current display page thread.
In this embodiment, the asynchronous sending refers to a communication mode in which after the current display page thread sends the updated data, the next updated data is directly sent without waiting for the received parent page to send back a response, so that multiple parent pages can respond simultaneously, and the purpose of sending the first original data simultaneously is further achieved.
In the embodiment, after the first original data of the current display page is updated, the plurality of parent page threads call the update function of each page to update the second original data of the plurality of parent pages, which needs to be updated, in real time, and a user does not perceive in the data update process, so that the situation that the execution is performed in the onShow life cycle function in the plurality of parent applet page stacks in the prior art is avoided, and the user experience is improved.
Furthermore, it is considered that there is usually an operation of returning to the parent page after the user finishes the operation on the current display page, and more than the user wants to be able to directly return to the original position of the up-and-down sliding scroll bar on the side of the parent page when returning to the parent page, i.e. the position of entering the current display page from the parent page, because it is more convenient to continue browsing from this position.
Based on the above consideration, in order to further improve the user experience, the present invention may further perform the following steps:
step S310, detecting the returning operation of the user during the period of displaying the current display page through the application program;
and step S320, under the condition that the position of the scroll bar is kept unchanged, displaying the parent page after partial rendering.
In this embodiment, after the first original data of the current display page is updated, the second original data that needs to be updated on the parent page is updated immediately, so that when the current display page detects a return operation of the user on the current display page, that is, when the user returns to the parent page, the second original data that needs to be updated on the parent page is updated and rendered in advance, and at this time, the parent page does not re-request data due to updating of the second original data, so that when the parent page is returned, the position of the up-down sliding page scroll bar arranged on the side edge of the parent page is unchanged, and user experience is improved.
Based on the same inventive concept, an embodiment of the present invention provides a data updating apparatus, which is applied to an application installed on a user terminal, and on which an applet runs. Referring to fig. 3, fig. 3 is a schematic diagram of a data updating apparatus 300 according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes:
an enabling module 301, configured to enable a current display page thread by a main process of the applet, so as to render a current display page.
A first obtaining module 302, configured to, when an update operation of a user on first display content of the current display page is detected, obtain first original data used for rendering the first display content from display data of the current display page.
The first updating module 302 is configured to invoke an updating function of the current display page, and update the first original data to updated data.
A second obtaining module 304, configured to obtain a second display content, which is the same as the first display content, in a parent page of the current display page.
A third obtaining module 305, configured to obtain, from the display data of the parent page, second original data for rendering the second display content.
A determining module 306, configured to determine whether the second original data needs to be updated according to the updated data.
A second updating module 307, configured to call an updating function of the parent page to update the second original data to the updated data when the second original data needs to be updated.
Optionally, the apparatus further comprises:
and the first local rendering module is used for locally rendering the area where the first original data is located by using the updated data.
And the second partial rendering module is used for performing partial rendering on an area where second original data of the data needing to be updated on the parent page is located by using the updated data, and keeping the position of a scroll bar of the parent page unchanged.
Optionally, the apparatus further comprises:
and the detection module is used for detecting the return operation of the user during the period of displaying the current display page through the application program.
And the returning module is used for displaying the parent page after the partial rendering under the condition of keeping the position of the scroll bar unchanged.
Optionally, the determining module includes:
and the comparison submodule is used for comparing the updated data with the second original data so as to determine whether the second original data needs to be updated.
And the determining submodule is used for determining that the second original data needs to be updated under the condition that the updated data is different from the second original data.
Optionally, the current display page is obtained by multiple page jumps from an initial page after the applet is started, and the parent page includes the initial page stored in a page stack and a parent page to which the page jumps each time; the second update module includes:
the first updating submodule is used for calling an updating function of the initial page and updating second original data on the initial page into the updated data;
and the second updating submodule is used for calling an updating function of the page aiming at the parent page to which the page jumps each time, and updating the second original data on the page into the updated data.
Fig. 4 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention.
The terminal device 400 includes but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the terminal apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The terminal device 400 further comprises at least one sensor 405, such as light sensors, motion sensors and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or the backlight when the terminal apparatus 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the terminal device, which is not limited herein.
The interface unit 408 is an interface for connecting an external device to the terminal apparatus 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 400 or may be used to transmit data between the terminal apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the terminal device. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The terminal device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 400 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal device, including: the processor 410, the memory 409, and a computer program stored in the memory 409 and capable of running on the processor 410, where the computer program, when executed by the processor 410, implements each process of the above-described cheating determination method embodiment, and can achieve the same technical effect, and are not described herein again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the above cheating determination method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A data updating method applied to an application installed on a user terminal, the application having an applet running thereon, the method comprising:
enabling a current display page thread by a main process of the small program to render a current display page;
when the updating operation of a user on the first display content of the current display page is detected, acquiring first original data for rendering the first display content from display data of the current display page;
calling an updating function of the current display page, and updating the first original data into updated data;
acquiring second display content which is the same as the first display content in a parent page of the current display page;
acquiring second original data for rendering the second display content from the display data of the parent page;
determining whether the second original data needs to be updated according to the updated data;
and under the condition that the second original data needs to be updated, calling an updating function of the parent page, and updating the second original data into the updated data.
2. The method of claim 1, after invoking an update function of the current display page to update the first original data to updated data, further comprising:
using the updated data to perform local rendering on the area where the first original data is located;
after the updating function of the parent page is called and the second original data is updated to the updated data, the method further includes:
and locally rendering the area where the second original data is located by using the updated data, and keeping the position of the scroll bar of the parent page unchanged.
3. The method of claim 2, further comprising:
detecting a return operation of a user during the display of the current display page by the application;
and under the condition of keeping the position of the scroll bar unchanged, displaying the partially rendered parent page.
4. The method of claim 1, wherein determining whether the second original data needs to be updated based on the updated data comprises:
comparing the updated data with the second original data to determine whether the second original data needs to be updated;
wherein, in a case that the updated data is different from the second original data, it is determined that the second original data needs to be updated.
5. The method according to claim 1, wherein the current display page is obtained from an initial page after the applet starts and through a plurality of page jumps, and the parent page comprises the initial page stored in a page stack and a parent page to which each page jump is made;
calling an update function of the parent page, and updating the second original data into the updated data, including:
calling an updating function of the initial page, and updating second original data on the initial page into the updated data;
and calling an updating function of the page aiming at the parent page to which the page jumps each time, and updating the second original data on the page into the updated data.
6. A data update apparatus applied to an application installed on a user terminal, the application having an applet running thereon, the apparatus comprising:
the enabling module is used for enabling a current display page thread by a main process of the applet so as to render a current display page;
the first obtaining module is used for obtaining first original data used for rendering first display content from display data of the current display page when the updating operation of a user on the first display content of the current display page is detected;
the first updating module is used for calling an updating function of the current display page and updating the first original data into updated data;
the second acquisition module is used for acquiring second display content which is the same as the first display content in a parent page of the current display page;
a third obtaining module, configured to obtain, from the display data of the parent page, second original data used for rendering the second display content;
the determining module is used for determining whether the second original data needs to be updated according to the updated data;
and the second updating module is used for calling an updating function of the parent-level page under the condition that the second original data needs to be updated, and updating the second original data into the updated data.
7. The apparatus of claim 6, further comprising:
the first local rendering module is used for performing local rendering on the area where the first original data is located by using the updated data;
and the second partial rendering module is used for performing partial rendering on an area where second original data of the data needing to be updated on the parent page is located by using the updated data, and keeping the position of a scroll bar of the parent page unchanged.
8. The apparatus of claim 7, further comprising:
the detection module is used for detecting the return operation of a user during the period of displaying the current display page through the application program;
and the returning module is used for displaying the parent page after the partial rendering under the condition of keeping the position of the scroll bar unchanged.
9. The apparatus of claim 6, wherein the determining module comprises:
a comparison submodule, configured to compare the updated data with the second original data to determine whether the second original data needs to be updated;
and the determining submodule is used for determining that the second original data needs to be updated under the condition that the updated data is different from the second original data.
10. The apparatus according to claim 6, wherein the current display page is obtained from an initial page after the applet starts and after a plurality of page jumps, the parent page comprises the initial page stored in a page stack and a parent page to which each page jump is made; the second update module includes:
the first updating submodule is used for calling an updating function of the initial page and updating second original data on the initial page into the updated data;
and the second updating submodule is used for calling an updating function of the page aiming at the parent page to which the page jumps each time, and updating the second original data on the page into the updated data.
11. A terminal device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the data updating method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data updating method according to any one of claims 1 to 5.
CN201910900521.5A 2019-09-23 2019-09-23 Data updating method and device, terminal equipment and storage medium Active CN110659098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910900521.5A CN110659098B (en) 2019-09-23 2019-09-23 Data updating method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910900521.5A CN110659098B (en) 2019-09-23 2019-09-23 Data updating method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110659098A CN110659098A (en) 2020-01-07
CN110659098B true CN110659098B (en) 2021-01-29

Family

ID=69039054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910900521.5A Active CN110659098B (en) 2019-09-23 2019-09-23 Data updating method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110659098B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382387B (en) * 2020-03-06 2023-10-24 深圳市盟天科技有限公司 Webpage access method, device, equipment and storage medium based on applet
CN111523073A (en) * 2020-04-23 2020-08-11 深圳市商汤科技有限公司 Data management method and device, electronic equipment and storage medium
CN111803943B (en) * 2020-07-21 2024-04-30 网易(杭州)网络有限公司 Art rendering effect control method, device and server
CN111949354B (en) * 2020-08-13 2024-03-12 抖音视界有限公司 Page content updating method and device
CN112416410A (en) * 2020-12-09 2021-02-26 北京顺达同行科技有限公司 Data management method and device for small program, computer equipment and storage medium
US12026541B2 (en) 2020-12-25 2024-07-02 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for applet page rendering, electronic device and storage medium
CN112540806B (en) * 2020-12-25 2023-06-23 北京百度网讯科技有限公司 Method and device for rendering small program page, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320365A (en) * 2008-07-09 2008-12-10 金蝶软件(中国)有限公司 Method and apparatus for dynamic layout of document page
CN102279791A (en) * 2010-06-11 2011-12-14 微软公司 User interface inventory
CN103106219A (en) * 2011-11-15 2013-05-15 盛乐信息技术(上海)有限公司 Method and system of web page grabbing
CN107748690A (en) * 2017-10-30 2018-03-02 深圳Tcl新技术有限公司 Using jump method, device and computer-readable storage medium
CN108228873A (en) * 2018-01-17 2018-06-29 腾讯科技(深圳)有限公司 Object recommendation, publication content delivery method, device, storage medium and equipment
CN108595236A (en) * 2018-03-27 2018-09-28 五八有限公司 A kind of method and device for preventing sub-line journey from carrying out operating user interface

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100017702A1 (en) * 2008-07-16 2010-01-21 International Business Machines Corporation Asynchronous Partial Page Updates Based On Dynamic Dependency Calculation
CN104346158B (en) * 2013-08-09 2017-11-21 华为终端(东莞)有限公司 A kind of method and user equipment for handling the cascade page
CN103414950B (en) * 2013-08-16 2016-09-14 天脉聚源(北京)传媒科技有限公司 A kind of method for showing interface, device, Set Top Box and server
CN105635229B (en) * 2014-11-06 2019-09-17 阿里巴巴集团控股有限公司 Data earth-filling method and device
CN106445978A (en) * 2015-08-13 2017-02-22 阿里巴巴集团控股有限公司 Real-time information display method and apparatus
CN105607799B (en) * 2015-12-15 2019-09-13 深圳市永兴元科技股份有限公司 Data processing method and device
CN105550357A (en) * 2015-12-29 2016-05-04 小米科技有限责任公司 Web page refreshing method and device
CN106302008B (en) * 2016-08-05 2019-02-26 腾讯科技(深圳)有限公司 Data-updating method and device
CN107168999A (en) * 2017-03-30 2017-09-15 咪咕数字传媒有限公司 A kind of method for updating pages and device
CN108008950B (en) * 2017-11-24 2020-10-16 武汉斗鱼网络科技有限公司 Method and device for realizing user interface updating
CN108563487B (en) * 2018-04-28 2021-10-01 北京小米移动软件有限公司 User interface updating method and device
CN109032600A (en) * 2018-07-24 2018-12-18 东软集团股份有限公司 Application interface update method, device, storage medium and electronic equipment
CN109164990B (en) * 2018-09-13 2022-03-29 东信和平科技股份有限公司 Memory data updating method, device, equipment and storage medium
CN109471695A (en) * 2018-10-31 2019-03-15 北京字节跳动网络技术有限公司 Method and apparatus for more new data
CN110069269A (en) * 2019-04-16 2019-07-30 北京字节跳动网络技术有限公司 Update method, apparatus, electronic equipment and the storage medium of the small routine page

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320365A (en) * 2008-07-09 2008-12-10 金蝶软件(中国)有限公司 Method and apparatus for dynamic layout of document page
CN102279791A (en) * 2010-06-11 2011-12-14 微软公司 User interface inventory
CN103106219A (en) * 2011-11-15 2013-05-15 盛乐信息技术(上海)有限公司 Method and system of web page grabbing
CN107748690A (en) * 2017-10-30 2018-03-02 深圳Tcl新技术有限公司 Using jump method, device and computer-readable storage medium
CN108228873A (en) * 2018-01-17 2018-06-29 腾讯科技(深圳)有限公司 Object recommendation, publication content delivery method, device, storage medium and equipment
CN108595236A (en) * 2018-03-27 2018-09-28 五八有限公司 A kind of method and device for preventing sub-line journey from carrying out operating user interface

Also Published As

Publication number Publication date
CN110659098A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN110659098B (en) Data updating method and device, terminal equipment and storage medium
CN111049979B (en) Application sharing method, electronic equipment and computer readable storage medium
CN109407921B (en) Application processing method and terminal device
CN109407932B (en) Icon moving method and mobile terminal
CN108279948B (en) Application program starting method and mobile terminal
CN108334272B (en) Control method and mobile terminal
CN110837327B (en) Message viewing method and terminal
CN111026484A (en) Application sharing method, first electronic device and computer-readable storage medium
CN109739429B (en) Screen switching processing method and mobile terminal equipment
CN108900695B (en) Display processing method, terminal equipment and computer readable storage medium
CN109343788B (en) Operation control method of mobile terminal and mobile terminal
CN107967153B (en) Application program management method and mobile terminal
CN108958593B (en) Method for determining communication object and mobile terminal
CN109407929B (en) Desktop icon sorting method and terminal
CN108874906B (en) Information recommendation method and terminal
CN110825295B (en) Application program control method and electronic equipment
CN109144393B (en) Image display method and mobile terminal
CN110795189A (en) Application starting method and electronic equipment
CN108196781B (en) Interface display method and mobile terminal
CN109284146B (en) Light application starting method and mobile terminal
CN110851219A (en) Information processing method and electronic equipment
CN111310165B (en) Account switching or registering method and electronic equipment
CN110809186B (en) Video processing method and electronic equipment
CN111130995B (en) Image control method, electronic device, and storage medium
CN109902232B (en) Display control method and terminal

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