Incremental data processing method, device and equipment and computer readable storage medium

By binding timer tasks and time interval configurations to view items, the problem of chaotic network requests when view items share child components is solved, independent timed refresh and data accuracy are achieved, and the user experience is improved.

CN116185399BActive Publication Date: 2025-12-16CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211616604.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-15
Publication Date
2025-12-16
Estimated Expiration
2042-12-15

AI Technical Summary

Technical Problem

In the development of existing real-time display pages, when a batch of view items share the same sub-component, modifying the refresh interval of one view item will affect other view items, causing network request chaos and affecting the implementation of an independent timed refresh mechanism.

Method used

By binding timer tasks and time interval configurations to view items, the user's configuration for the current view item only applies to the current view item and does not affect other view items. By utilizing the binding mechanism of incremental data requests and timer tasks, the refresh interval and data updates of each view item can be managed independently.

Benefits of technology

It enables independent timed refreshes for each view item, avoiding network request chaos, improving the user experience, and ensuring data accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116185399B_ABST
    Figure CN116185399B_ABST
Patent Text Reader

Abstract

The application discloses a kind of incremental data processing method, device, equipment and computer readable storage medium, the method includes: in the case where receiving the operation of user to target view item modification refresh time interval, change the attribute value corresponding to the predetermined refresh time interval attribute of the target view item, in the case where receiving the incremental data request of user to the target view item, establish new timer task, and the timer task is deposited in the predetermined timer task attribute of the target view item;The timer task is executed.Such can be configured to batch view item single view item, bind timer task and time interval in attribute Configuration, so that the configuration of user to current view item only acts on current view item, does not affect other view items.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of Internet, and particularly relates to an incremental data processing method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] In the existing real-time display page development process, batch view items need to be displayed, and these view items all reuse a same subcomponent. Each view item initiates an incremental data request through a timer when being referenced, and an initial time interval is defined.

[0003] If the time interval is modified in a subcomponent, the time interval of other view items reusing the subcomponent will be associatedly affected, multiple view items simultaneously initiate multiple requests, network requests increase and are very chaotic, and the implementation of the independent timing refreshing mechanism of multiple view items is affected. SUMMARY

[0004] Embodiments of the present application provide an incremental data processing method, device, equipment and computer readable storage medium, which can bind a timer task and a time interval configuration in attributes for a single view item in batch view items, so that the configuration of the user for the current view item only acts on the current view item and does not affect other view items.

[0005] In a first aspect, embodiments of the present application provide an incremental data processing method, and the method comprises:

[0006] In a case where a user's operation of modifying a refreshing time interval of a target view item is received, a preset attribute value corresponding to a refreshing time interval attribute of the target view item is changed;

[0007] In a case where a user's incremental data request for the target view item is received, a new timer task is established, and the timer task is stored in a preset timer task attribute of the target view item;

[0008] The timer task is executed.

[0009] In one possible implementation, the timer task is executed, and specifically comprises:

[0010] Target information carried in the incremental data request is obtained, and the target information at least comprises an index of the target view item;

[0011] The target view item is queried from multiple view items according to the index of the target view item, and a refreshing time interval corresponding to the target view item is obtained;

[0012] Incremental data of the target view item is obtained according to the target information;

[0013] add the incremental data to the tail of the target view item, and delete corresponding amount of data in the head of the target view item.

[0014] In one possible implementation, the target information further includes a start time, an end time, and an ID of the target view item.

[0015] The timer task is executed, and specifically further includes:

[0016] When the incremental data is acquired, the tail of the target view item is updated to the start time, the current system time is updated to the end time, and a new incremental data request is initiated according to the updated start time, the updated end time, the index of the target view item, and the ID of the target view item.

[0017] When the incremental data is not acquired, the current system time is updated to the end time, and a new incremental data request is initiated according to the un-updated start time, the updated end time, the index of the target view item, and the ID of the target view item.

[0018] In one possible implementation, the incremental data of the target view item is acquired according to the target information, and specifically includes:

[0019] It is judged whether the callback result is received within the refresh time interval;

[0020] In the case that the callback result is received within the refresh time interval, it is judged whether the callback result is incremental data;

[0021] In the case that the callback result is incremental data, it is judged whether there is simulation data in the tail of the target view item;

[0022] The incremental data is added to the tail of the target view item, and corresponding amount of data in the head of the target view item is deleted, and specifically includes:

[0023] If there is simulation data in the tail of the target view item, a first amount of simulation data in the tail of the target view item is determined, a first amount of first incremental data in the incremental data is used to cover the same amount of simulation data in the tail, a second amount of incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and corresponding amount of data in the head of the target view item is deleted;

[0024] If there is no simulation data in the tail of the target view item, the incremental data is added to the tail of the target view item, and corresponding amount of data in the head of the target view item is deleted.

[0025] In one possible implementation, if the first quantity is greater than 0, the first quantity of the first incremental data in the incremental data is used to cover the same quantity of the simulation data in the tail, and the second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and the data corresponding to the second incremental data in the head of the target view item is deleted, and the method specifically comprises the following steps.

