A data processing method and apparatus

By generating business identifiers in the data table and using cursor value updates and data reversal mechanisms, the problems of errors and low efficiency in data processing are solved, enabling ordered recording and efficient processing of the data table and improving the user experience.

CN118193519BActive Publication Date: 2026-06-16JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-12-14
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, while users enjoy convenient and efficient real-time data processing functions, errors in data acquisition and processing are common, especially in big data and high-concurrency scenarios, leading to data disorder. Furthermore, existing data reset methods have a limited scope and low efficiency.

Method used

By acquiring data tables and new data, marking the new data as valid, generating business identifiers based on business type labels, sorting and merging data tables, and using cursor value updates and data reversal mechanisms, it is ensured that each business identifier in the data table records only one latest valid data, thus achieving orderly recording and logical deletion of data.

🎯Benefits of technology

It enables the orderly acquisition and recording of data in the data table, ensures data timeliness, improves data processing efficiency, expands the application scope of the data table, provides data protection and real-time monitoring, avoids data disorder, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118193519B_ABST
    Figure CN118193519B_ABST
Patent Text Reader

Abstract

The application discloses a kind of data processing method and device, it is related to computer technical field.The specific embodiment of the method includes obtaining data table and new data, marking new data as valid, record the data to data table;Determine whether the business mark corresponding to the data is greater than cursor value;If business mark is greater than cursor value, then update cursor value as the business mark, accumulate all valid data in data table;If business mark is not greater than cursor value, then determine whether to correct the valid data corresponding to the business mark in data table;In response to not correcting the valid data corresponding to the business mark, accumulate all data marked as valid in data table;Or in response to correcting the valid data corresponding to the business mark, accumulate the valid data corresponding to the business mark after correction and the valid data corresponding to other business mark.Thereby, the embodiment of the application can solve the technical problem that existing data after reset cannot be accurately and efficiently identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a data processing method and apparatus. Background Technology

[0002] Currently, it is very common to store data in a data table in an orderly manner and calculate the cumulative amount. This provides users with convenient and fast data processing services, which can greatly save physical storage resources and reduce users' data storage costs.

[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0004] While users enjoy the convenience and efficiency of real-time data processing, errors in data acquisition and processing are common, especially in scenarios with large data volumes and high concurrency. If reprocessing of a portion of data based on a specific node in a data table is required, it may actually lead to more severe data corruption. Furthermore, although existing data tables provide basic data reset methods, these methods can only correct data once within a specified range, limiting their processing scope. If multiple records in the data table are incorrect, users must perform the same operation multiple times, resulting in low processing efficiency. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a data processing method and apparatus that can solve the existing technical problem of being unable to accurately and efficiently identify reset data.

[0006] To achieve the above objectives, according to one aspect of the present invention, a data processing method is provided, comprising: acquiring a data table and new data; marking the new data as valid; recording the valid data in the data table; determining whether the service identifier corresponding to the valid data is greater than a cursor value; if the service identifier is greater than the cursor value, updating the cursor value to the service identifier and accumulating all valid data in the data table; if the service identifier is not greater than the cursor value, determining whether to revert the valid data corresponding to the service identifier in the data table; in response to not reverting the valid data corresponding to the service identifier, accumulating all data marked as valid in the data table; or in response to reverting the valid data corresponding to the service identifier, accumulating the reverted valid data corresponding to the service identifier and the valid data corresponding to other service identifiers.

[0007] Optionally, retrieve the data table and new data, including:

[0008] Acquire new data, and generate corresponding business identifiers based on the upstream and downstream business attributes in the business type tags of the new data, wherein the business identifier value of the upstream business is less than the business identifier value of the corresponding downstream business; generate sub-data tables corresponding to the business identifiers for data with the same business identifiers; merge all sub-data tables column by column according to the order of their business identifiers to generate a data table, and initialize the cursor value of the data table.

[0009] Optionally, it includes:

[0010] In response to the reset of the cursor value, the reset cursor value is obtained and replaced with the cursor value in the data table; data marked as valid with a business identifier greater than the replaced cursor value is filtered according to the data table, and the data is updated to invalid; data updated to invalid is logically deleted; all data marked as valid in the data table is accumulated.

[0011] Optionally, determining whether to revert valid data corresponding to the business identifier based on the data table includes:

