Ranking list data reconciliation method, computer device and storage medium
Patent Information
- Application Number
- CN202311477175.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-11-07
AI Technical Summary
在榜单更新过程中,缺乏对榜单更新数据的相关监控,无法有效保证榜单更新的正确性,在榜单更新出现错误时也无法及时感知处理,导致排行榜的榜单排序准确度低
[0044]上述一种排行榜的数据对账方法、计算机设备和计算机可读存储介质,通过接收针对目标排行榜上报的原始流水数据,得到多个榜单项各自对应的流水备份数据和流水统计数据,该目标排行榜用于基于目标排行榜事件对所述多个榜单项进行排序,该原始流水数据为与目标排行榜事件关联的流水数据,然后在检测到当前时间满足对账任务触发条件的情况下,获取目标排行榜在当前时间下的数据对账任务,基于数据对账任务对应的时间区间,确定各榜单项在时间区间的流水备份数据和流水统计数据,作为各榜单项的待对账数据,进而对时间区间中各榜单项的待对账数据进行对账,得到数据对账任务的对账结果,实现了对排行榜榜单的实时对账,基于执行时间区间对应的数据对账任务,对流水备份数据和流水统计数据进行对比,能够有效监控榜单更新数据,保证榜单数据的正确性,提升了榜单排序准确度。
Smart Images