[0026] determining whether the first quantity is greater than 0;

[0027] If the first quantity is greater than 0, the first quantity of the first incremental data in the incremental data is used to cover the same quantity of the simulation data in the tail, and the second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and the data corresponding to the second incremental data in the head of the target view item is deleted;

[0028] If the first quantity is equal to 0, the incremental data is added to the tail of the target view item, and the data corresponding to the incremental data in the head of the target view item is deleted.

[0029] In one possible implementation, according to the target information, the incremental data of the target view item is obtained, and the method specifically further comprises the following steps.

[0030] In the case that the callback result is not received within the refresh time interval, the simulation data is generated by using the stock data of the target view item;

[0031] The incremental data is added to the tail of the target view item, and the data corresponding to the incremental data in the head of the target view item is deleted, and the method specifically comprises the following steps.

[0032] The simulation data is added to the tail of the target view item, and the data corresponding to the simulation data in the head of the target view item is deleted.

[0033] In one possible implementation, the simulation data is generated by using the stock data of the target view item, and the method specifically comprises the following steps.

[0034] The stock data is equally divided into N intervals, the data in each interval is sorted, the median of each interval is obtained, and N is a positive integer;

[0035] The N medians are fitted based on the least square method to obtain a target function equation;

[0036] The simulation data is predicted based on the target function equation.

[0037] In one possible implementation, after the simulation data is added to the tail of the target view item, and the data corresponding to the simulation data in the head of the target view item is deleted, the method further comprises the following steps.

[0038] The callback result is continued to be waited for within the refresh time interval.

[0039] If the callback result is received within the refresh time interval and the callback result is incremental data, the incremental data is used to overwrite the simulation data in the tail of the target view item.

[0040] In a second aspect, the embodiments of the present application provide an incremental data processing apparatus, and the apparatus comprises:

[0041] The changing module is configured to change the attribute value corresponding to the preset refresh time interval attribute of the target view item in the case that the operation of modifying the refresh time interval of the target view item by the user is received.

[0042] The storing module is configured to establish a new timer task and store the timer task in the preset timer task attribute of the target view item in the case that the incremental data request of the target view item by the user is received.

[0043] The executing module is configured to execute the timer task.

[0044] In a third aspect, the embodiments of the present application provide an electronic device, and the device comprises:

[0045] a processor and a memory storing computer program instructions;

[0046] The processor implements the incremental data processing method of any one of the above aspects when executing the computer program instructions.

[0047] In a fourth aspect, the embodiments of the present application provide a computer storage medium,

[0048] The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the incremental data processing method of any one of the above aspects.

[0049] In a fifth aspect, the embodiments of the present application provide a computer program product, and the instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to execute the incremental data processing method of any one of the above aspects.

[0050] The application embodiment provides an incremental data processing method, device, equipment and computer storage medium. The incremental data processing method comprises the following steps: pre-configuring a timer task attribute and a refresh time interval attribute of each view item; in the case that a user's operation of modifying the refresh time interval of a target view item is received, changing the attribute value corresponding to the refresh time interval attribute of the target view item; in the case that a user's incremental data request for the target view item is received, establishing a new timer task, and storing the timer task in the timer task attribute of the target view item, and executing the timer task. Thus, the timer task and the time interval configuration can be bound in the attribute for a single view item in a batch view item, so that the user's configuration for the current view item only acts on the current view item, and does not affect other view items. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the application embodiments, the following will briefly introduce the drawings needed to be used in the application embodiments. Those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0052] Figure 1 FIG. 1 is a flowchart of an incremental data processing method according to an application embodiment;

[0053] Figure 2 FIG. 2 is a flowchart of an incremental data processing method according to another application embodiment;

[0054] Figure 3 FIG. 3 is a flowchart of an incremental data request processing method according to another application embodiment;

[0055] Figure 4 FIG. 4 is a flowchart of an incremental data request result processing method according to another application embodiment;

[0056] Figure 5 FIG. 5 is a structural diagram of an incremental data processing device according to an application embodiment;

[0057] Figure 6 FIG. 6 is a structural diagram of an incremental data processing equipment according to an application embodiment. DETAILED DESCRIPTION

[0058] In order to make the purposes, technical solutions, and advantages of the present application clearer, further understood, and easier to appreciate, the following will further describe the present application in detail with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.

[0059] It should be noted that, in this document, the terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0060] It should be understood that the term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this document generally represents that the front and rear associated objects have an "or" relationship.

[0061] Various modifications and changes can be made to the present application without departing from the spirit or scope of the present application, which will be apparent to those skilled in the art. Therefore, the present application is intended to cover the modifications and changes of the present application falling within the scope of the corresponding claims (claimed technical solutions) and their equivalents. It should be noted that the implementation modes provided by the embodiments of the present application can be combined with each other without contradiction.