[0012] The data corresponding to the business identifier in the data table is obtained by filtering. The data of the most recent record other than the new data is marked as valid. Then, the valid data corresponding to the business identifier is reversed.

[0013] Optionally, correcting the valid data corresponding to the service identifier includes:

[0014] Obtain the valid data corresponding to the business identifier in the data table, filter out the most recent valid data (excluding the new data) from the valid data as the data to be reversed, update the mark of the data to be reversed to invalid, and logically delete the data to be reversed that has been updated to invalid.

[0015] Optionally, it includes:

[0016] Upon receiving a data lock request, the locking procedure is initiated to lock all valid data corresponding to all current business identifiers and update the cursor value to the initial value.

[0017] Optionally, it includes:

[0018] If the number of data in the data table that has the same business identifier and is marked as valid is determined, and the number is greater than the preset number threshold corresponding to the business identifier, then an error message is generated and output.

[0019] In addition, the present invention also provides a data processing apparatus, including an acquisition module for acquiring a data table and new data, marking the new data as valid, and recording the valid data to the data table; and an identification module for determining whether the business identifier corresponding to the valid data is greater than a cursor value. If the business identifier is greater than the cursor value, the cursor value is updated to the business identifier, and all valid data in the data table is accumulated. If the business identifier is not greater than the cursor value, it is determined whether to revert the valid data corresponding to the business identifier in the data table. In response to not reverting the valid data corresponding to the business identifier, all data marked as valid in the data table is accumulated. Alternatively, in response to reverting the valid data corresponding to the business identifier, the valid data corresponding to the reverted business identifier and the valid data corresponding to other business identifiers are accumulated.

[0020] One embodiment of the above invention has the following advantages or beneficial effects: The present invention sorts the business type tags of data according to the time attribute included in the data's business type tags, i.e., the upstream and downstream relationships corresponding to the business type of the data. The sorting result is used as the business identifier corresponding to the business type tag. A sub-data table is generated for each business identifier, and the sub-data tables are merged column-wise according to the size order of the business identifiers to generate a data table. The cursor value of the data table is initialized to zero. This achieves the arrangement of data in the data table according to the upstream and downstream business relationships, achieving the effect of orderly acquisition and recording of data in the data table. This facilitates subsequent operations such as locating the time node of incorrect data records, logically deleting erroneous data, and re-acquiring correct data. Furthermore, through the updating of the cursor value in the data table with new data business identifiers and the determination of data reversal, it ensures that, within the range before receiving a data locking request, only one unlocked valid data is accumulated for each business identifier in the data table. The valid data is the latest data acquired by each business identifier in the data table, ensuring the timeliness of valid data. This ensures that after the user issues only one data table reset command, the data... The automatic multiple data reversal of the table significantly improves processing efficiency. Simultaneously, by receiving a data lock request, it locks all valid data corresponding to all current business identifiers in the table, protecting correct data. Locked data is added to the accumulated result to prevent new data from reversing it, and the cursor value is updated to its initial value of zero. Therefore, a new row needs to be started in the table to record subsequent new data, achieving the effect of multiple valid data corresponding to each business identifier. This expands the application scope of the data table, including data reversal processing and regular storage of accumulated data, increasing the application scenarios for users. Furthermore, by obtaining the number of valid data entries with the same business identifier in the table and comparing it with a preset threshold corresponding to that business identifier, the invention achieves real-time monitoring of the correctness of the recorded data. If incorrect, it generates and outputs an error message, avoiding the situation where data errors are determined after all data recording has been completed. This effectively stops losses from erroneous data entries, improving work efficiency and user experience.

[0021] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0022] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0023] Figure 1This is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention;

[0024] Figure 2 This is a schematic diagram of data table 1 according to an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of data table 2 according to an embodiment of the present invention;

[0026] Figure 4 This is a schematic diagram of the main flow of the data processing method according to the second embodiment of the present invention;

[0027] Figure 5 This is a schematic diagram of the main flow of the data processing method according to the third embodiment of the present invention;

[0028] Figure 6 This is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention;

[0029] Figure 7 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0030] Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0031] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0032] Figure 1 This is a schematic diagram of the main flow of the data processing method according to the first embodiment of the present invention, as shown below. Figure 1 As shown, the data processing method includes:

[0033] Step S101: Obtain the data table and new data, mark the new data as valid, and record the valid data to the data table.

