Data updating method, device, electronic device, storage medium and product
By caching and uniformly updating the page data pushed by the server in instant messaging, the problem of performance degradation caused by frequent page updates is solved and the user experience is improved.
Patent Information
- Application Number
- CN202110351216.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-03-31
AI Technical Summary
In instant messaging, too many page update requests pushed by the server cause the client to frequently update the page, reducing page performance and affecting user experience.
By obtaining and caching the update data sent by the server within a preset time period, and uniformly updating and refreshing the page when the current time of the updated data meets the preset conditions, the number of data updates and refreshes is reduced.
It effectively reduces the number of updates and refreshes of the list page, and improves the terminal’s list performance and user experience.
Smart Images

Figure CN113190777B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of application technology development, and in particular to a data updating method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] In related technologies, with the development of Internet technology, in instant messaging, the server will push a large number of page update requests to the client. When the client receives a large number of page update requests pushed by the server, it will frequently update the page, thereby reducing page performance and affecting the user experience.
[0003] Therefore, how to reduce the number of page updates in the application, reduce system lag, reduce system heat, and improve page performance is a technical problem that needs to be solved. Summary of the invention
[0004] The present disclosure provides a data update method, device, electronic device, computer-readable storage medium and computer program product to at least solve the technical problem in the related art that the terminal frequently updates pages according to a large number of page update requests, resulting in reduced page performance. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a data updating method is provided, including:
[0006] Obtain and cache update data sent by the server within a preset time period;
[0007] When the current time of the updated data meets the preset condition, the corresponding data in the list page is updated according to the cached updated data;
[0008] Refresh the list page after updating the data.
[0009] Optionally, the list page after refreshing the updated data includes:
[0010] Generate a task identifier for an update list page according to the update data;
[0011] If there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier and set the timing time of the task timer;
[0012] When the timing time of the task timer is reached, updating the task associated with the task timer;
[0013] After the task update is completed, the task timer is removed.
[0014] Optionally, the list page after refreshing the updated data further includes:
[0015] If there is a task timer corresponding to the task identifier, when the timing time of the task timer is reached, the task associated with the timer is updated;
[0016] When the task update is completed, the task timer is removed.
[0017] Optionally, when the timing time of the task timer is reached, the list page after refreshing the updated data further includes:
[0018] If a task associated with the task timer is detected, then executing the step of updating the task associated with the task timer;
[0019] If no task associated with the task timer is detected, the task timer is directly removed.
[0020] Optionally, the acquiring and caching the update data sent by the server within a preset time period includes:
[0021] Sending an update request within a preset time period to a server, and receiving and caching update data fed back by the server within the preset time period; or
[0022] Receive and cache the update data actively sent by the server within a preset time period.
[0023] Optionally, updating corresponding data in the list page according to the cached update data includes:
[0024] Modify the update time of the cached update data to the current time;
[0025] The updated data after the modification time is sorted by time and replaces the corresponding data on the list page.
[0026] Optionally, after updating the corresponding data in the list page, the method further includes:
[0027] Clear the cached update data.
[0028] Optionally, the method further includes: presetting a preset condition, wherein the preset condition includes:
[0029] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0030] or,
[0031] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0032] According to a second aspect of an embodiment of the present disclosure, a data updating method is provided, including:
[0033] Obtain and cache updated data within a preset time period;
[0034] When the current time of the updated data meets the preset condition, the updated data cached within the preset time period is sent to the terminal, so that the terminal updates the corresponding data in the list page according to the received updated data and refreshes the list page after the updated data.
[0035] Optionally, the method further includes:
[0036] Receiving an update request within the preset time period sent by the terminal;
[0037] According to the update request, extracting the update data within the preset time period from the cache;
[0038] When the current time of the update data meets the preset condition, the step of sending the update data cached within the preset time period to the terminal is performed.
[0039] Optionally, the method further includes: presetting a preset condition, wherein the preset condition includes:
[0040] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0041] or
[0042] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0043] According to a third aspect of an embodiment of the present disclosure, a data updating method is provided, including:
[0044] Acquire update data sent by the server, wherein the update data is update data acquired and cached by the server within a preset time period, and the current time of the update data meets a preset condition;
[0045] According to the updated data, the corresponding data in the list page is updated;
[0046] Refresh the list page after updating the data.
[0047] Optionally, the list page after refreshing the updated data includes:
[0048] Generate a task identifier for an update list page according to the update data;
[0049] If there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier and set the timing time of the task timer;
[0050] When the timing time of the task timer is reached, updating the task associated with the task timer;
[0051] After the task update is completed, the task timer is removed.
[0052] Optionally, the list page after refreshing the updated data further includes:
[0053] If there is a task timer corresponding to the task identifier, when the timing time of the task timer is reached, the task associated with the timer is updated;
[0054] When the task update is completed, the task timer is removed.
[0055] Optionally, when the timing time of the task timer is reached, the list page after refreshing the updated data further includes:
[0056] If a task associated with the task timer is detected, performing the step of updating the task associated with the task timer;
[0057] If no task associated with the task timer is detected, the task timer is directly removed.
[0058] Optionally, obtaining the update data sent by the server includes:
[0059] Sending an update request within a preset time period to a server, and receiving update data within the preset time period fed back by the server; or
[0060] The receiving server actively sends the update data within a preset time period.
[0061] Optionally, updating corresponding data in the list page according to the updated data includes:
[0062] Modify the update time of the update data to the current time;
[0063] The updated data after the modification time is sorted by time and replaces the corresponding data on the list page.
[0064] Optionally, after updating the corresponding data in the list page, the method further includes:
[0065] Clear the update data.
[0066] According to a fourth aspect of an embodiment of the present disclosure, there is provided a data updating device, including:
[0067] An acquisition module is configured to acquire update data sent by the server within a preset time period;
[0068] A cache module, configured to cache the update data;
[0069] An updating module, configured to execute, when the current time of the update data satisfies a preset condition, updating the corresponding data in the list page according to the cached update data;
[0070] The refresh module is configured to refresh the list page after updating the data.
[0071] Optionally, the refresh module includes:
[0072] A generating module configured to execute a task identifier for generating an update list page according to the update data;
[0073] a creating module, configured to create a task timer corresponding to the task identifier when there is no task timer corresponding to the task identifier, and set a timing time of the task timer;
[0074] A first updating module is configured to execute, when the timing time at which the task timer is created by the creating module is reached, updating the task associated with the task timer;
[0075] The first removal module is configured to remove the task timer after the first update module completes the task update.
[0076] Optionally, the refresh module further includes:
[0077] A determination module, configured to determine whether there is a task timer corresponding to the task identifier after the generation module generates the task identifier of the update list page according to the update data;
[0078] The creation module is further configured to execute, when the judgment module determines that there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier, and set a timing time of the task timer;
[0079] A second updating module is configured to execute when the judging module determines that there is a task timer corresponding to the task identifier, and when the timing time of the task timer is reached, update the task associated with the timer;
[0080] The second removal module is configured to remove the task timer when the second update module completes the task update.
[0081] Optionally, the refresh module further includes:
[0082] A detection module is configured to detect whether there is a task associated with the task timer when the timing time of the task timer is reached;
[0083] The first updating module is further configured to execute, when the detection module detects the existence of a task associated with the task timer, updating the task associated with the task timer;
[0084] The third removing module is configured to directly remove the task timer when the detecting module detects that there is no task associated with the task timer.
[0085] Optionally, the acquisition module includes: a sending module and a first receiving module; and / or a second receiving module, wherein:
[0086] The sending module is configured to execute sending an update request within a preset time period to the server;
[0087] The first receiving module is configured to receive update data fed back by the server within the preset time period;
[0088] The second receiving module is configured to receive the update data actively sent by the server within a preset time period.
[0089] Optionally, the update module includes:
[0090] A time updating module, configured to modify the update time of the cached update data to the current time;
[0091] The data updating module is configured to replace the corresponding data on the list page with the updated data after the modification time in chronological order.
[0092] Optionally, the device further comprises:
[0093] The clearing module is configured to clear the cached update data after the updating module updates the corresponding data in the list page.
[0094] Optionally, the device further comprises: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions include:
[0095] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0096] or
[0097] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0098] According to a fifth aspect of an embodiment of the present disclosure, a data updating device is provided, the device being applied to a server, comprising:
[0099] An acquisition module is configured to acquire update data within a preset time period;
[0100] A cache module, configured to cache the update data;
[0101] The sending module is configured to send the update data cached within the preset time period to the terminal when the current time of the update data meets the preset conditions, so that the terminal can update the corresponding data in the list page according to the received update data and refresh the list page after the updated data.
[0102] Optionally, the device further comprises:
[0103] A receiving module is configured to execute when an update request within the preset time period is received from a terminal;
[0104] An extraction module, configured to extract the update data within the preset time period from the cache according to the update request;
[0105] The sending module is further configured to execute the step of sending the update data cached within the preset time period to the terminal when the current time of the update data meets the preset condition.
[0106] Optionally, the device further comprises: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions include:
[0107] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0108] or
[0109] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0110] According to a sixth aspect of an embodiment of the present disclosure, a data updating device is provided, which is applied to a terminal and is characterized by comprising:
[0111] an acquisition module, configured to execute acquisition of the update data sent by the server, wherein the update data is the update data acquired and cached by the server within a preset time period, and the current time of the update data meets a preset condition;
[0112] An updating module, configured to update corresponding data in the list page according to the update data;
[0113] The refresh module is configured to refresh the list page after updating the data.
[0114] Optionally, the refresh module includes:
[0115] A generating module configured to execute a task identifier for generating an update list page according to the update data;
[0116] a creating module, configured to create a task timer corresponding to the task identifier when there is no task timer corresponding to the task identifier, and set a timing time of the task timer;
[0117] A first updating module is configured to execute, when the timing time at which the task timer is created by the creating module is reached, updating the task associated with the task timer;
[0118] The first removal module is configured to remove the task timer after the first update module completes the task update.
[0119] Optionally, the refresh module further includes:
[0120] A determination module, configured to determine whether there is a task timer corresponding to the task identifier in the memory after the generation module generates the task identifier of the update list page according to the update data;
[0121] The creation module is further configured to execute, when the judgment module determines that there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier, and set a timing time of the task timer;
[0122] A second updating module is configured to execute when the judging module determines that there is a task timer corresponding to the task identifier, and when the timing time of the task timer is reached, update the task associated with the timer;
[0123] The second removal module is configured to remove the task timer when the second update module completes the task update.
[0124] Optionally, the refresh module further includes:
[0125] A detection module is configured to detect whether there is a task associated with the task timer when the timing time of the task timer is reached;
[0126] The first updating module is further configured to execute, when the detection module detects that there is a task associated with the task timer, updating the task associated with the task timer;
[0127] The third removing module is configured to directly remove the task timer when the detecting module detects that there is no task associated with the task timer.
[0128] Optionally, the acquisition module includes: a sending module and a first receiving module; and / or a second receiving module, wherein:
[0129] The sending module is configured to execute sending an update request within a preset time period to the server;
[0130] The first receiving module is configured to receive update data fed back by the server within the preset time period;
[0131] The second receiving module is configured to receive the update data actively sent by the server within a preset time period.
[0132] Optionally, the update module includes:
[0133] A time updating module, configured to modify the update time of the update data to the current time;
[0134] The data updating module is configured to replace the corresponding data on the list page with the updated data after the modification time in chronological order.
[0135] Optionally, the device further comprises:
[0136] The clearing module is configured to clear the updated data after the updating module updates the corresponding data in the list page.
[0137] According to a seventh aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0138] processor;
[0139] a memory for storing instructions executable by the processor;
[0140] The processor is configured to execute the instructions to implement the data updating method as described above.
[0141] According to an eighth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, characterized in that when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data updating method as described above.
[0142] According to a ninth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program or instructions, characterized in that when the program or instructions in the computer program product are executed by a processor, the data updating method as described above is implemented.
[0143] The technical solution provided by the embodiments of the present disclosure may at least include the following beneficial effects:
[0144] In the disclosed embodiment, by obtaining and caching the update data sent by the server within a preset time period, that is, merging the update data within the preset time period, and when the current time of the update data meets the preset conditions, the corresponding data in the list page is updated according to the cached update data, and the list page after the update data is refreshed. In the disclosed embodiment, by obtaining the update data sent by the server within a preset time period, and when the current time of the update data meets the preset conditions, the update data is uniformly updated once, and the list page after the update data is refreshed, the number of updates of the data in the list page and the number of refreshes of the list are effectively reduced. That is, by limiting the number of updates of the data in the list page and the number of refreshes of the list, the list performance of the terminal is improved, and the user experience is improved.
[0145] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0146] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0147] Figure 1 The figure is a flow chart of a data updating method according to an exemplary embodiment.
[0148] Figure 2 is another flow chart of a data updating method according to an exemplary embodiment.
[0149] Figure 3 It is another flow chart of a data updating method according to an exemplary embodiment.
[0150] Figure 4 The figure is a flow chart showing an application example of a data updating method according to an exemplary embodiment.
[0151] Figure 5 It is a block diagram of a data updating device according to an exemplary embodiment.
[0152] Figure 6 is another block diagram of a data updating device according to an exemplary embodiment.
[0153] Figure 7 is another block diagram of a data updating device according to an exemplary embodiment.
[0154] Figure 8 is another block diagram of a data updating device according to an exemplary embodiment.
[0155] Fig. 9 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment.
[0156] Fig.10 It is a structural block diagram of a device with data updating according to an exemplary embodiment. DETAILED DESCRIPTION
[0157] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0158] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0159] Figure 1 is a flow chart of a data updating method according to an exemplary embodiment. Figure 1 As shown, the data updating method is used in a terminal, comprising the following steps:
[0160] In step 101, the update data sent by the server within a preset time period is obtained and cached.
[0161] In step 102, when the current time of the updated data meets a preset condition, the corresponding data in the list page is updated according to the cached updated data.
[0162] In step 103, the list page after the data is updated is refreshed.
[0163] The data updating method disclosed in the present invention can be applied to a terminal without limitation, and its terminal implementation device can be a smart phone, a laptop computer, a tablet computer or other electronic device without limitation.
[0164] Combine the following Figure 1 , the specific implementation steps of a data updating method provided by an embodiment of the present disclosure are described in detail.
[0165] First, execute step 101 to obtain and cache the update data sent by the server within a preset time period;
[0166] The acquisition process in this step may be that the terminal actively obtains an update request within a preset time period from the server, or the server actively sends the update data within the preset time period to the terminal. The update request within the preset time period may be one or more, which is not limited in this embodiment. Specifically, it includes:
[0167] An acquisition method: a terminal sends a request for obtaining updates within a preset time period to a server, and the terminal receives and caches an update response within the preset time period sent by the server, wherein the update response includes the update data within the preset time period;
[0168] Another acquisition method: the terminal receives and caches the update data actively sent by the server within a preset time period.
[0169] The preset time period in the step can be set to 0-1 second, 1-2 seconds, 2-5 seconds, 5-10 seconds, etc. as needed, or 0-1 minute, 5-10 minutes, etc., which is not limited in this embodiment. For example, within 0-1 second, 2 update data sent by the server are obtained, or within 2-5 seconds, 5 update data sent by the server are obtained, etc., which is not limited in this embodiment. In other words, the update data obtained can be one update data, or multiple update data, such as 10 update data, etc. Of course, there may be no update data that needs to be updated within the preset time period, that is, 0 update data is obtained, etc.
[0170] Afterwards, the cache obtains the update data within a preset time period;
[0171] In this step, the terminal can sequentially cache the update data received within the preset time into the memory, or sequentially cache the update data into the database, or of course, sequentially cache into other storage spaces, which is not limited in this embodiment. That is, this embodiment can select the corresponding cache mode according to actual needs.
[0172] Next, executing step 102, when the current time of the update data meets the preset condition, the corresponding data in the list page is updated according to the cached update data;
[0173] Among them, the preset condition in this step is pre-set, and the preset condition can be set on the client's memory, cache or database and other storage space, wherein the preset condition can specifically include: the difference between the current time of the updated data and the last update time is greater than the preset time interval, of course, it can also be that the current time of the updated data is greater than the sum of the current time when the last update data was passed to the list and the preset time interval.
[0174] In this step, for example, if the current time (i.e., the current timestamp) is 11:35 a.m., the last update time is 11:20 a.m., and the preset time interval is 10 minutes, then the difference between the current time and the last update time is: 11:35-11:20=15 (minutes), and 15>10, then it is necessary to uniformly update the corresponding data in the list page according to the cached update data. In other words, all cached update data are updated at one time.
[0175] In this step, the corresponding data in the list page is updated according to the cached update data, specifically including: first modifying the update time of the cached update data to the current time; then, replacing the corresponding data on the list page with the update data after the modification time in chronological order.
[0176] Among them, each updated data is accompanied by a timestamp, which is the time when the updated data is passed to the list, referred to as the update time of the updated data in the text. In this step, the timestamp needs to be updated to the current timestamp to facilitate subsequent unified updates. Then, the updated data after the modification time is sorted by time to replace the corresponding data on the list page. Of course, if the cached update data has no order, it is not necessary to replace the corresponding data on the list page by time sorting when updating. Among them, the time sorting can be in ascending order of time or in reverse order of time, which is not limited in this embodiment.
[0177] Furthermore, after updating the corresponding data in the list page, the method may further include: clearing the cached updated data, so as to save the occupied space of the memory or database and improve the utilization rate of the memory or database.
[0178] Finally, step 103 is executed to refresh the list page after updating the data.
[0179] In this embodiment, a process of refreshing the list page after updating data includes: first generating a task identifier for updating the list page based on the updated data; then, if there is no task timer corresponding to the task identifier, creating a task timer corresponding to the task identifier and setting the timing of the task timer; and when the timing of the task timer is reached, updating the task associated with the task timer; finally, after the task update is completed, removing the task timer.
[0180] Further, in another embodiment, the list page after refreshing the updated data may also include: if there is a task timer corresponding to the task identifier in the memory, then when the timing time of the task timer is reached, the task associated with the timer is updated; when the task update is completed, the task timer is removed.
[0181] Further, in another embodiment, when the timing time of the task timer is reached, the list page after refreshing and updating the data may also include: if a task associated with the task timer is detected, executing the step of updating the task associated with the task timer; if no task associated with the task timer is detected, directly removing the task timer.
[0182] That is, the process of refreshing the list page after updating the data specifically includes:
[0183] 1) Generate a task ID (ID) of the update list page according to the update data;
[0184] 2) Determine whether there is a task timer corresponding to the task identifier in the memory, if not, execute 3), if yes, execute 7);
[0185] 3) If there is no task timer corresponding to the task identifier in the memory, a task timer is generated and a timing time of the task timer is set;
[0186] 4) When the timing time of the task timer is reached, detect whether there is a task associated with the task timer, if so, execute 5), otherwise, execute 6);
[0187] 5) If a task associated with the task timer is detected, the associated task is updated, and after the task update is completed, the task timer is removed;
[0188] 6) If it is detected that there is no task unassociated with the task timer, the task timer is directly removed.
[0189] 7) If there is a task timer corresponding to the task identifier in the memory, when the timing time of the task timer is reached, the task associated with the timer is updated, and when the task update is completed, the task timer is removed.
[0190] That is to say, in this embodiment, after the corresponding data in the list is updated, the list page needs to be refreshed, that is, the updated data status is synchronized to the list display. It should be noted that when the list displays more elements and the list data is more complex, frequent refreshes of the list will consume a lot of performance, resulting in system freezes and heating of the terminal device. Therefore, in the embodiment of the present disclosure, the update data received within a preset time period is first cached, and when the update data meets the preset conditions, it is uniformly updated, reducing the number of data updates. After the data is uniformly updated, the list page is refreshed, thereby optimizing the list performance by limiting the refresh frequency of the list page.
[0191] Specifically, since all updated data are set with a task identification ID, it is possible to search for a task timer in the memory (or database or cache) based on the task identification ID; if there is a task timer, the task associated with the task timer is reset, and when the timing of the task timer is reached, the task associated with the timer after the update is updated; and when the task update is completed, the task timer is removed; if there is no task timer corresponding to the task identifier, the incoming task is immediately executed once, and a task timer is generated and the timing of the task timer is set; when the timing of the task timer is reached, if a task associated with the task timer is detected, the associated task is updated, and after the task update is completed, the task timer is removed; if a task not associated with the task timer is detected, the task timer is directly removed.
[0192] In the embodiments of the present disclosure, in order to improve the list performance of the mobile terminal, especially the conversation list of instant messaging, when a large number of conversation update requests (including update data) are received, if no restriction is imposed, or the restriction measures are unreasonable, the list page will be obviously stuck and consume power quickly, affecting the user experience; the embodiments of the present disclosure obtain and cache the update data sent by the server within a preset time period, and when the current time of the update data meets the preset conditions, the corresponding data in the list page is uniformly updated according to the cached update data, and the list page after the update data is refreshed, thereby effectively reducing the number of updates of the data in the list page and the number of refreshes of the list, that is, by limiting the frequency of refreshing the page to achieve the purpose of optimizing the list performance, thereby improving user satisfaction.
[0193] See also Figure 2, is another flow chart of a data updating method according to an exemplary embodiment, the method is applied to a server, and the method includes:
[0194] Step 201: Acquire and cache update data within a preset time period;
[0195] In this step, the server first obtains the update data of the terminal within a preset time period. The update data may be one or more pieces, which is not limited in this embodiment.
[0196] Afterwards, caching the acquired update data;
[0197] In this step, the server may cache the acquired update data to the cloud, memory, or database, etc., which is not limited in this embodiment.
[0198] Step 202: When the current time of the updated data meets the preset condition, the updated data cached within the preset time period is sent to the terminal, so that the terminal updates the corresponding data in the list page according to the received updated data and refreshes the list page after the updated data.
[0199] Among them, the preset conditions in this embodiment may include: the difference between the current time of the updated data and the last updated time is greater than the preset time interval; or the current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and the preset time interval.
[0200] That is, in this step, the server determines whether the difference between the current time of the updated data and the last updated time is greater than the preset time interval, or whether the current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and the preset time interval. If greater than, the updated data cached within the preset time period is sent to the terminal, so that the terminal can be updated according to all the received updated data. If less than or equal to, no task processing is performed.
[0201] It should be noted that, in the above-mentioned embodiment, the mobile terminal merges and caches a large amount of update data or update requests sent by the server, and then performs a unified update. However, in the embodiment of the present disclosure, the difference from the above-mentioned embodiment is that the server merges and caches a large amount of update data within a preset time period, and when the current time of the update data meets the preset conditions, the cached update data within the preset time period is sent to the terminal, so that the terminal can perform a unified update based on the received update data.
[0202] In the disclosed embodiment, the terminal or the server can merge and cache the updated data, thereby reducing the number of updates of the terminal list page, improving the performance of the list and user satisfaction. The disclosed embodiment merges the update requests within the preset time period, updates the updated data obtained within the preset time period once, and refreshes the list page after the updated data, effectively reducing the number of updates of the data in the list page and the number of refreshes of the list. That is, by limiting the frequency of refreshing the page, the purpose of optimizing the list performance is achieved, and user satisfaction is improved.
[0203] Optionally, in another embodiment, based on the above embodiment, the method may also include: when the server receives a request from the terminal to obtain an update within the preset time period; according to the update request, extracting the cached update data within the preset time period; and when the current time of the update data meets a preset condition, sending the cached update data within the preset time period to the terminal.
[0204] See also Figure 3 , is another flow chart of a data updating method according to an exemplary embodiment, the method is applied to a terminal, and the method includes:
[0205] Step 301: Acquire update data sent by a server, wherein the update data is update data acquired and cached by the server within a preset time period, and the current time of the update data meets a preset condition;
[0206] In this step, the terminal sends a request to the server to obtain updates within a preset time period, and receives an update response from the server within the preset time period, wherein the update response includes the update data within the preset time period; or the terminal receives the update data within the preset time period actively sent by the server.
[0207] Step 302: updating the corresponding data in the list page according to the update data;
[0208] In this step, the terminal modifies the update time of the update data to the current time; and replaces the corresponding data on the list page with the update data after the modification time in chronological order.
[0209] Furthermore, after updating the corresponding data in the list page, the method may further include: clearing the updated data, so as to save the occupied space of the memory or database and improve the utilization rate of the memory or database.
[0210] For the specific implementation process, please refer to the implementation process of the corresponding steps in the above embodiment, which will not be repeated here.
[0211] Step 303: Refresh the list page after updating the data.
[0212] Among them, in this step, refreshing the list page after updating the data includes: generating a task identifier for updating the list page according to the updated data; creating a task timer corresponding to the task identifier, and setting the timing of the task timer; when the timing of the task timer is reached, updating the task associated with the task timer; after the task update is completed, removing the task timer.
[0213] Further, in another embodiment, the list page after refreshing and updating the data may also include: determining whether there is a task timer corresponding to the task identifier in the memory (taking the memory as an example, it is not limited to this in actual applications); if not, executing the steps of creating a task timer corresponding to the task identifier and setting the timing time of the task timer; if it exists, when the timing time of the task timer is reached, updating the task associated with the timer; when the task update is completed, removing the task timer.
[0214] Further, in another embodiment, when the timing time of the task timer is reached, the list page after refreshing and updating the data may also include: if a task associated with the task timer is detected, executing the step of updating the task associated with the task timer; if no task associated with the task timer is detected, directly removing the task timer.
[0215] The specific implementation process of this step is detailed in the implementation process of the corresponding steps in the above embodiment, which will not be repeated here.
[0216] Figure 4 This is a flow chart of an application example of a data update method according to an exemplary embodiment. In this embodiment, the server sends updated data within a preset period of time to the client as an example, but in actual applications, it is not limited to this. The method includes:
[0217] Step 401: The client obtains update data sent by the server within a preset time period.
[0218] Step 402: The client caches the acquired update data.
[0219] Among them, this embodiment can cache the updated data in the memory or database, etc., but it is not limited to this in actual application.
[0220] Step 403: Determine whether the current time of the updated data meets the preset condition, if yes, execute step 404; otherwise, execute step 416: end this operation.
[0221] The preset condition may include: the difference between the current time of the updated data and the last updated time is greater than the preset time interval; or the current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and the preset time interval.
[0222] Step 404: The client modifies the update time of the cached update data to the current time.
[0223] Step 405: The client replaces the corresponding data on the list page with the updated data after the modification time in chronological order.
[0224] Each updated data has a timestamp, which is the time when the updated data is passed to the list, referred to as the update time in the text.
[0225] Step 406: The client clears the update data cached in the memory.
[0226] This step is optional. After executing step 405, you can also execute step 407 and its subsequent steps first, and then execute step 406, etc.
[0227] Step 407: The client generates a task identifier for an update list page according to the update data;
[0228] Step 408: The client determines whether there is a task timer corresponding to the task identifier in the memory; if not, execute step 409; if so, execute step 414;
[0229] Step 409: The client creates a task timer corresponding to the task identifier and sets the timing of the task timer.
[0230] Step 410: When the timing time of the task timer is reached, the client determines whether a task associated with the task timer is detected; if yes, execute step 411; otherwise, execute step 413.
[0231] Step 411: The client updates the task associated with the task timer.
[0232] Step 412: After the task update is completed, the client removes the task timer.
[0233] Step 413: The client directly removes the task timer.
[0234] Step 414: When the timing time of the task timer is reached, the client updates the task associated with the timer.
[0235] Step 415: When the task update is completed, the client removes the task timer.
[0236] It should be noted that the specific implementation process of each step in this embodiment is detailed in the implementation process of the corresponding steps in the above embodiment, which will not be repeated here.
[0237] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that this implementation disclosure is not limited by the order of the actions described, because according to this disclosure, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this disclosure.
[0238] Figure 5 FIG. 1 is a block diagram of a data updating device according to an exemplary embodiment. Figure 5 The device includes an acquisition module 501, a cache module 502, an update module 503 and a refresh module 504.
[0239] The acquisition module 501 is configured to execute acquisition of update data sent by the server within a preset time period;
[0240] A cache module 502, configured to cache the update data;
[0241] An updating module 503 is configured to update corresponding data in the list page according to the cached update data when the current time of the update data meets a preset condition;
[0242] The refresh module 504 is configured to refresh the list page after updating the data.
[0243] Optionally, in another embodiment, based on the above embodiment, the refresh module includes: a generation module, a creation module, a first update module and a first removal module, wherein:
[0244] The generating module is configured to execute a task identifier for generating an update list page according to the update data;
[0245] The creation module is configured to create a task timer corresponding to the task identifier when there is no task timer corresponding to the task identifier, and set a timing time of the task timer;
[0246] The first updating module is configured to execute, when the timing time at which the creating module creates the task timer is reached, updating the task associated with the task timer;
[0247] The first removal module is configured to remove the task timer after the first update module completes updating the task.
[0248] Optionally, in another embodiment, based on the above embodiment, the refresh module further includes: a judgment module, a second update module and a second removal module, wherein:
[0249] The judging module is configured to judge whether there is a task timer corresponding to the task identifier after the generating module generates the task identifier of the update list page according to the update data;
[0250] The creation module is further configured to execute, when the judgment module determines that there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier, and set a timing time of the task timer;
[0251] The second updating module is configured to execute, when the judging module determines that there is a task timer corresponding to the task identifier, and when the timing time of the task timer is reached, to update the task associated with the timer after the update;
[0252] The second removal module is configured to remove the task timer when the second update module completes updating the task.
[0253] Optionally, in another embodiment, based on the above embodiment, the refresh module further includes: a detection module and a third removal module, wherein:
[0254] The detection module is configured to detect whether there is a task associated with the task timer when the timing time of the task timer is reached;
[0255] The first updating module is further configured to execute, when the detection module detects the existence of a task associated with the task timer, updating the task associated with the task timer;
[0256] The third removing module is configured to directly remove the task timer when the detecting module detects that there is no task associated with the task timer.
[0257] Optionally, in another embodiment, based on the above embodiment, the acquisition module includes: a sending module and a first receiving module; and / or a second receiving module, wherein:
[0258] The sending module is configured to execute sending an update request within a preset time period to the server;
[0259] The first receiving module is configured to receive update data fed back by the server within the preset time period;
[0260] The second receiving module is configured to receive the update data actively sent by the server within a preset time period.
[0261] Optionally, in another embodiment, based on the above embodiment, the update module includes: a time update module and a data update module, wherein:
[0262] The time updating module is configured to modify the update time of the cached update data to the current time;
[0263] The data updating module is configured to replace the corresponding data on the list page with the updated data after the modification time in chronological order.
[0264] Optionally, in another embodiment, based on the above embodiment, the device may further include: a clearing module 601, whose structural diagram is shown in FIG. Figure 6 As shown,
[0265] The clearing module 601 is configured to clear the cached update data after the updating module 503 updates the corresponding data in the list page.
[0266] Optionally, in another embodiment, based on the above embodiment, the device may further include: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions include:
[0267] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0268] or
[0269] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0270] Figure 7 is another block diagram of a data updating device according to an exemplary embodiment, the device is applied to a server, and includes: an acquisition module 701, a cache module 702 and a sending module 703, wherein:
[0271] The acquisition module 701 is configured to execute acquisition of update data within a preset time period;
[0272] The cache module 702 is configured to cache the update data;
[0273] The sending module 703 is configured to send the update data cached within the preset time period to the terminal when the current time of the update data meets the preset conditions, so that the terminal can update the corresponding data in the list page according to the received update data and refresh the list page after the updated data.
[0274] Optionally, in another embodiment, based on the above embodiment, the device may further include: a receiving module and an extracting module, wherein:
[0275] The receiving module is configured to execute when receiving an update request within the preset time period sent by the terminal;
[0276] The extraction module is configured to extract the cached update data within the preset time period according to the update request;
[0277] The sending module is further configured to execute the step of sending the update data cached within the preset time period to the terminal when the current time of the update data meets the preset condition.
[0278] Optionally, in another embodiment, based on the above embodiment, the device may further include: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions include:
[0279] The difference between the current time of updating the data and the last updating time is greater than a preset time interval;
[0280] or
[0281] The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
[0282] Figure 8 is another block diagram of a data updating device according to an exemplary embodiment, the device is applied to a terminal, and includes: an acquisition module 801, an update module 802 and a refresh module 803, wherein:
[0283] The acquisition module 801 is configured to execute acquisition of the update data sent by the server, wherein the update data is the update data acquired and cached by the server within a preset time period, and the current time of the update data meets a preset condition;
[0284] The updating module 802 is configured to update the corresponding data in the list page according to the update data;
[0285] The refresh module 803 is configured to refresh the list page after updating the data.
[0286] Optionally, in another embodiment, based on the above embodiment, the refresh module includes: a generation module, a creation module, a first update module and a first removal module. In this embodiment, the functions and effects of each module are detailed in the above embodiment, and the functions and effects of the corresponding modules are not repeated here.
[0287] Optionally, in another embodiment, based on the above embodiment, the refresh module includes: a judgment module, a second update module and a second removal module. In this embodiment, the functions and effects of each module are detailed in the above embodiment, and the functions and effects of the corresponding modules are not repeated here.
[0288] Optionally, in another embodiment, based on the above embodiment, the refresh module includes: a detection module, a first update module and a third removal module. In this embodiment, the functions and effects of each module are detailed in the above embodiment, and the functions and effects of the corresponding modules are not repeated here.
[0289] Optionally, in another embodiment, based on the above embodiment, the acquisition module includes: a sending module and a first receiving module; and / or a second receiving module, wherein:
[0290] The sending module is configured to send a request to the server to obtain updates within a preset time period;
[0291] The first receiving module is configured to receive the update data sent by the server within the preset time period;
[0292] The second receiving module is configured to receive the update data actively sent by the server within a preset time period.
[0293] Optionally, in another embodiment, based on the above embodiment, the update module includes:
[0294] A time updating module, configured to modify the update time of the update data to the current time;
[0295] The data updating module is configured to replace the corresponding data on the list page with the updated data after the modification time in chronological order.
[0296] Optionally, in another embodiment, based on the above embodiment, the device further includes:
[0297] The clearing module is configured to clear the updated data after the updating module updates the corresponding data in the list page.
[0298] The disclosed embodiment obtains the update data sent by the server within a preset time period, that is, merges the update data within the preset time period, and uniformly updates the update data when the difference between the current time of the update data and the last update time is greater than the preset time interval, and refreshes the list page, thereby effectively reducing the number of data updates in the list page and the number of list refreshes. That is, the list performance of the terminal is improved, and the user experience is improved.
[0299] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method. For relevant details, please refer to the partial description of the method embodiment, and will not be elaborated here.
[0300] In an exemplary embodiment, there is also provided an electronic device, comprising:
[0301] processor;
[0302] a memory for storing instructions executable by the processor;
[0303] The processor is configured to execute the instructions to implement the data updating method as described above.
[0304] In an exemplary embodiment, a computer-readable storage medium is further provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data updating method as described above.
[0305] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by a processor of the device to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0306] In an exemplary embodiment, a computer program product is further provided, comprising a computer program or instructions, and when the program or instructions in the computer program product are executed by a processor, the data updating method as described in any one of the above items is implemented.
[0307] Fig. 9 1 is a block diagram of an electronic device 900 according to an exemplary embodiment. For example, the electronic device 900 may be a mobile terminal or a server, and the electronic device is a mobile terminal as an example for explanation in the embodiment of the disclosure. For example, the electronic device 900 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, etc.
[0308] Reference Fig. 9 , the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0309] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0310] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0311] The power supply component 906 provides power to the various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 900.
[0312] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the 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 input signals from the 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 boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating 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.
[0313] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0314] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as 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.
[0315] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the electronic device 900, and the sensor assembly 914 can also detect the position change of the electronic device 900 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0316] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 916 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 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0317] In an exemplary embodiment, the electronic device 900 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, microcontrollers, microprocessors or other electronic components to execute the data update method shown above.
[0318] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by a processor 920 of an electronic device 900 to complete the data update method shown above. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0319] In an exemplary embodiment, a computer program product is further provided. When instructions in the computer program product are executed by the processor 920 of the electronic device 900, the electronic device 900 executes the data updating method shown above.
[0320] Fig.10 1 is a block diagram of a device 900 for data updating according to an exemplary embodiment. For example, the device 1000 may be provided as a server. Fig.10 , the apparatus 1000 includes a processing component 1022, which further includes one or more processors, and a memory resource represented by a memory 1032 for storing instructions executable by the processing component 1022, such as an application. The application stored in the memory 1032 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute instructions to perform the above-mentioned data update method.
[0321] The device 1000 may also include a power supply component 1026 configured to perform power management of the device 1000, a wired or wireless network interface 1050 configured to connect the device 1000 to a network, and an input / output (I / O) interface 1058. The device 1000 may operate based on an operating system stored in the memory 1032, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0322] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0323] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A data updating method, characterized in that: include: Obtain and cache update data sent by the server within a preset time period; When the current time of the updated data meets the preset condition, the corresponding data in the list page is updated according to the cached updated data; Refresh the list page after updating the data; The updating of corresponding data in the list page according to the cached update data includes: Modify the update time of the cached update data to the current time; The updated data after the modification time is sorted by time to replace the corresponding data on the list page; The list page after refreshing the updated data includes: Generate a task identifier for an update list page according to the update data; If there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier and set the timing time of the task timer; When the timing time of the task timer is reached, updating the task associated with the task timer; After the task update is completed, the task timer is removed.
2. The data updating method according to claim 1, characterized in that: The list page after refreshing the updated data also includes: If there is a task timer corresponding to the task identifier, when the timing time of the task timer is reached, the task associated with the timer is updated; When the task update is completed, the task timer is removed.
3. The data updating method according to claim 1, characterized in that: When the timer of the task timer is reached, the list page after refreshing the updated data further includes: If a task associated with the task timer is detected, then executing the step of updating the task associated with the task timer; If no task associated with the task timer is detected, the task timer is directly removed.
4. The data updating method according to any one of claims 1 to 2, characterized in that: The obtaining and caching of update data sent by the server within a preset time period includes: Sending an update request within a preset time period to a server, and receiving and caching update data fed back by the server within the preset time period; or Receive and cache the update data actively sent by the server within a preset time period.
5. The data updating method according to any one of claims 1 to 2, characterized in that: After updating the corresponding data in the list page, the method further includes: Clear the cached update data.
6. The data updating method according to any one of claims 1 to 2, characterized in that: The method further includes: presetting a preset condition, wherein the preset condition includes: The difference between the current time of updating the data and the last updating time is greater than a preset time interval; or, The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
7. A data updating method, characterized in that: include: Obtain and cache updated data within a preset time period; When the current time of the update data meets the preset condition, the update data cached within the preset time period is sent to the terminal, so that the terminal updates the corresponding data in the list page according to the received update data, and refreshes the list page after the update data; The terminal updates corresponding data in the list page according to the received update data, including: Modify the update time of the cached update data to the current time; The updated data after the modification time is sorted by time to replace the corresponding data on the list page; The list page after refreshing and updating the data includes: Generate a task identifier for an update list page according to the update data; If there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier and set the timing time of the task timer; When the timing time of the task timer is reached, updating the task associated with the task timer; After the task update is completed, the task timer is removed.
8. The data updating method according to claim 7, characterized in that: The method further comprises: Receiving an update request within the preset time period sent by the terminal; According to the update request, extracting the update data within the preset time period from the cache; When the current time of the update data meets the preset condition, the step of sending the update data cached within the preset time period to the terminal is performed.
9. The data updating method according to claim 7 or 8, characterized in that: The method further includes: presetting a preset condition, wherein the preset condition includes: The difference between the current time of updating the data and the last time of updating is greater than a preset time interval; or The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
10. A data updating device, characterized in that: include: An acquisition module is configured to acquire update data sent by the server within a preset time period; A cache module, configured to cache the update data; An updating module, configured to execute, when the current time of the update data satisfies a preset condition, updating the corresponding data in the list page according to the cached update data; A refresh module, configured to refresh the list page after updating the data; The update module includes: A time updating module, configured to modify the update time of the cached update data to the current time; A data update module is configured to replace the corresponding data on the list page with the updated data after the modification time in chronological order; The refresh module comprises: A generating module configured to execute a task identifier for generating an update list page according to the update data; a creating module, configured to create a task timer corresponding to the task identifier when there is no task timer corresponding to the task identifier, and set a timing time of the task timer; A first updating module is configured to execute, when the timing time at which the creating module creates the task timer is reached, updating the task associated with the task timer; The first removal module is configured to remove the task timer after the first update module completes the task update.
11. The data updating device according to claim 10, characterized in that: The refresh module also includes: A determination module, configured to determine whether there is a task timer corresponding to the task identifier after the generation module generates the task identifier of the update list page according to the update data; The creation module is further configured to execute, when the judgment module determines that there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier, and set a timing time of the task timer; A second updating module is configured to execute when the judging module determines that there is a task timer corresponding to the task identifier, and when the timing time of the task timer is reached, update the task associated with the timer; The second removal module is configured to remove the task timer when the second update module completes the task update.
12. The data updating device according to claim 10, characterized in that: The refresh module also includes: A detection module is configured to detect whether there is a task associated with the task timer when the timing time of the task timer is reached; The first updating module is further configured to execute, when the detection module detects that there is a task associated with the task timer, updating the task associated with the task timer; The third removing module is configured to directly remove the task timer when the detecting module detects that there is no task associated with the task timer.
13. The data updating device according to any one of claims 10 to 12, characterized in that: The acquisition module includes: a sending module and a first receiving module; and / or a second receiving module, wherein: The sending module is configured to execute sending an update request within a preset time period to the server; The first receiving module is configured to receive update data fed back by the server within the preset time period; The second receiving module is configured to receive the update data actively sent by the server within a preset time period.
14. The data updating device according to any one of claims 10 to 12, characterized in that: The device also includes: The clearing module is configured to clear the cached update data after the updating module updates the corresponding data in the list page.
15. The data updating device according to any one of claims 10 to 12, characterized in that: The device further comprises: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions comprise: The difference between the current time of updating the data and the last time of updating is greater than a preset time interval; or The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
16. A data updating device, applied to a server, characterized in that: include: An acquisition module is configured to acquire update data within a preset time period; A cache module, configured to cache the update data; a sending module configured to send the update data cached within the preset time period to the terminal when the current time of the update data meets the preset condition, so that the terminal updates the corresponding data in the list page according to the received update data, and refreshes the list page after the update data; The terminal updates corresponding data in the list page according to the received update data, including: Modify the update time of the cached update data to the current time; The updated data after the modification time is sorted by time to replace the corresponding data on the list page; The list page after refreshing and updating the data includes: Generate a task identifier for an update list page according to the update data; If there is no task timer corresponding to the task identifier, create a task timer corresponding to the task identifier and set the timing time of the task timer; When the timing time of the task timer is reached, updating the task associated with the task timer; After the task update is completed, the task timer is removed.
17. The data updating device according to claim 16, characterized in that: The device also includes: A receiving module is configured to execute when an update request within the preset time period is received from a terminal; An extraction module, configured to extract the update data within the preset time period from the cache according to the update request; The sending module is further configured to execute the step of sending the update data cached within the preset time period to the terminal when the current time of the update data meets the preset condition.
18. The data updating device according to claim 16 or 17, characterized in that: The device further comprises: a setting module configured to perform pre-setting of preset conditions, wherein the preset conditions comprise: The difference between the current time of updating the data and the last time of updating is greater than a preset time interval; or The current time of the updated data is greater than the sum of the current time when the last updated data was passed to the list and a preset time interval.
19. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data updating method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data updating method according to any one of claims 1 to 9.