[0062] In the existing real-time display page development process, batch view items need to be displayed, and these view items all reuse the same subcomponent. Each view item initializes an incremental data request through a timer when referenced, and defines an initial time interval. If the time interval is modified in a subcomponent, it will affect the time intervals of other view items reusing the subcomponent, and multiple view items will simultaneously initiate multiple requests, resulting in an increase in network requests and a great confusion, which affects the implementation of the independent timing refresh mechanism of multiple view items.

[0063] To solve the prior art problems, the embodiment of the present application provides an incremental data processing method, device, equipment and computer storage medium. First, the incremental data processing method provided by the embodiment of the present application is introduced.

[0064] Figure 1 The flowchart of the incremental data processing method provided by the embodiment of the present application is shown.

[0065] As Figure 1 shown, the incremental data processing method provided by the embodiment of the present application includes the following steps.

[0066] S110, in the case of receiving the operation of the user for modifying the refresh time interval of the target view item, the attribute value corresponding to the predetermined refresh time interval attribute of the target view item is changed.

[0067] Here, the operation of the user for modifying the refresh time interval of the target view item does not affect other view items. The refresh time interval attribute is the attribute of the refresh time interval, and the refresh time interval is bound to the refresh time interval attribute. One attribute can correspond to different attribute values, or can correspond to different contents.

[0068] In some embodiments, the target view item can be the current view item.

[0069] S120, in the case of receiving the incremental data request of the user for the target view item, a new timer task is established, and the timer task is stored in the predetermined timer task attribute of the target view item.

[0070] Here, the timer task attribute is the attribute of the timer task, and the timer task is bound to the timer task attribute. One attribute can correspond to different attribute values, or can correspond to different contents.

[0071] In some embodiments, the new timer task can overwrite the existing timer task in the predetermined timer task attribute of the target view item.

[0072] S130, the timer task is executed.

[0073] Here, the timer task can be a new timer task stored in the predetermined timer task attribute of the target view item.

[0074] In this way, for a single view item in a batch view item, the timer task and the time interval configuration are bound in the attribute, so that the configuration of the user for the current view item only acts on the current view item, and does not affect other view items.

[0075] Based on this, in some embodiments, the above S130 can specifically include:

[0076] acquire target information carried in the incremental data request, the target information at least including an index of the target view item;

[0077] According to the index of the target view item, the target view item is queried from the plurality of view items, and a refresh time interval corresponding to the target view item is acquired.

[0078] According to the target information, the incremental data of the target view item is acquired.

[0079] The incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

[0080] In some embodiments, according to the index of the target view item, the target view item to be operated can be acquired from the plurality of view items, and the refresh time interval corresponding to the target view item is acquired.

[0081] In some embodiments, in the case that the user receives the incremental data request for the target view item, according to the target information carried in the incremental data request, the incremental data of the target view item is acquired.

[0082] In some embodiments, in the case that the incremental data of the target view item is acquired, the incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item, which corresponds to the incremental data added to the tail of the target view item, is deleted.

[0083] In this way, the incremental data is added, and the original data is deleted, so that the data in the view item is updated.

[0084] Based on this, in some embodiments, the target information can further include a start time, an end time, and an ID of the target view item.

[0085] The timer task is executed, and specifically can further include:

[0086] When the incremental data is acquired, the time corresponding to the tail of the target view item is updated to the start time, the current system time is updated to the end time, and a new incremental data request is initiated according to the updated start time, the updated end time, the index of the target view item, and the ID of the target view item;

[0087] When the incremental data is not acquired, the current system time is updated to the end time, and a new incremental data request is initiated according to the un-updated start time, the updated end time, the index of the target view item, and the ID of the target view item.

[0088] In some embodiments, according to the updated start time or the un-updated start time, the updated end time, the index of the target view item and the ID of the target view item, a new incremental data request is initiated, a new timer task is established, and the timer task is stored in the timer task attribute of the target view item, and the new timer task replaces the original timer task.

[0089] In this way, the new incremental data request is continuously initiated, and the continuous updating of the view item is realized.

[0090] Based on this, in some embodiments, according to the target information, the incremental data of the target view item is obtained, specifically including:

[0091] It is judged whether the callback result is received within the refresh time interval;

[0092] In the case that the callback result is received within the refresh time interval, it is judged whether the callback result is incremental data;

[0093] In the case that the callback result is incremental data, it is judged whether there is simulation data in the tail of the target view item;

[0094] The incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, specifically including:

[0095] If there is simulation data in the tail of the target view item, a first amount of simulation data in the tail of the target view item is determined, and a first amount of first incremental data in the incremental data is used to cover the same amount of simulation data in the tail, and a second amount of incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted;

[0096] If there is no simulation data in the tail of the target view item, the incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

[0097] Here, the simulation data can be data calculated according to a predetermined calculation rule on the data existing in the target view item. The target view item can be the current view item. The first amount can be the amount of simulation data in the tail of the target view item, and the same amount of incremental data is used to cover the simulation data in the tail, and the remaining incremental data in the entire incremental data is added to the tail of the target view item, and the same amount of data in the head of the target view item as the incremental data added to the tail is deleted.