Figure CN117668042B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a data reconciliation method for a ranking system, a computer device, and a computer-readable storage medium. Background Technology
[0002] With the development of internet technology, there has been a demand for various types of ranking projects, such as various ranking products launched by different types of apps.
[0003] In related technologies, user spending data is typically used to calculate and rank user activity to update leaderboards. However, the lack of monitoring of the updated data during the leaderboard update process makes it difficult to ensure the accuracy of the updates. Furthermore, errors in the leaderboard updates cannot be detected and addressed in a timely manner, resulting in low ranking accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide a data reconciliation method, computer device, and computer-readable storage medium for ranking lists that can improve the accuracy of ranking list sorting, in order to address the aforementioned technical problems.
[0005] Firstly, this application provides a data reconciliation method for ranking lists. The method includes:
[0006] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0007] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0008] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0009] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0010] In one embodiment, receiving the raw transaction data reported for the target leaderboard and obtaining transaction backup data and transaction statistics corresponding to each of the multiple leaderboard items includes:
[0011] The raw transaction data is obtained from the data source corresponding to the target ranking list; each raw transaction data has a corresponding timestamp, ranking list item identifier, and transaction value associated with the target ranking list event;
[0012] Based on the list item identifier of each of the original transaction data, the corresponding transaction backup data of each of the list items is stored;
[0013] Based on the timestamps corresponding to the original transaction data, the list item identifiers, and the transaction values, the transaction statistics corresponding to each list item are calculated.
[0014] In one embodiment, the transaction statistics include interval statistics. The step of calculating the transaction statistics corresponding to each of the ranking items based on the timestamps corresponding to each of the original transaction data, the ranking item identifier, and the transaction value includes:
[0015] Obtain flow data segmentation information; the flow data segmentation information is used to indicate multiple time intervals;
[0016] According to the timestamps corresponding to each of the original transaction data, the original transaction data is divided into multiple time intervals;
[0017] For any given time interval, based on the list item identifier of the original flow data in that time interval, the interval statistical data of each list item is aggregated.
[0018] In one embodiment, before the step of obtaining the data reconciliation task of the target leaderboard at the current time when the reconciliation task triggering condition is detected to be met at the current time, the method further includes:
[0019] Based on the transaction data segmentation information, configure the reconciliation message queue of the target leaderboard; the reconciliation message queue contains data reconciliation tasks corresponding to multiple time intervals.
[0020] In one embodiment, the step of obtaining the data reconciliation task of the target ranking list at the current time when the reconciliation task triggering condition is detected includes:
[0021] If the current time is the end time of the current time interval, the data reconciliation task for the current time interval is obtained from the reconciliation message queue of the target leaderboard and used as the data reconciliation task for the current time.
[0022] In one embodiment, the reconciliation of the data to be reconciled for each of the list items in the time interval to obtain the reconciliation result of the data reconciliation task includes:
[0023] For any list item, the backup data stored for that list item within the time interval is compared with the interval statistical data of that list item within the time interval to obtain the list item reconciliation result; the interval statistical data includes the interval total value and the interval cumulative value.
[0024] The reconciliation results of the data reconciliation task are obtained based on the reconciliation results of each of the aforementioned list items.
[0025] In one embodiment, after the step of reconciling the data to be reconciled for each of the list items in the time interval to obtain the reconciliation result of the data reconciliation task, the method further includes:
[0026] If the reconciliation results indicate that there is data anomaly in the target ranking list, an anomaly alarm message will be fed back based on the reconciliation results.
[0027] In one embodiment, after the step of reconciling the data to be reconciled for each of the list items in the time interval to obtain the reconciliation result of the data reconciliation task, the method further includes:
[0028] If the reconciliation result of the data reconciliation task is an abnormal reconciliation status, the data reconciliation task will be re-initiated at a preset time interval.
[0029] Secondly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0030] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0031] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0032] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0033] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0034] Thirdly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0035] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0036] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0037] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0038] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0039] Fourthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0040] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0041] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0042] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0043] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0044] The aforementioned data reconciliation method, computer device, and computer-readable storage medium for a ranking list receive raw transaction data reported for a target ranking list to obtain transaction backup data and transaction statistics data corresponding to each of the multiple ranking list items. This target ranking list is used to sort the multiple ranking list items based on a target ranking list event. The raw transaction data is transaction data associated with the target ranking list event. Then, when the reconciliation task triggering condition is detected at the current time, the data reconciliation task for the target ranking list at the current time is obtained. Based on the time interval corresponding to the data reconciliation task, the transaction backup data and transaction statistics data for each ranking list item within the time interval are determined as the reconciliation data to be reconciled for each ranking list item. The reconciliation data to be reconciled for each ranking list item within the time interval is then reconciled to obtain the reconciliation result of the data reconciliation task. This achieves real-time reconciliation of the ranking list. By comparing the transaction backup data and transaction statistics data based on the data reconciliation task corresponding to the execution time interval, the updated ranking list data can be effectively monitored, ensuring the correctness of the ranking list data and improving the accuracy of the ranking list sorting. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating a data reconciliation method for a leaderboard in one embodiment;
[0046] Figure 2 This is a schematic diagram of a leaderboard interface in one embodiment;
[0047] Figure 3 This is a schematic diagram of a ranking data reconciliation process in one embodiment;
[0048] Figure 4 This is a schematic diagram illustrating data comparison within a time interval in one embodiment;
[0049] Figure 5 This is a flowchart illustrating the data reconciliation method for the leaderboard in another embodiment;
[0050] Figure 6 This is a structural block diagram of a data reconciliation device for a leaderboard in one embodiment;
[0051] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] In one embodiment, such as Figure 1As shown, a data reconciliation method for a leaderboard is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to a terminal, or to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server.
[0054] The server can be a standalone server or a server cluster consisting of multiple servers; the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.
[0055] In this embodiment, the method may include the following steps:
[0056] In step S101, the raw transaction data reported for the target leaderboard is received, and the transaction backup data and transaction statistics corresponding to each of the multiple leaderboard items are obtained.
[0057] The target leaderboard can be a leaderboard for real-time reconciliation processing. This target leaderboard can be used to sort multiple list items based on the target leaderboard event (e.g., Figure 2 As shown), for example, a corresponding leaderboard theme can be set based on the leaderboard activity, and the triggering behavior related to the leaderboard theme can be used as a leaderboard event. The object to which the triggering behavior belongs corresponds to a certain list item in the leaderboard.
[0058] As an example, the raw stream data can be stream data associated with the target leaderboard event, such as generating leaderboard event-related data for a leaderboard item when a triggering action related to the leaderboard theme occurs.
[0059] In practical applications, for a target leaderboard, by receiving the reported raw transaction data, the system can obtain the corresponding transaction backup data and transaction statistics for each of the multiple leaderboard items, so as to further perform real-time data reconciliation for the target leaderboard.
[0060] For example, the value of each list item can be calculated in real time based on the relevant transaction data of the target ranking received from the data source. This allows for the sorting of the list items in the target ranking and the recording of transaction backup data and transaction statistics corresponding to each list item. Figure 3 As shown, a flow database can be used to store flow backup data, and a computational database can be used to record flow statistics.
[0061] In one example, the data reconciliation method for the ranking list in this embodiment can be used for different types of ranking list projects. For example, for music ranking list projects, by performing real-time data reconciliation on the music ranking list, the accuracy of the user ranking calculation for each list in the music ranking list can be verified, and anomaly alarms can be provided to ensure timely handling of anomalies.
[0062] In step S102, if the current time meets the reconciliation task triggering condition, the data reconciliation task of the target leaderboard at the current time is obtained;
[0063] In the specific implementation, the reconciliation task triggering conditions can be configured, such as triggering reconciliation processing on a timed basis. When the reconciliation task triggering conditions are met at the current time, the data reconciliation task of the target leaderboard at the current time can be obtained.
[0064] For example, the backend server can collect detailed information about the leaderboard's transaction volume and periodically reconcile the leaderboard values, thereby periodically checking the accuracy and real-time performance of the leaderboard calculations.
[0065] In step S103, based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each ranking item in the time interval are determined as the reconciliation data for each ranking item.
[0066] After determining the data reconciliation task, since it is triggered on a timer, each time interval can correspond to one data reconciliation task. Based on the time interval corresponding to the current data reconciliation task, the backup data and statistical data of each ranking item in that time interval can be determined as the reconciliation data to be processed for each ranking item.
[0067] In step S104, the data to be reconciled for each list item in the time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0068] In practical applications, for data reconciliation tasks of the target leaderboard at the current time, reconciliation is performed by combining the backup data and statistical data of the transaction flow within the time interval corresponding to the data reconciliation task. For example, ... Figure 3 As shown, the transaction backup data stored in the transaction database within the time interval can be compared with the transaction statistics recorded in the database to obtain the reconciliation result of the data reconciliation task.
[0069] In the aforementioned data reconciliation method for the ranking list, the raw transaction data reported for the target ranking list is received to obtain the transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. Then, when the current time meets the reconciliation task triggering condition, the data reconciliation task of the target ranking list at the current time is obtained. Based on the time interval corresponding to the data reconciliation task, the transaction backup data and transaction statistics data of each ranking item in the time interval are determined as the reconciliation data to be reconciled for each ranking item. Then, the reconciliation data to be reconciled for each ranking item in the time interval is reconciled to obtain the reconciliation result of the data reconciliation task. This achieves real-time reconciliation of the ranking list. By comparing the transaction backup data and transaction statistics data based on the data reconciliation task corresponding to the execution time interval, the updated ranking data can be effectively monitored, ensuring the correctness of the ranking data and improving the accuracy of the ranking.
[0070] In one embodiment, step S102, receiving the raw transaction data reported for the target leaderboard and obtaining the transaction backup data and transaction statistics corresponding to each of the multiple leaderboard items, may include the following steps:
[0071] Obtain raw transaction data from the data source corresponding to the target leaderboard; each raw transaction data has a corresponding timestamp, leaderboard item identifier, and transaction value associated with the target leaderboard event; according to the leaderboard item identifier of each raw transaction data, store the transaction backup data corresponding to each leaderboard item; calculate the transaction statistics data corresponding to each leaderboard item based on the timestamp, leaderboard item identifier, and transaction value corresponding to each raw transaction data.
[0072] In practical applications, the backend server can collect detailed information about the ranking list's transaction history to store the ranking list's transaction details, such as the relevant transaction data of the target ranking list (i.e., the raw transaction data), which includes, but is not limited to, data such as data source type, transaction value (i.e., the transaction value associated with the target ranking list event), transaction time (i.e., timestamp), and transaction identifier (i.e., the ranking list item identifier).
[0073] For example, such as Figure 3 As shown, by obtaining the raw transaction data from the data source corresponding to the target leaderboard, the raw transaction data can be transformed and put into the transaction message queue for processing. Then, the transaction statistics of each list item can be calculated in real time for sorting. The reported transaction data can be received by a bypass, and each transaction data can be backed up and stored in the transaction database. The transaction time corresponding to each transaction data can be recorded, and the list item to which the list value belongs can be used to calculate the list value.
[0074] In this embodiment, raw transaction data is obtained from the data source corresponding to the target leaderboard. Then, according to the leaderboard item identifier of each raw transaction data, the transaction backup data corresponding to each leaderboard item is stored. Then, based on the timestamp, leaderboard item identifier, and transaction value corresponding to each raw transaction data, the transaction statistics data corresponding to each leaderboard item are calculated, providing data support for further data reconciliation task processing.
[0075] In one embodiment, the transaction statistics may include interval statistics. The transaction statistics for each ranking item are calculated based on the timestamp, ranking item identifier, and transaction value corresponding to each original transaction data point. This may include the following steps:
[0076] Obtain the flow data segmentation information; the flow data segmentation information is used to indicate multiple time intervals; according to the timestamps corresponding to each original flow data, divide each original flow data into multiple time intervals; for any time interval, based on the list item identifiers of the original flow data in any time interval, aggregate to obtain the interval statistics of each list item.
[0077] In practical implementation, the transaction data can be divided into time intervals to aggregate the transaction data within each interval. Optionally, during the ranking calculation process, while calculating the total statistical value of each ranking item, the cumulative value of each item across multiple time intervals (i.e., the cumulative value of the interval statistics) can be stored. Therefore, based on the multi-dimensional aggregation of the reported transaction data, and by reconciling it with the ranking backup data, the accuracy of the ranking data calculation can be guaranteed.
[0078] For example, using a 5-minute granularity (i.e., the flow data is divided into segments), during the ranking calculation process, on the one hand, all the data of each ranking item can be statistically stored, and on the other hand, an hour can be divided into 12 parts. Then, the flow data received within an hour can be divided into 12 intervals for storage, and the flow data in each interval can be aggregated to obtain the interval statistics of each ranking item. Other granularities can also be used for division, and no specific restrictions are made in this embodiment.
[0079] For example, such as Figure 4 As shown, each time interval (e.g.) Figure 4 On the timeline (t1, t2, t3, t4), there can be a corresponding reconciliation task. Interval statistics can include the interval total and interval cumulative value, such as the total statistical value and partition cumulative value of the corresponding ranking item at the end of that time interval (e.g., Figure 4 (s1, s2, s3, s4).
[0080] In this embodiment, by obtaining the data segmentation information of the transaction flow, the original transaction flow data is divided into multiple time intervals according to the timestamps corresponding to each original transaction flow data. Then, for any time interval, the interval statistics of each ranking item are aggregated according to the ranking item identifier of the original transaction flow data in any time interval. This can aggregate the ranking flow in multiple dimensions, which helps to monitor the ranking update data and provides data support for data reconciliation task processing.
[0081] In one embodiment, before the step of obtaining the data reconciliation task of the target leaderboard at the current time when the current time is detected to meet the reconciliation task triggering condition, the following steps may be included:
[0082] Based on the information segmentation of transaction data, configure the reconciliation message queue for the target leaderboard; the reconciliation message queue contains data reconciliation tasks corresponding to multiple time intervals.
[0083] In one example, such as Figure 3 As shown, based on the leaderboard configuration, a scheduled task can be used to trigger a periodic reconciliation task (i.e., a data reconciliation task) for the target leaderboard. Each time interval can correspond to one reconciliation task. By executing the reconciliation task, the interval values of the database transaction data and the leaderboard items can be compared periodically. For example, the transaction backup data stored for each leaderboard item within a certain time interval can be compared with the corresponding interval statistical data.
[0084] In this embodiment, by dividing information according to the transaction data and configuring the reconciliation message queue of the target leaderboard, it is possible to perform data reconciliation of the leaderboard on a regular basis based on the configured reconciliation message queue.
[0085] In one embodiment, step S102, when it is detected that the current time meets the reconciliation task triggering condition, obtaining the data reconciliation task of the target leaderboard at the current time may include the following steps:
[0086] If the current time is the end time of the current time interval, the data reconciliation task for the current time interval is obtained from the reconciliation message queue of the target leaderboard and used as the data reconciliation task for the current time.
[0087] In practical applications, such as Figure 3 As shown, the end time of the time interval can be used as the trigger condition for the scheduled task, and then the corresponding data reconciliation task can be obtained from the reconciliation message queue of the target leaderboard based on the reconciliation task consumer of the current time interval.
[0088] In an optional embodiment, a timed scanning method can also be used to check whether the statistical transaction data in the transaction data table is consistent with the stored backup transaction data in order to perform reconciliation processing.
[0089] In this embodiment, if the current time is the end time of the current time interval, the data reconciliation task for the current time interval is obtained from the reconciliation message queue of the target leaderboard and used as the data reconciliation task for the current time, so as to accurately obtain the corresponding data reconciliation task for execution.
[0090] In one embodiment, step S104, reconciling the data to be reconciled for each list item within the time interval to obtain the reconciliation result of the data reconciliation task, may include the following steps:
[0091] For any list item, the backup data stored in any list item within the time interval is compared with the interval statistical data of any list item within the time interval to obtain the list item reconciliation result for any list item; the interval statistical data includes the interval total value and the interval cumulative value; based on the list item reconciliation results of each list item, the reconciliation result of the data reconciliation task is obtained.
[0092] In one example, when performing a data reconciliation task, one can check the backup data (i.e., backup data) and the corresponding cumulative value (i.e., cumulative value) in the transaction database for each ranking item within the time interval corresponding to the data reconciliation task. Figure 4 As shown, reconciliation can be performed on each list item within each time interval.
[0093] In this embodiment, by comparing the backup data stored in any list item within a time interval with the interval statistics of any list item within the time interval for any list item, the reconciliation result of any list item is obtained. Then, based on the reconciliation results of each list item, the reconciliation result of the data reconciliation task is obtained. This can effectively monitor the updated list data, ensure the correctness of the list data, and improve the accuracy of list ranking.
[0094] In one embodiment, after reconciling the data to be reconciled for each list item within the time interval to obtain the reconciliation results of the data reconciliation task, the following steps may also be included:
[0095] If there are data anomalies in the target ranking of the reconciliation results, an anomaly alarm message will be fed back based on the reconciliation results.
[0096] In specific implementations, such as Figure 3As shown, by reconciling the ranking lists in real time, if an anomaly is detected in the ranking calculation, i.e., the reconciliation result indicates that there is data abnormality in the target ranking list, an anomaly alarm notification can be issued. That is, the anomaly alarm information is fed back based on the reconciliation result. The alarm notification can adopt different feedback methods, and no specific restrictions are imposed in this embodiment. Therefore, based on the real-time reconciliation mechanism between the transaction flow and the ranking list, and by monitoring and alarming when the ranking list data is abnormal, it can effectively ensure the rapid detection of ranking update errors.
[0097] In this embodiment, by providing anomaly alerts based on the reconciliation results when data anomalies are detected in the target leaderboard, the updated leaderboard data can be effectively monitored, ensuring the accuracy of the leaderboard data.
[0098] In one embodiment, after reconciling the data to be reconciled for each list item within the time interval to obtain the reconciliation results of the data reconciliation task, the following steps may also be included:
[0099] If the data reconciliation task results in an abnormal reconciliation status, the data reconciliation task will be re-initiated at preset time intervals.
[0100] In one example, such as Figure 3 As shown, after a reconciliation fails, i.e. the reconciliation result of the data reconciliation task is in an abnormal state, a second reconciliation or multiple reconciliation processes can be performed. For example, in the case of a reconciliation failure, the failure state can be recorded, and a second or multiple reconciliation can be triggered after a certain period of time (i.e., a preset time interval). If the number of reconciliation failures on the list is detected to have a certain convergence, it can also indicate that the reconciliation failure may be caused by calculation delays or storage fluctuations, rather than calculation errors.
[0101] In another example, the data reconciliation method for ranking lists provided in this application is applicable to ranking list scenarios with different problems. It can support real-time reconciliation of ranking lists and ensure the accuracy of ranking list calculations. For example, it can be applied to the following scenarios:
[0102] 1. When the ranking service malfunctions, an alarm can be issued to promptly notify the user of the abnormal status;
[0103] 2. During service upgrades, code can be easily verified, and potential anomalies can be detected in the code in a timely manner;
[0104] 3. It can detect storage fluctuations or storage failures in a timely manner, such as storage failure to write or increased storage latency;
[0105] 4. It can help detect inconsistencies in the reported transaction records;
[0106] 5. In the event of a delay in the ranking service calculation, it can be detected in a timely manner and intervention can be carried out to ensure the real-time nature of the ranking calculation.
[0107] In this embodiment, if the data reconciliation task results in an abnormal reconciliation status, the data reconciliation task is re-initiated at a preset time interval, which allows for further investigation into the problems caused by the re-data reconciliation process.
[0108] In one embodiment, such as Figure 5 The diagram illustrates another data reconciliation method for leaderboards. In this embodiment, the method includes the following steps:
[0109] In step 501, raw transaction data is obtained from the data source corresponding to the target leaderboard. In step 502, according to the leaderboard item identifier of each raw transaction data, backup transaction data corresponding to each leaderboard item is stored. Based on the timestamp, leaderboard item identifier, and transaction value corresponding to each raw transaction data, transaction statistics data corresponding to each leaderboard item are calculated. Transaction statistics data includes interval statistics data. In step 503, based on the transaction data segmentation information, the reconciliation message queue of the target leaderboard is configured; the reconciliation message queue contains data reconciliation tasks corresponding to multiple time intervals. In step 504, if the current time meets the reconciliation task triggering condition, the data reconciliation task of the target leaderboard at the current time is obtained. In step 505, based on the time interval corresponding to the data reconciliation task, the backup transaction data and transaction statistics data of each leaderboard item within the time interval are determined as the reconciliation data to be processed for each leaderboard item. In step 506, for any ranking item, the backup data stored for that ranking item within the time interval is compared with the interval statistical data for that ranking item within the time interval to obtain the ranking item reconciliation result for that ranking item. Based on the ranking item reconciliation results for each ranking item, the reconciliation result of the data reconciliation task is obtained. In step 507, if the reconciliation result indicates that there is data anomaly in the target ranking, an anomaly alarm message is fed back based on the reconciliation result. In step 508, if the reconciliation result of the data reconciliation task is an anomaly, the data reconciliation task is re-initiated at a preset time interval. It should be noted that the specific limitations of the above steps can be found in the specific limitations of a data reconciliation method for a ranking above, and will not be repeated here.
[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0111] Based on the same inventive concept, this application also provides a data reconciliation device for implementing the data reconciliation method for the ranking lists described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of one or more data reconciliation device embodiments for ranking lists provided below can be found in the limitations of the data reconciliation method for ranking lists described above, and will not be repeated here.
[0112] In one embodiment, such as Figure 6 As shown, a data reconciliation device for a leaderboard is provided, comprising:
[0113] The transaction data acquisition module 601 is used to receive the raw transaction data reported for the target ranking list, and obtain the transaction backup data and transaction statistics data corresponding to each of the multiple ranking items; the target ranking list is used to sort the multiple ranking items based on the target ranking list event; the raw transaction data is the transaction data associated with the target ranking list event.
[0114] The data reconciliation task determination module 602 is used to obtain the data reconciliation task of the target ranking list at the current time when the current time is detected to meet the reconciliation task triggering conditions;
[0115] The interval reconciliation data determination module 603 is used to determine the flow backup data and flow statistics data of each of the list items in the time interval based on the time interval corresponding to the data reconciliation task, as the reconciliation data to be performed for each of the list items.
[0116] The reconciliation result acquisition module 604 is used to reconcile the data to be reconciled for each of the list items in the time interval, and obtain the reconciliation result of the data reconciliation task.
[0117] In one embodiment, the flow data acquisition module 601 includes:
[0118] The raw transaction data acquisition submodule is used to acquire raw transaction data from the data source corresponding to the target ranking list; each raw transaction data has a corresponding timestamp, ranking list item identifier, and transaction value associated with the target ranking list event;
[0119] The pipeline backup data storage submodule is used to store the pipeline backup data corresponding to each of the list items according to the list item identifier of each of the original pipeline data.
[0120] The transaction statistics data acquisition submodule is used to calculate the transaction statistics data corresponding to each of the list items based on the timestamp corresponding to each of the original transaction data, the list item identifier, and the transaction value.
[0121] In one embodiment, the flow statistics data includes interval statistics data, and the flow statistics data acquisition submodule includes:
[0122] A segmentation information acquisition unit is used to acquire flow data segmentation information; the flow data segmentation information is used to indicate multiple time intervals.
[0123] A data partitioning unit is used to partition each original data stream into multiple time intervals according to the timestamp corresponding to each original data stream.
[0124] The data aggregation unit is used to aggregate the interval statistics of each of the ranking items for any given time interval based on the ranking item identifier of the original data in the given time interval.
[0125] In one embodiment, the apparatus further includes:
[0126] The reconciliation message queue configuration module is used to configure the reconciliation message queue of the target leaderboard based on the information divided by the transaction data; the reconciliation message queue contains data reconciliation tasks corresponding to multiple time intervals.
[0127] In one embodiment, the data reconciliation task determination module 602 includes:
[0128] The data reconciliation task acquisition submodule is used to acquire data reconciliation tasks for the current time interval from the reconciliation message queue of the target leaderboard if the current time is the end time of the current time interval, and use these tasks as the data reconciliation tasks for the current time.
[0129] In one embodiment, the reconciliation result obtaining module 604 includes:
[0130] The submodule for obtaining the reconciliation result of the ranking item is used to compare the flow backup data stored in the ranking item within the time interval with the interval statistical data of the ranking item within the time interval for any ranking item, so as to obtain the ranking item reconciliation result of the ranking item; the interval statistical data includes the interval total value and the interval cumulative value.
[0131] The reconciliation result acquisition submodule is used to obtain the reconciliation result of the data reconciliation task based on the reconciliation result of each of the aforementioned list items.
[0132] In one embodiment, the apparatus further includes:
[0133] The anomaly alarm module is used to provide anomaly alarm information based on the reconciliation results when the reconciliation results indicate that there is data anomaly in the target ranking.
[0134] In one embodiment, the apparatus further includes:
[0135] The re-reconciliation module is used to re-initiate the data reconciliation task at preset time intervals if the reconciliation result of the data reconciliation task is an abnormal reconciliation status.
[0136] The various modules in the data reconciliation device for the aforementioned ranking list can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0137] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores leaderboard reconciliation data. The I / O interfaces allow the processor to exchange information with external devices. The communication interface allows communication with external terminals via a network connection. When executed by the processor, the computer program implements a leaderboard reconciliation method.
[0138] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0139] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0140] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0141] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0142] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0143] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0144] In one embodiment, the processor also performs the steps described in the other embodiments when executing the computer program.
[0145] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0146] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0147] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0148] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0149] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0150] In one embodiment, the computer program, when executed by a processor, also implements the steps described in the other embodiments above.
[0151] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0152] The system receives raw transaction data reported for a target ranking list and obtains transaction backup data and transaction statistics data corresponding to each of the multiple ranking items. The target ranking list is used to sort the multiple ranking items based on the target ranking list event. The raw transaction data is transaction data associated with the target ranking list event.
[0153] If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained;
[0154] Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the list items in the time interval are determined as the reconciliation data to be performed for each of the list items.
[0155] The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
[0156] In one embodiment, the computer program, when executed by a processor, also implements the steps described in the other embodiments above.
[0157] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data reconciliation method for a ranking list, characterized in that, The method includes: The raw transaction data is obtained from the data source corresponding to the target ranking list; each raw transaction data has a corresponding timestamp, a ranking list item identifier, and a transaction value associated with the target ranking list event; the target ranking list is used to sort multiple ranking list items based on the target ranking list event; the raw transaction data is the transaction data associated with the target ranking list event. The raw transaction data reported by the bypass is received, and each raw transaction data is backed up and stored in the transaction database according to the list item identifier of each raw transaction data, so as to obtain the transaction backup data corresponding to each list item. Based on the timestamps corresponding to each of the original transaction data, the list item identifiers, and the transaction values, the transaction statistics corresponding to each of the list items are calculated, and the transaction statistics are stored in a calculation database. If the current time meets the conditions for triggering the reconciliation task, the data reconciliation task of the target leaderboard at the current time is obtained; Based on the time interval corresponding to the data reconciliation task, the backup data and statistical data of each of the ranking items in the time interval are determined in the transaction database and the calculation database, respectively, as the reconciliation data to be performed for each of the ranking items. The reconciliation data for each of the aforementioned list items within the specified time interval is reconciled to obtain the reconciliation results of the data reconciliation task.
2. The method according to claim 1, characterized in that, The transaction statistics include interval statistics. The calculation of transaction statistics for each of the ranking items based on the timestamp corresponding to each of the original transaction data, the ranking item identifier, and the transaction value includes: Obtain flow data segmentation information; the flow data segmentation information is used to indicate multiple time intervals; According to the timestamps corresponding to each of the original transaction data, the original transaction data is divided into multiple time intervals; For any given time interval, based on the list item identifier of the original flow data in that time interval, the interval statistical data of each list item is aggregated.
3. The method according to claim 1, characterized in that, Before the step of obtaining the data reconciliation task of the target leaderboard at the current time when the reconciliation task triggering condition is detected at the current time, the method further includes: Based on the transaction data segmentation information, configure the reconciliation message queue of the target leaderboard; the reconciliation message queue contains data reconciliation tasks corresponding to multiple time intervals.
4. The method according to claim 3, characterized in that, The step of obtaining the data reconciliation task of the target ranking list at the current time when the reconciliation task triggering condition is met includes: If the current time is the end time of the current time interval, the data reconciliation task for the current time interval is obtained from the reconciliation message queue of the target leaderboard and used as the data reconciliation task for the current time.
5. The method according to claim 1, characterized in that, The reconciliation of the data to be reconciled for each of the list items within the time interval, to obtain the reconciliation result of the data reconciliation task, includes: For any list item, the backup data stored for that list item within the time interval is compared with the interval statistical data of that list item within the time interval to obtain the list item reconciliation result; the interval statistical data includes the interval total value and the interval cumulative value. The reconciliation results of the data reconciliation task are obtained based on the reconciliation results of each of the aforementioned list items.
6. The method according to claim 1, characterized in that, After the step of reconciling the data to be reconciled for each of the list items in the time interval to obtain the reconciliation result of the data reconciliation task, the method further includes: If the reconciliation results indicate that there is data anomaly in the target ranking list, an anomaly alarm message will be fed back based on the reconciliation results.
7. The method according to any one of claims 1 to 6, characterized in that, After the step of reconciling the data to be reconciled for each of the list items in the time interval to obtain the reconciliation result of the data reconciliation task, the method further includes: If the reconciliation result of the data reconciliation task is an abnormal reconciliation status, the data reconciliation task shall be re-initiated at a preset time interval.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Full-link account checking method and account checking system
CN116091192A