[0034] In this embodiment, all recently acquired data are considered valid data, and the latest valid data is recorded in the data table. This ensures that no recently acquired data is missed in the data table, thus guaranteeing the timeliness of the data marked as valid in the data table.

[0035] In some embodiments, when acquiring data tables and new data, the new data is first acquired. Based on the upstream and downstream business attributes in the business type label of the new data, a corresponding business identifier is generated, wherein the business identifier value of the upstream business is less than the business identifier value of the corresponding downstream business. For data with the same business identifier, a sub-data table corresponding to that business identifier is generated. All sub-data tables are merged column-wise according to the order of their business identifiers to generate a data table, and the cursor value of the data table is initialized. For example, if new data is acquired and its business type label is "Upstream Industry Business A", it indicates that the time information of this business type label is: this data belongs to the first-ranked business A in the upstream industry, therefore the corresponding business identifier is 1, and this data is recorded in the corresponding row of the first column of the data table. If new data is acquired and its business type label is "Downstream Industry Business G", it indicates that the time information of this business type label is: this data belongs to the seventh-ranked business G in the downstream industry, therefore the corresponding business identifier is 7, and this data is recorded in the corresponding row of the seventh column of the data table, and the cursor value of the data table is initialized to 0. Sort the received business data according to the upstream and downstream industry sequence to ensure the orderliness of the data in the data table, which is conducive to users' intuitive and clear browsing of data or determining data reset nodes and other routine operations.

[0036] In some embodiments, after a user determines that some data in the data table is incorrect, the system can respond by resetting the cursor value, obtaining the reset cursor value, and replacing the cursor value in the data table; filtering the data table to obtain data whose business identifier is greater than the replaced cursor value and marked as valid, updating the mark of the data to invalid, and logically deleting the data updated to invalid; and accumulating all data marked as valid in the data table. For example, such as... Figure 2 As shown, in step 2, resetting the cursor value from 5 to 2 marks the data recorded in sub-data tables (3), (4), and (5) in row 1 as invalid data, and logically deletes the invalid data. The cumulative value of the data table is then updated to the cumulative value of all data marked as valid in the data table, i.e., the cumulative value of the data table before resetting the cursor value minus the cumulative value of the invalid data, which is 18-1-2-3=12. Logical deletion is defined as not deleting the corresponding data record, but only marking the data so that it is not included in the cumulative calculation of the data table. The operation of resetting the cursor value achieves the effect of logically deleting erroneous data in the data table, ensuring the correctness of the cumulative value in the data table. In addition, logically deleting data to retain the records of the data also facilitates the viewing and review of the data table.

[0037] Step S102: Determine whether the service identifier corresponding to the valid data is greater than the cursor value. If yes, proceed to step S103; otherwise, proceed to step S104.

[0038] In this embodiment, the size of the business identifier of the valid data is compared with the cursor value of the data table to determine whether the cursor value of the data table should be updated. The cursor value of the data table indicates the position information of the last valid data recorded in the data table. Therefore, when new data is obtained, it is possible to quickly and preliminarily determine whether the business identifier corresponding to the new data has been recorded as an unlocked valid data, ensuring that for each business identifier, the data table records at most one unlocked valid data.

[0039] Step S103: If the service identifier is greater than the cursor value, then update the cursor value to the service identifier and accumulate all valid data in the data table.

[0040] For example, such as Figure 2 As shown, the valid data recorded in row 3 is 2, and its corresponding business identifier is 3, which is greater than the current data table cursor value of 2. Therefore, the cursor value is updated to 3, and the data accumulation value is increased by 2 accordingly, resulting in 12 + 2 = 14. The valid data recorded in row 4 is 1, and its corresponding business identifier is 4, which is greater than the current data table cursor value of 3. Therefore, the cursor value is updated to 4, and the data accumulation value is increased by 1 accordingly, resulting in 14 + 1 = 15. Through the update of the cursor value, the update of the business identifier position corresponding to the latest record of valid data that is not locked in the data table is clearly reflected.

[0041] Step S104: If the service identifier is not greater than the cursor value, determine whether to revert the valid data corresponding to the service identifier in the data table. If yes, proceed to step S106; otherwise, proceed to step S105.