[0098] In some embodiments, in the case that the callback result is not incremental data, a new incremental data request is initiated according to the un-updated start time, the current time of the system, the index of the target view item and the ID of the target view item.

[0099] As an example, if the callback result is received within the refresh time interval and there is no simulation data in the existing data, the incremental data is added to the tail of the data in full, and then the removal of the head part data of the current view item is performed accordingly; if the callback result is received within the refresh time interval and there is simulation data in the existing data, the number of which is count, the first count items of the incremental data are used to cover the same number of simulation data at the tail, count is set to 0, and the remaining incremental data is added to the tail of the current view item, and then the removal of the head part data of the current view item is performed accordingly.

[0100] In this way, the simulation data is covered to ensure the authenticity of the data, the incremental data is added to the tail of the target view item, and the data corresponding to the number of the head part of the target view item is deleted, the data in the target view item is updated, and after receiving the real data, the real data is continuously fitted into the view, so that the phenomenon of too large single jump amplitude of the view can be avoided.

[0101] Based on this, in some embodiments, the first number of first incremental data in the incremental data is used to cover the same number of simulation data at the tail, and the second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and the data corresponding to the number of the second incremental data in the head of the target view item is deleted, and the specific operations include:

[0102] determining whether the first number is greater than 0;

[0103] If the first number is greater than 0, the first number of first incremental data in the incremental data is used to cover the same number of simulation data at the tail, and the second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and the data corresponding to the number of the second incremental data in the head of the target view item is deleted;

[0104] If the first number is equal to 0, the incremental data is added to the tail of the target view item, and the data corresponding to the number of the incremental data in the head of the target view item is deleted.

[0105] In this way, the number of data in the incremental data that needs to be covered in the tail can be determined by the first number.

[0106] Based on this, in some embodiments, according to the target information, the incremental data of the target view item is obtained, and the specific operations further include:

[0107] In the case that the callback result is not received within the refresh time interval, simulation data is generated by using the stock data of the target view item;

[0108] The incremental data is added to the tail of the target view item, and the data corresponding to the number of the head of the target view item is deleted, and the specific operations include:

[0109] add the simulation data to the tail of the target view item, and delete data corresponding to the simulation data from the head of the target view item.

[0110] Here, the inventory data can be data in the target view item, and the target view item can be the current view item.

[0111] In some embodiments, after adding the simulation data to the tail of the target view item and deleting data corresponding to the simulation data from the head of the target view item, the number of simulation data is recorded using the simulation data counter.

[0112] In this way, the construction and filling of simulation data are performed, unknown quantities are predicted based on existing data, and the phenomenon of long-term suspension of the view without receiving callback results is avoided.

[0113] Based on this, in some embodiments, simulation data is generated based on inventory data of the target view item, specifically including:

[0114] The inventory data is evenly divided into N intervals, the data in each interval is sorted, the median of each interval is obtained, and N is a positive integer;

[0115] Based on the least squares method, the N medians are fitted to obtain a target function equation;

[0116] Based on the target function equation, simulation data is predicted.

[0117] In some embodiments, the least squares method is used to find one or a group of estimated values, so that the estimated values are as similar as possible to the true values, where the estimated values are simulation data and the true values are incremental data.

[0118] As an example, the inventory data is evenly divided into 20 intervals, the data in each interval is sorted, the median of each interval is obtained, and based on the 20 medians, the least squares method is used to find a binary first-order equation that is closest to the 20 medians, and the simulation data is predicted using the binary first-order equation.

[0119] In this way, the simulation data can be as similar as possible to the incremental data received in the case of receiving callback results within the refresh time interval.

[0120] Based on this, in some embodiments, after adding the simulation data to the tail of the target view item and deleting data corresponding to the simulation data from the head of the target view item, it further includes:

[0121] Continue to wait for callback results within the refresh time interval;

[0122] If the callback result is received within the refresh time interval and is incremental data, the incremental data is used to overwrite the simulation data in the tail of the target view item.

[0123] In some embodiments, after the simulation data is added to the tail of the target view item and the data corresponding to the simulation data in the head of the target view item is deleted, it is determined whether the callback result is received within the refresh time interval for the original incremental data request.

[0124] In some embodiments, if the callback result is received within the refresh time interval, the callback result is incremental data, and the number of simulation data is greater than 0, the incremental data is used to overwrite the simulation data in the tail of the target view item, and the change in the number of simulation data in the target view item is recorded using the simulation data counter.

[0125] In this way, the existing simulation data is overwritten after the result callback, which can avoid the phenomenon that the view is paused for a long time after timeout due to network request blocking. In the process of constructing simulation data and receiving real data, the real data is continuously fitted into the view, reducing the phenomenon that the view jumps too much. While solving the request accumulation problem and ensuring data accuracy, the user experience is greatly improved.

[0126] The application also provides another implementation manner of the incremental data processing method, as shown in Figure 2 The another implementation manner of the incremental data processing method provided by the application can include steps 1 to 4.

[0127] Step 1: two attributes are defined under the view item, which are the timer task attribute and the refresh time interval attribute;

[0128] Step 2: when the incremental data request is recursively initiated, the new timer task can overwrite the original timer task in the timer task attribute;

[0129] Step 3: when the user modifies the refresh time interval of a single view item, the corresponding attribute value in the view item is changed;

[0130] Step 4: when the refresh time interval is exceeded, a new round of incremental data request is initiated, and the latest attribute value of the view item is used in the incremental data request to execute the new round of timer task.

[0131] In some embodiments, the timer task is attribute-bound with the view item, the new timer task is used to overwrite the original timer task when recursively called, the latest timer task is executed, and the timer tasks between view items do not interfere with each other.

[0132] In some embodiments, the refresh time interval configuration is property-bound with the view item, when a single view item refresh time interval modification is made, the corresponding property value in the view item is changed, and the time property value of the current view item is re-acquired in the incremental data request to perform the execution time assignment of the timer, so that the user's configuration of the current view only acts on the current view item.

[0133] The processing procedure of the incremental data request is described in detail below, referring to Figure 3 , Figure 3 The flowchart of the processing procedure of the incremental data request is shown in FIG. 2. The main steps are as follows:

[0134] Step 1: The target information of the incremental data request can include but is not limited to the start time, the end time, the index index of the target view item, and the ID of the target view item.

[0135] Step 2: According to the index index of the target view item, the current view item is acquired from the full view item data, and the refresh time interval thereof is acquired.

[0136] Step 3: The incremental data request is initiated according to the target information transmitted, and the following steps are executed according to the callback result.

[0137] Step 4: If the callback is successful, the returned incremental data is added to the tail of the view item data, and the removal of the head part of the data of the view item is simultaneously performed.

[0138] Step 5: The time of the tail item is updated to the start time, and the current system time is acquired as the end time.

[0139] Step 6: According to the latest start time, the end time, the index index of the target view item, and the ID of the target view item, a new round of incremental data request is initiated using the timer task, and the property in the view item is assigned to overwrite the original timer task.

[0140] Step 7: If the callback fails, the current system time is acquired as the end time.

[0141] Step 8: According to the original start time, the end time, the index index of the target view item, and the ID of the target view item, a new round of incremental data request is initiated using the timer task, and the property in the view item is assigned to overwrite the original timer task.

[0142] In some embodiments, the incremental data request can be an incremental data http request.

[0143] The processing procedure of the incremental data request result is described in detail below, referring to Figure 4 , Figure 4The processing flowchart of the incremental data request result is shown in the following steps:

[0144] Step 1: Two attributes are bound in the view item, wherein the timer task attribute can be used to initiate the incremental data request, and the refresh time interval attribute is used to store the time interval configured by the user;

[0145] Step 2: It is judged whether there is a callback result of the incremental data request in the refresh time interval, and steps 3 and 7 are performed according to the judgment result;

[0146] Step 3: If there is a callback result, it is judged whether the callback is successful (i.e., whether the callback result is incremental data, and the callback result is incremental data if the callback is successful, and the callback result is not incremental data if the callback fails);

[0147] Step 4: If the callback is successful and the existing data does not contain simulation data, the returned incremental data is added to the tail of the data in full, and then the removal of the partial data in the view header is performed accordingly;

[0148] Step 5: If the callback is successful and the existing data contains simulation data, the number of which is count, the incremental data needs to be overlaid with the same number of simulation data at the tail, count is set to 0, and the remaining incremental data is added to the tail of the data, and then the removal of the partial data in the view header is performed accordingly;

[0149] Step 6: If the callback fails, the old start time and the current system time are used as request parameters to re-trigger the incremental data request;

[0150] Step 7: If there is no callback result, simulation data construction operation needs to be performed;

[0151] Step 8: The inventory data is evenly divided into 20 intervals, and the median of the data in each interval is calculated by sorting and evaluating;

[0152] Step 9: According to the 20 medians, a binary linear equation y=ax+b with the shortest distance to the 20 numbers is calculated by using the least square method, and the value of the simulation data is calculated from the equation;

[0153] Step 10: After obtaining the simulation data, it is added to the tail of the data, and then the removal of the partial data in the view header is performed accordingly, and the number of simulation data count recorded by the simulation counter is increased by 1;

[0154] Step 11: After adding the simulation data, it is still necessary to observe whether the original request has a result callback;

[0155] Step 12: If there is a result callback and the simulation data count > 0, the returned incremental data is overlaid on the simulation data already added in the view, and the simulation data count recorded by the simulation data counter is count-1;

[0156] Step 13: If there is no result callback, no operation is performed;

[0157] The simulation data counter is used to record the number of current simulation data, and the number of simulation data is count, and the initial value is 0.

[0158] In some embodiments, there is a callback result without blocking of the incremental data request. After the callback succeeds, if count > 0, the simulation data with a length of count is overlaid from the tail, if count = 0, the returned incremental data is added at the tail, and the removal of the view header part data is performed accordingly, and then the next round of incremental data request is triggered actively. After the callback fails, the original start time and the current latest time are used as the start and end time parameters to initiate the incremental data request.