[0042] In some embodiments, determining whether to revert valid data corresponding to the service identifier based on the data table includes: filtering the data corresponding to the service identifier in the data table, determining whether the most recently recorded data (excluding new data) is valid data; if so, reverting the valid data corresponding to the service identifier; otherwise, not reverting the valid data corresponding to the service identifier.

[0043] For example, such as Figure 2 As shown, the valid data recorded in row 5 is 6, and its corresponding business identifier is 3, which is less than the current cursor value of 4. Therefore, the cursor value is not updated. The data corresponding to business identifier 3 is found in the data table. Besides the valid data 6 in the current row, there is also the most recently recorded valid data 2. Therefore, the valid data corresponding to business identifier 3 in the data table should be reversed. Figure 3As shown, the valid data recorded in row 4 is 1, and its corresponding business identifier 4 is less than the current cursor value 5. Therefore, the cursor value is not updated. The data corresponding to business identifier 4 is searched in the data table. Besides the valid data 1 in the current row, there is no other valid data recorded in the most recent time. Therefore, the valid data corresponding to business identifier 4 in the data table is not reversed. Determining whether to reversal the valid data corresponding to a specified business identifier based on the cursor value and the data table ensures that each business identifier in the data table corresponds to only one unlocked valid data, avoiding data duplication and other disorder caused by data reversal operations, and improving the accuracy of the data table.

[0044] Step S105: In response to not reversing the valid data corresponding to the service identifier, accumulate all data marked as valid in the data table.

[0045] For example, such as Figure 3 As shown, the valid data recorded in row 4 is 1, and its corresponding business identifier is 4. According to the reversal rule, the valid data corresponding to business identifier 4 in the data table will not be reversed. Therefore, the valid data recorded in row 4 is 1 to the cumulative value in the data table, resulting in 13 + 1 = 14. This step serves to update the cumulative result in the data table when no data reversal is performed, ensuring the correctness of the cumulative value in the data table.

[0046] Step S106: In response to reversing the valid data corresponding to the service identifier, the valid data corresponding to the service identifier is reversed, and the reversed valid data corresponding to the service identifier and the valid data corresponding to other service identifiers are accumulated.

[0047] In some embodiments, reversing valid data corresponding to the business identifier involves the following steps: obtaining valid data corresponding to the business identifier from a data table; filtering the valid data to obtain the most recently recorded valid data (excluding new data) as the data to be reversed; updating the flag of the data to be reversed to invalid; and logically deleting the data to be reversed that has been updated to invalid. For example, such as... Figure 2 As shown, the valid data recorded in row 5 is 6, and its corresponding business identifier is 3. According to the reversal rule, the valid data in the latest record corresponding to business identifier 3 in the data table, namely the valid data 2 in row 3, should be reversed. Therefore, the valid data 2 recorded in row 3 is marked as invalid data 2. The invalid data 2 is logically deleted and added to the valid data 6 recorded in row 5 to the accumulated value in the data table, resulting in 15 - 2 + 6 = 19. This step completes the reversal processing of the valid data corresponding to the specified business identifier in the data table, ensuring that the same business identifier in the data table corresponds to at most one unlocked valid data.

[0048] In some embodiments, to protect the correct data recorded in the data table, the following steps can also be taken: Upon receiving a data lock request, a locking procedure is initiated to lock all valid data corresponding to all current business identifiers, and the cursor value is updated to the initial value. For example, ... Figure 3 As shown, a data lock request is received in line 5. All valid data in lines 1-4 are locked, and the accumulated value of 14 for all valid data in lines 1-4 is recorded and added to the corresponding position in line 5. The cursor value is then updated to its initial value of 0. Valid data 5 is recorded in line 6, with a corresponding business identifier of 1. If a query is performed to retrieve valid data corresponding to business identifier 1 in the data table, the valid data 5 in the current row and the valid data 5 in the first row will be obtained. However, because the valid data 5 in the first row is locked, no reversal is performed on the valid data corresponding to business identifier 1. Only the newly acquired valid data is accumulated in line 6, resulting in an updated accumulated value of 14 + 5 = 19 for the data table. In this step, the locking mechanism prevents the accidental deletion of correct data in the data table, thus further improving the efficiency of the data table.