[0159] In some embodiments, in the case of blocking of the incremental data request, the incremental data request is monitored and the request state is judged. If the callback result of the incremental data request is not received within the refresh interval time, the existing quantity data of the view is processed.

[0160] As an example, the steps of processing the existing quantity data of the view are as follows: 1, the quantity data X all is divided into 20 intervals, and the median of each interval is calculated, and the interval data is X1,...X N When N is odd, the median m 0.5 = X (N+1) / 2 When N is even, the median m 0.5 = [X (N / 2 )+X (N / 2+1) ] / 2; 2, after obtaining the median array m[], the least square method is used to operate m[], a binary linear equation closest to all points is calculated, and then the simulation data of the next time node is calculated according to the equation; 3, the constructed simulation data is spliced to the tail (simulation data construction is performed once every time the incremental data request is blocked, and count+1 is added, and so on), and then the removal of the view header part data is performed accordingly, so that the total number of the chart is unchanged.

[0161] In some embodiments, after the simulation data is added, the original request is still waiting for the callback result. If the callback is successful, the returned real data will cover the added simulation data, and the next round of incremental data request is initiated, so that if there is real data returned after the simulation data is added, the chart can continue to correct itself. If the callback fails, the next round of incremental data request is initiated.

[0162] If the waiting time is too long, the incremental data request eventually fails, and there is still no callback result, the timer task will still continue to work, and after a fixed time, the next request will be initiated based on the original start and end time.

[0163] According to the embodiments provided in the present application, the incremental data request is monitored, the state of the request is judged in real time, and for the request that has not returned for more than the refresh time interval, the interval is divided, the median is found, the simulation data is constructed and filled by using the least square method, and the view header part data is removed at the same time. When the request has a result callback, the simulation data is covered. The problem of long-time suspension of the view due to network request timeout or blocking in the concurrent incremental data request initiated automatically at a certain time interval is solved.

[0164] According to the embodiments provided in the present application, the problem of accumulation of incremental data requests is solved, and a good timing refresh interactive experience is provided for users; on the other hand, in the process of continuous data covering and fitting, the accuracy of the data is ensured.

[0165] Based on the incremental data processing method provided in the above embodiments, the present application also provides a specific implementation mode of an incremental data processing device. Please refer to the following embodiments.

[0166] Firstly, referring to Figure 5 The incremental data processing device 500 provided in the embodiments of the present application comprises:

[0167] The changing module 510 is configured to change the attribute value corresponding to the predetermined refresh time interval attribute of the target view item in the case that the operation of modifying the refresh time interval of the target view item by the user is received;

[0168] The storage module 520 is configured to establish a new timer task in the case that the incremental data request of the target view item by the user is received, and store the timer task in the predetermined timer task attribute of the target view item;

[0169] The execution module 530 is configured to execute the timer task.

[0170] Based on this, in some embodiments, the execution module 530 specifically comprises:

[0171] The obtaining sub-module is configured to obtain target information carried in the incremental data request, the target information at least including an index of a target view item;

[0172] The querying sub-module is configured to query the target view item from the plurality of view items according to the index of the target view item, and obtain a refresh time interval corresponding to the target view item;

[0173] The obtaining sub-module is further configured to obtain incremental data of the target view item according to the target information.

[0174] The adding sub-module is configured to add the incremental data to a tail of the target view item, and delete a corresponding amount of data in a head of the target view item.

[0175] Based on this, in some embodiments, the target information further includes a start time, an end time and an ID of the target view item.

[0176] The execution module 530 is specifically further configured to:

[0177] when the incremental data is obtained, update a time corresponding to the tail of the target view item as the start time, update a current system time as the end time, and initiate a new incremental data request according to the updated start time, the updated end time, the index of the target view item and the ID of the target view item;

[0178] when the incremental data is not obtained, update the current system time as the end time, and initiate a new incremental data request according to the un-updated start time, the updated end time, the index of the target view item and the ID of the target view item.

[0179] Based on this, in some embodiments, the obtaining sub-module specifically includes:

[0180] The first judging unit is configured to judge whether a callback result is received within the refresh time interval;

[0181] The first judging unit is further configured to, in a case that the callback result is received within the refresh time interval, judge whether the callback result is incremental data;

[0182] The first judging unit is further configured to, in a case that the callback result is incremental data, judge whether there is simulation data in the tail of the target view item;

[0183] The adding sub-module is specifically configured to:

[0184] If the tail of the target view item has the simulation data, a first quantity of the simulation data in the tail of the target view item is determined, a first quantity of the first incremental data in the incremental data is used to cover the same quantity of the simulation data in the tail, a second quantity of the incremental data except the first incremental data is added to the tail of the target view item, and a quantity of data corresponding to the second incremental data in the head of the target view item is deleted;

[0185] If the tail of the target view item has no simulation data, the incremental data is added to the tail of the target view item, and a quantity of data corresponding to the incremental data in the head of the target view item is deleted.

[0186] Based on this, in some embodiments, the adding submodule specifically comprises:

[0187] The second judging unit is further configured to judge whether the first quantity is greater than 0;

[0188] The first covering unit is configured to, if the first quantity is greater than 0, use a first quantity of the first incremental data in the incremental data to cover the same quantity of the simulation data in the tail, add a second quantity of the incremental data except the first incremental data to the tail of the target view item, and delete a quantity of data corresponding to the second incremental data in the head of the target view item.

[0189] The first adding unit is configured to, if the first quantity is equal to 0, add the incremental data to the tail of the target view item, and delete a quantity of data corresponding to the incremental data in the head of the target view item.

[0190] Based on this, in some embodiments, the obtaining submodule specifically further comprises:

[0191] The generating unit is configured to, in a case where the callback result is not received within the refresh time interval, generate the simulation data by using the inventory data of the target view item;

[0192] The second adding unit is configured to add the incremental data to the tail of the target view item, and delete a quantity of data corresponding to the incremental data in the head of the target view item, and specifically comprises:

[0193] The second adding unit is further configured to add the simulation data to the tail of the target view item, and delete a quantity of data corresponding to the simulation data in the head of the target view item.

[0194] Based on this, in some embodiments, the generating unit is specifically configured to:

[0195] The inventory data is equally divided into N intervals, the data in each interval is sorted, a median of each interval is obtained, and N is a positive integer;

[0196] The N medians are fitted based on the least square method, and a target function equation is obtained.

[0197] Based on the target function equation, the simulation data is predicted.

[0198] Based on this, in some embodiments, the acquisition submodule further includes:

[0199] The waiting unit is configured to, after adding the simulation data to the tail of the target view item and deleting the data corresponding to the simulation data in the head of the target view item, continue to wait for the callback result within the refresh time interval.

[0200] The second covering unit is configured to, if the callback result is received within the refresh time interval and the callback result is the incremental data, cover the simulation data in the tail of the target view item with the incremental data.

[0201] The various modules of the incremental data processing apparatus provided by the embodiments of the present application can realize Figure 1 、 Figure 2 、 Figure 3 and Figure 4 provide the functions of each step of the incremental data processing method and achieve the corresponding technical effects. For brevity, they will not be described here.

[0202] Based on the same inventive concept, the embodiments of the present application also provide an electronic device.

[0203] Figure 6 The hardware structure schematic diagram of the incremental data processing apparatus provided by the embodiments of the present application is shown.

[0204] The incremental data processing apparatus can include a processor 601 and a memory 602 having computer program instructions stored therein.

[0205] Specifically, the processor 601 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.

[0206] The memory 602 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 602 can include removable or non-removable (or fixed) media. Where appropriate, the memory 602 can be internal or external to the integrated gateway disaster recovery appliance. In particular embodiments, the memory 602 is non-volatile, solid-state memory.

[0207] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to access the data and / or instructions that enable the operations described with reference to the methods according to the aspects of the present disclosure.

[0208] The processor 601 implements any one of the incremental data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 602.

[0209] In one example, the incremental data processing device can further include a communication interface 603 and a bus 610. Wherein, as shown in the figure, the processor 601, the memory 602, the communication interface 603 are connected through the bus 610 and complete the communication between each other. Figure 6

[0210] The communication interface 603 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.

[0211] ​Bus 610 includes a hardware, software, or both, that couples components of the incremental data processing device to each other. As an example and not by way of limitation, the bus can include an accelerated graphics port (AGP) or other graphics bus, an extended industry standard architecture (EISA) bus, a front side bus (FSB), a Hyper Transport (HT) interconnect, an industry standard architecture (ISA) bus, an InfiniBand (IB) interconnect, a low pin count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards board (VESA) local bus (VLB), or another suitable bus or a combination of two or more of these. Where appropriate, bus 610 can include one or more buses. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect. The electronic device can perform the incremental data processing method in the embodiments of the application, thereby realizing the incremental data processing method described above.

[0212] In addition, in combination with the incremental data processing method in the above embodiments, the embodiments of the application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to realize any one of the incremental data processing methods in the above embodiments.

[0213] The application also provides a computer program product, instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device executes each process of realizing any one of the incremental data processing method embodiments described above.

[0214] It is to be understood that the application is not limited to particular configurations and processes described herein and shown in the drawings. For simplicity, detailed descriptions of known methods and apparatuses are omitted so as not to obscure the disclosure. In the above-described embodiments, several specific steps are described and illustrated in order to provide a thorough understanding of the method processes. However, the method processes according to the application can be performed in a number of different sequences and formats as would be understood by one skilled in the art. The method processes described herein are also not limited to any particular order or sequence of steps.

[0215] The functional blocks shown in the block diagrams described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, and the like. When implemented in software, the elements of the application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transfer information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact discs (CD-ROM), optical disks, hard disks, fiber-optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.

[0216] It is also to be understood that the example embodiments described in this application are based on a series of steps or apparatuses to describe some methods or systems. However, the application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.

[0217] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0218] The above is merely specific implementation of the present application, and those skilled in the art can clearly understand the specific working processes of the system, module and unit described above for the convenience and brevity of description, which can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein. It should be understood that the protection scope of the present application is not limited in this way, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application.

Claims

1. A method of processing incremental data, characterized by, The method comprises the following steps: In the case of receiving a user's operation of modifying the refresh time interval of a target view item, the attribute value corresponding to the preset refresh time interval attribute of the target view item is changed; In the case of receiving a user's request for incremental data of the target view item, a new timer task is established and stored in the preset timer task attribute of the target view item; The timer task is executed; The execution of the timer task specifically comprises the following steps: Target information carried in the incremental data request is obtained, wherein the target information at least comprises the index of the target view item; According to the index of the target view item, the target view item is queried from a plurality of view items, and the refresh time interval corresponding to the target view item is obtained; According to the target information, the incremental data of the target view item is obtained; A corresponding amount of the incremental data is added to the target view item, and a corresponding amount of data in the original data in the target view item is deleted, so as to update the data in the target view item.

2. The method of claim 1, wherein, The execution of the timer task specifically comprises the following steps: The incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

3. The method of claim 2, wherein, The target information further comprises a start time, an end time and an ID of the target view item; The execution of the timer task specifically further comprises the following steps: When the incremental data is obtained, the time corresponding to the tail of the target view item is updated to the start time, the current system time is updated to the end time, and a new incremental data request is initiated according to the updated start time, the updated end time, the index of the target view item and the ID of the target view item; When the incremental data is not obtained, the current system time is updated to the end time, and a new incremental data request is initiated according to the un-updated start time, the updated end time, the index of the target view item and the ID of the target view item.

4. The method of claim 1, wherein, The obtaining of the incremental data of the target view item according to the target information specifically comprises the following steps: It is judged whether a callback result is received within the refresh time interval; In the case that a callback result is received within the refresh time interval, it is judged whether the callback result is the incremental data; In the case that the callback result is the incremental data, it is judged whether there is simulation data in the tail of the target view item; The adding of the incremental data to the tail of the target view item and the deleting of a corresponding amount of data in the head of the target view item specifically comprise the following steps: If there is simulation data in the tail of the target view item, the first amount of simulation data in the tail of the target view item is determined, the first amount of simulation data in the tail is covered by the first amount of incremental data in the incremental data, the second amount of incremental data in the incremental data except the first amount of incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item corresponding to the second amount of incremental data is deleted. If the tail of the target view item does not exist simulation data, the incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

5. The method of claim 4, wherein, The first amount of first incremental data in the incremental data is used to cover an equal amount of simulation data in the tail, and second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, and the first amount of first incremental data in the incremental data is used to cover an equal amount of simulation data in the tail, and second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, specifically comprising: determining whether the first amount is greater than 0; If the first amount is greater than 0, the first amount of first incremental data in the incremental data is used to cover an equal amount of simulation data in the tail, and second incremental data in the incremental data except the first incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted. If the first amount is equal to 0, the incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

6. The method of claim 4, wherein, The incremental data of the target view item is obtained according to the target information, and specifically further comprising: In the case that no callback result is received within the refresh time interval, simulation data is generated using the inventory data of the target view item; The incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, and the incremental data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, specifically comprising: The simulation data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted.

7. The method of claim 6, wherein, The simulation data is generated using the inventory data of the target view item, and specifically comprising: The inventory data is equally divided into N intervals, the data in each interval is sorted to obtain the median of each interval, and N is a positive integer; The N medians are fitted based on the least square method to obtain a target function equation; The simulation data is predicted based on the target function equation.

8. The method of claim 6, wherein, After the simulation data is added to the tail of the target view item, and a corresponding amount of data in the head of the target view item is deleted, it further comprises: Continue to wait for the callback result within the refresh time interval; If the callback result is received within the refresh time interval, and the callback result is the incremental data, the simulation data in the tail of the target view item is covered by the incremental data.

9. An incremental data processing device, characterized by Comprise: The change module is used for changing the attribute value corresponding to the refresh time interval attribute of the target view item preset in the case of receiving the operation of the user modifying the refresh time interval of the target view item; The storage module is used for establishing a new timer task and storing the timer task in the timer task attribute of the target view item preset in the case of receiving the incremental data request of the user for the target view item; The execution module is used for executing the timer task; The execution module is further configured to acquire target information carried in the incremental data request, the target information at least including an index of the target view item; query the target view item from a plurality of view items according to the index of the target view item, and acquire a refresh time interval corresponding to the target view item; According to the target information, acquire incremental data of the target view item; add a corresponding amount of the incremental data to the target view item, and delete a corresponding amount of data in original data in the target view item, to update data in the target view item.

10. An electronic device, comprising: The electronic device includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and the computer program, when executed by the processor, implements the steps of the incremental data processing method according to any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and when executed by the processor, implements the steps of the incremental data processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Database cluster data migration method and device and electronic equipment

    CN111324596A

  • Incremental data acquisition method and device, electronic equipment and readable storage medium

    CN114253591A