[0049] In some embodiments, to monitor the accuracy of the data table in real time, the following can also be done: obtain the number of data in the data table that have the same business identifier and are marked as valid; if the number is greater than a preset threshold corresponding to the business identifier, then generate and output a data table error message. For example, such as... Figure 3 As shown, after the 5 valid data entries are recorded in the 6th row, the number of valid data entries corresponding to business identifier 1 in the data table is 2. If the preset threshold for the number of entries for business identifier 1 is 1, it means that when the data is recorded correctly, business identifier 1 corresponds to only 1 valid data entry. However, if the number of valid data entries corresponding to business identifier 1 in the data table exceeds the preset threshold of 1, it indicates that a data recording disorder has occurred. Therefore, an error message is generated and output.

[0050] Figure 4 This is a schematic diagram of the main flow of a data processing method according to a second embodiment of the present invention, the data processing method including:

[0051] Step S401: Obtain new data, obtain the time attribute of its business type label, and generate the business identifier corresponding to the business type label based on the time attribute.

[0052] Ideally, the values ​​of the business identifiers in the data table should all be positive integers.

[0053] Step S402: Based on the sub-data tables generated according to different business identifiers, merge the sub-data tables by column according to the order of the business identifiers to generate a data table; initialize the cursor value in the data table to 0.

[0054] Step S403: Mark the new data status as valid and record the valid data to the data table.

[0055] Step S404: Determine whether the service identifier corresponding to the valid data is greater than the cursor value. If yes, proceed to step S405; otherwise, proceed to step S406.

[0056] Step S405: Update the cursor value to the business identifier and accumulate all valid data in the data table.

[0057] Preferably, if the service identifier corresponding to the valid data is less than or equal to the cursor value, the current cursor value is maintained.

[0058] Step S406: Determine whether to reverse the valid data corresponding to the business identifier in the data table. If yes, proceed to step S408; otherwise, proceed to step S407.

[0059] Step S407: Accumulate all data marked as valid in the data table.

[0060] Step S408: Reverse the valid data corresponding to the service identifier, and accumulate the reversed valid data corresponding to the service identifier and the valid data corresponding to other service identifiers.

[0061] Step S409: Determine whether a request to reset the cursor value has been received. If yes, proceed to step S410; otherwise, proceed to step S411.

[0062] Step S410: Reset the cursor value, filter out valid data in the data table whose business identifier is greater than the cursor value, update the mark of the data to invalid, logically delete the data updated to invalid, and accumulate all valid data in the data table.

[0063] Preferably, logical deletion is defined as not deleting the corresponding data record, but only marking the data as invalid so that it is not included in the cumulative calculation of the data table.

[0064] Step S411: Determine if there is any new data to be acquired. If yes, proceed to step S403; otherwise, proceed to step S412.

[0065] Step S412: Accumulate the locked and unlocked valid data in the data table; output the data table and the accumulated value of the data table.

[0066] Figure 5 This is a schematic diagram of the main flow of a data processing method according to a third embodiment of the present invention, the data processing method including:

[0067] Step S501: Obtain new data, obtain the time attribute of its business type label, and generate the business identifier corresponding to the business type label based on the time attribute.

[0068] Ideally, the values ​​of the business identifiers in the data table should all be positive integers.

[0069] Step S502: Based on the sub-data tables generated according to different business identifiers, merge the sub-data tables by column according to the order of the business identifiers to generate a data table; initialize the cursor value in the data table to 0.

[0070] Step S503: Mark the new data status as valid and record the valid data to the data table.

[0071] Step S504: Determine whether the service identifier corresponding to the valid data is greater than the cursor value. If yes, proceed to step S505; otherwise, proceed to step S506.

[0072] Step S505: Update the cursor value to the business identifier and accumulate all valid data in the data table.

[0073] Preferably, if the service identifier corresponding to the valid data is less than or equal to the cursor value, the current cursor value is maintained.

[0074] Step S506: Determine whether to reverse the valid data corresponding to the business identifier in the data table. If yes, proceed to step S508; otherwise, proceed to step S507.

[0075] Step S507: Accumulate all data marked as valid in the data table.

[0076] Step S508: Reverse the valid data corresponding to the service identifier, and accumulate the valid data corresponding to the service identifier and the valid data corresponding to other service identifiers after reversal.

[0077] Step S509: Determine whether a request to reset the cursor value has been received. If yes, proceed to step S510; otherwise, proceed to step S511.

[0078] Step S510: Reset the cursor value, filter out valid data in the data table whose business identifier is greater than the cursor value, update the mark of the data to invalid, logically delete the data updated to invalid; accumulate all valid data in the data table.

[0079] Preferably, logical deletion is defined as not deleting the corresponding data record, but only marking the data as invalid so that it is not included in the cumulative calculation of the data table.

[0080] Step S511: Determine whether a lock data request has been received. If yes, proceed to step S512; otherwise, proceed to step S513.

[0081] Step S512: Obtain time information, accumulate all valid data corresponding to all business identifiers in the data table, record the accumulation result and time information to the data table; lock all valid data in the data table; update the cursor value in the data table to 0.

[0082] Ideally, data correction should not be performed on valid data that is already locked in the data table.

[0083] Step S513: Determine if there is any new data to be acquired. If yes, proceed to step S503; otherwise, proceed to step S514.

[0084] Step S514: Accumulate the locked and unlocked valid data in the data table; output the data table and the accumulated value of the data table.

[0085] Figure 6 This is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention, such as... Figure 6 As shown, the data processing device 600 includes an acquisition module 601 and an identification module 602. The acquisition module 601 acquires a data table and new data, marks the new data as valid, and records the valid data in the data table. The identification module 602 determines whether the service identifier corresponding to the valid data is greater than a cursor value. If the service identifier is greater than the cursor value, the cursor value is updated to the service identifier, and all valid data in the data table is accumulated. If the service identifier is not greater than the cursor value, it determines whether to revert the valid data corresponding to the service identifier in the data table. In response to not reverting the valid data corresponding to the service identifier, all data marked as valid in the data table is accumulated. Alternatively, in response to reverting the valid data corresponding to the service identifier, the valid data corresponding to the reverted service identifier and the valid data corresponding to other service identifiers are accumulated.

[0086] In some embodiments, the identification module 602 is further configured to: acquire new data; generate corresponding business identifiers based on the upstream and downstream business attributes in the business type tags of the new data, wherein the business identifier value of the upstream business is less than the business identifier value of the corresponding downstream business; generate a sub-data table corresponding to the business identifier for data with the same business identifier; merge all sub-data tables column by column according to the order of their business identifiers to generate a data table, and initialize the cursor value of the data table.

[0087] In some embodiments, the identification module 602 is further configured to: in response to resetting the cursor value, obtain the reset cursor value and replace the cursor value in the data table; filter data whose business identifier is greater than the replaced cursor value and is marked as valid according to the data table, update the mark of the data to invalid, logically delete the data updated to invalid; and accumulate all data marked as valid in the data table.

[0088] In some embodiments, the identification module 602 is further configured to: filter the data corresponding to the business identifier in the data table, determine that the most recently recorded data other than the new data is marked as valid, and then reverse the valid data corresponding to the business identifier.

[0089] In some embodiments, the identification module 602 is further configured to: obtain valid data corresponding to the business identifier in the data table, filter out the most recently recorded valid data (excluding the new data) from the valid data as the data to be reversed, update the mark of the data to be reversed to invalid, and logically delete the data to be reversed that has been updated to invalid.

[0090] In some embodiments, the identification module 602 is further configured to: upon receiving a data lock request, initiate a locking procedure, lock all valid data corresponding to all current service identifiers, and update the cursor value to the initial value.

[0091] In some embodiments, the identification module 602 is further configured to: obtain the number of data in the data table that have the same business identifier and are marked as valid; determine that the number is greater than a preset number threshold corresponding to the business identifier; and then generate and output a data table error message.

[0092] It should be noted that the data processing method and the data processing device described in this invention have a corresponding relationship in their specific implementation, so repeated content will not be described again.

[0093] Figure 7 An exemplary system architecture 700 is shown that can be applied to the data processing method or data processing apparatus of the present invention.

[0094] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0095] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703.

[0096] Terminal devices 701, 702, and 703 can be various electronic devices with a page display processing screen that supports web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0097] Server 705 can be a server that provides various services, such as a backend management server that supports users using terminal devices 701, 702, and 703 (for example only). The backend management server can analyze and process data such as received product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal devices.

[0098] It should be noted that the data processing method provided in the embodiments of the present invention is generally executed by server 705, and correspondingly, the computing device is generally located in server 705.

[0099] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0100] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing a terminal device of the present invention. Figure 8 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0101] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the computer system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0102] The following components are connected to the I / O interface 805: an input section 805 including a keyboard, mouse, etc.; an output section 806 including a cathode ray tube (CRT), liquid crystal data processor (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0103] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this invention.

[0104] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0106] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including an acquisition module and an identification module. The names of these modules do not necessarily limit the functionality of the module itself.

[0107] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently without being assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to include: acquiring a data table and new data; marking the new data as valid; recording the valid data in the data table; determining whether the service identifier corresponding to the valid data is greater than a cursor value; if the service identifier is greater than the cursor value, updating the cursor value to the service identifier and accumulating all valid data in the data table; if the service identifier is not greater than the cursor value, determining whether to revert the valid data corresponding to the service identifier in the data table; in response to not reverting the valid data corresponding to the service identifier, accumulating all data marked as valid in the data table; or in response to reverting the valid data corresponding to the service identifier, accumulating the reverted valid data corresponding to the service identifier and the valid data corresponding to other service identifiers.

[0108] According to the technical solutions of the embodiments of the present invention, the existing technical problems of being unable to accurately and efficiently identify reset data can be solved.

[0109] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data processing method, characterized in that, include: Obtain the data table and new data, mark the new data as valid, and record the valid data into the data table; Determine whether the business identifier corresponding to the valid data is greater than the cursor value; If the business identifier is greater than the cursor value, then the cursor value is updated to the business identifier, and all valid data in the data table is accumulated; If the business identifier is not greater than the cursor value, then determine whether to revert the valid data corresponding to the business identifier in the data table; In response to not reversing the valid data corresponding to the service identifier, all data marked as valid in the data table are accumulated; Alternatively, in response to reversing the valid data corresponding to the service identifier, the valid data corresponding to the service identifier after reversal is accumulated together with the valid data corresponding to other service identifiers.

2. The method according to claim 1, characterized in that, Retrieve data tables and new data, including: Acquire new data, and generate corresponding business identifiers based on the upstream and downstream business attributes in the business type tags of the new data, wherein the business identifier value of the upstream business is less than the business identifier value of the corresponding downstream business. For data with the same business identifier, generate a sub-data table corresponding to that business identifier; Merge all sub-data tables column-wise according to their business identifiers to generate a new data table, and initialize the cursor value of the data table.

3. The method according to claim 1, characterized in that, include: In response to a reset of the cursor value, retrieve the reset cursor value and replace the cursor value in the data table; Based on the data table, filter out data whose business identifier is greater than the replaced cursor value and is marked as valid, update the mark of the data to invalid, and logically delete the data that has been updated to invalid. Add up all data marked as valid in the data table.

4. The method according to claim 1, characterized in that, Determining whether to revert valid data corresponding to the business identifier based on the data table includes: The data corresponding to the business identifier in the data table is obtained by filtering, and the data of the most recent record (excluding new data) is marked as valid. The valid data corresponding to the business identifier is then reversed.

5. The method according to claim 1, characterized in that, Correcting the valid data corresponding to the business identifier includes: Obtain the valid data corresponding to the business identifier in the data table, filter out the most recent valid data (excluding the new data) from the valid data as the data to be reversed, update the mark of the data to be reversed to invalid, and logically delete the data to be reversed that has been updated to invalid.

6. The method according to claim 5, characterized in that, include: Upon receiving a data lock request, the locking procedure is initiated to lock all valid data corresponding to all current business identifiers and update the cursor value to the initial value.

7. The method according to claim 1, characterized in that, Also includes: If the number of data in the data table that has the same business identifier and is marked as valid is determined, and the number is greater than the preset number threshold corresponding to the business identifier, then an error message is generated and output.

8. A page display processing device, characterized in that, include: The acquisition module is used to acquire data tables and new data, mark the status of new data as valid, and record the valid data to the data table. The identification module is used to determine whether the business identifier corresponding to the valid data is greater than the cursor value; If the service identifier is greater than the cursor value, then the cursor value is updated to the service identifier, and all valid data in the data table is accumulated; if the service identifier is not greater than the cursor value, then it is determined whether to reverse the valid data corresponding to the service identifier in the data table. In response to not reversing the valid data corresponding to the service identifier, all data marked as valid in the data table are accumulated; Alternatively, in response to reversing the valid data corresponding to the service identifier, the valid data corresponding to the service identifier after reversal is accumulated together with the valid data corresponding to other service identifiers.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.