Data correction system, method and device, electronic equipment and computer storage medium
Capturing abnormal events and checking data sub-models through the data correction system solves the problem of low data correction efficiency in the existing technology, achieves efficient consistency of data between different service domains, and improves user experience.
Patent Information
- Application Number
- CN202410598414.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
When existing technology ensures data consistency, data correction efficiency is low, resulting in high system pressure or poor user experience, and cannot effectively solve the problem of abnormal data synchronization.
A data correction system is designed, including a data synchronization subsystem, an abnormal event capture terminal and a data correction terminal. By capturing data synchronization abnormal events, the data sub-models suspected of abnormal synchronization are determined, added to the sub-model queue to be verified, and based on the sub-model Identifies and checks data synchronization results to ensure data consistency between different service domains.
It improves the efficiency of data correction, reduces system load, ensures data consistency, and improves user experience. Especially when data synchronization is abnormal, abnormal data can be corrected in a timely manner.
Smart Images

Figure CN118535645A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data correction system, method, device, electronic device and computer storage medium. Background Art
[0002] With the development of Internet technology, more and more service scenarios require the synchronization of data between multiple application domains. For example, in the scenario of placing an order for a dish, the data information of the dish in the ordering device needs to be consistent with the dish information in the ordering applet.
[0003] At present, in order to ensure the consistency of data in different application domains, when consistency problems occur in the data, one way is to fully verify the data to be verified. In the full verification scenario, all data need to be verified in real time. Correcting the full data is not only time-consuming, but also easily causes great pressure on the data correction system, resulting in low data correction efficiency; another way is to verify the data to be verified offline. The offline verification data results have a lag, resulting in a poor user experience.
[0004] Therefore, how to provide a data correction system to improve the efficiency of data correction and ensure data consistency is an urgent problem that needs to be solved. Summary of the invention
[0005] The embodiment of the present application provides a data correction system, which improves the efficiency of data correction and ensures the consistency of data.
[0006] The embodiment of the present application provides a data correction system, including: a data synchronization subsystem, an abnormal event capture terminal, and a data correction terminal; the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; the abnormal event capture terminal is used to capture abnormal event information generated by the data synchronization subsystem, determine a data submodel suspected of abnormal synchronization that needs to be checked according to the abnormal event information, use it as the data submodel to be checked, obtain a submodel identifier of the data submodel to be checked, use it as the submodel identifier to be checked, and add the submodel identifier to be checked to a submodel queue to be checked, wherein the data submodel is a submodel derived from a data model, or a subordinate submodel derived from an upper-level data submodel, The data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; the data correction end is used to obtain the sub-model identifier to be checked from the sub-model queue to be checked, and check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the sub-model identifier to be checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, then correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0007] Optionally, the data synchronization subsystem is further used to send the abnormal event information to the information interaction channel between the data synchronization subsystem and the abnormal event capture terminal when an abnormal event occurs;
[0008] The capturing of the abnormal event information generated by the data synchronization subsystem includes: capturing the abnormal event information from the information interaction channel.
[0009] Optionally, an abnormal event interceptor is provided in the data synchronization subsystem, the abnormal event interceptor is used to intercept abnormal event information generated by the data synchronization subsystem, and send the abnormal event information to the abnormal event capture terminal;
[0010] The capturing of the abnormal event information generated by the data synchronization subsystem includes: obtaining the abnormal event information provided by the abnormal event interceptor.
[0011] Optionally, the determining of the data sub-model of suspected abnormal synchronization to be checked according to the abnormal event information includes:
[0012] According to the abnormal event information, determining whether abnormal synchronization data with abnormal pointing can be obtained from the abnormal event information;
[0013] If yes, then obtaining an abnormal data sub-model corresponding to the abnormal synchronization data according to the abnormal synchronization data, and determining the abnormal data sub-model as a suspected abnormal synchronization data sub-model to be checked;
[0014] If not, then the suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained, and the data sub-model to which the suspected unsynchronized data belongs is determined as the suspected abnormally synchronized data sub-model that needs to be checked.
[0015] Optionally, obtaining suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured includes:
[0016] querying a first data transmission log corresponding to the first service domain and a second data transmission log corresponding to the second service domain within the preset time period;
[0017] Obtaining log difference data between the first data transmission log and the second data transmission log;
[0018] According to the log difference data, suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained.
[0019] Optionally, the data correction end is further used to determine the priority of the abnormal synchronization data in the data sub-model to be checked corresponding to the sub-model identifier to be checked, and if the priority of the abnormal synchronization data is lower than the preset priority, the sub-model identifier to be checked of the data sub-model to be checked corresponding to the abnormal synchronization data is added to the candidate sub-model to be checked queue, and the candidate sub-model to be checked queue is used to store the sub-model identifier to be checked of the data sub-model to which the abnormal synchronization data having a priority lower than the preset priority belongs;
[0020] The step of verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the sub-model identifier to be verified includes: if the priority of the abnormal synchronization data is higher than the preset priority, verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified corresponding to the sub-model identifier to be verified according to the sub-model identifier to be verified.
[0021] Optionally, a first transfer device is provided in the first service domain, and a second transfer device is provided in the second service domain;
[0022] The abnormal event capture end is further used to capture abnormal information with abnormal indication generated when the first transfer device transmits data to the second transfer device;
[0023] The data correction terminal is used to check the data sub-model to which the abnormal information belongs based on the abnormal information.
[0024] Optionally, if the frequency of exceptions occurring in the first service domain of the data synchronization subsystem is greater than a preset frequency, the abnormal event capture end is further used to send an indication message to the data synchronization subsystem indicating that the data synchronization subsystem synchronization priority is greater than a preset priority.
[0025] Optionally, the first service domain and the second service domain are respectively provided with a first database and a second database for storing data;
[0026] If data synchronization in the data synchronization subsystem is successful, the synchronization data between the first service domain and the second service domain are stored in the first database and the second database respectively;
[0027] If data synchronization fails in the data synchronization subsystem, the corrected data in the first service domain and the corrected data in the second service domain are stored in the first database and the second database respectively.
[0028] Optionally, the first service domain is a service domain where the ordering device is located, and the second service domain is a service domain where the ordering applet is located, and the ordering service of the same target restaurant can be provided to the user through the ordering device or the ordering applet;
[0029] The data model is a parameter set of dishes in the menu provided by the target restaurant, the service object is the dishes in the menu, the data sub-model is a parameter set of features associated with the dishes, and the data sub-model has a peak period verification urgency tag, and the peak period verification urgency tag is used to indicate the urgency of verifying the data synchronization result for the data sub-model if the sub-model identifier to be verified is obtained from the sub-model queue to be verified during the peak period of ordering at the target restaurant;
[0030] The data correction terminal is further used to determine whether the time point at which the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant;
[0031] The checking, according to the to-be-checked sub-model identifier, a data synchronization result between the to-be-checked data sub-model and the second service domain, includes:
[0032] If it is determined that the time point at which the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant, then obtaining the peak period checking urgency label of the sub-model to be checked according to the sub-model identifier to be checked;
[0033] If the peak period verification urgency tag of the to-be-verified data sub-model is a preset high urgency tag, verifying the data synchronization result between the to-be-verified data sub-model and the first service domain and the second service domain;
[0034] The data correction end is further used for adding the sub-model identifier to be checked into the non-peak period checking sub-model queue if it is determined that the peak period checking urgency label of the sub-model to be checked is a preset low urgency label.
[0035] The embodiment of the present application also provides a data correction method, comprising: obtaining a sub-model identifier to be checked of a data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from a sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization subsystem, and the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a lower-level sub-model derived from an upper-level data sub-model, and the data The model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; according to the identifier of the sub-model to be checked, the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked is checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, the data of the data sub-model to be checked in the first service domain and the data in the second service domain are corrected to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0036] The embodiment of the present application also provides a data correction device, including: a sub-model identifier obtaining unit to be checked, used to obtain the sub-model identifier to be checked of the data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from the sub-model queue to be checked, and the data sub-model to be checked is a suspected abnormally synchronized data sub-model that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization sub-system, and the data synchronization sub-system is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a lower-level sub-model derived from an upper-level data sub-model, and ... and the data sub-model is a sub-model derived from a data model, and the data sub-model is a sub-model derived from a data model, and the data sub-model is a sub-model derived from a data model, and the data sub-model is a sub-model derived from a data model, and the data sub-model is a sub-model derived from a data model. The data model is a set of parameters of the service object's own characteristics, and the data sub-model is a set of parameters of the characteristics associated with the service object; a data synchronization result verification unit is used to verify the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the identifier of the sub-model to be verified, and if the data of the data sub-model to be verified in the first service domain is different from the data in the second service domain, correct the data of the data sub-model to be verified in the first service domain and the data in the second service domain to make the data of the data sub-model to be verified in the first service domain the same as the data in the second service domain.
[0037] The present application also provides an electronic device, which includes a processor and a memory; a computer program is stored in the memory, and the processor executes the above method after running the computer program.
[0038] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer program, and after the computer program is run by a processor, the above method is executed.
[0039] Compared with the prior art, the embodiments of the present application have the following advantages:
[0040] The embodiment of the present application provides a data correction system, including: a data synchronization subsystem, an abnormal event capture terminal, and a data correction terminal; the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; the abnormal event capture terminal is used to capture abnormal event information generated by the data synchronization subsystem, determine a data submodel suspected of abnormal synchronization that needs to be checked according to the abnormal event information, use it as the data submodel to be checked, obtain a submodel identifier of the data submodel to be checked, use it as the submodel identifier to be checked, and add the submodel identifier to be checked to a submodel queue to be checked, wherein the data submodel is a submodel derived from a data model, or a subordinate submodel derived from an upper-level data submodel, The data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; the data correction end is used to obtain the sub-model identifier to be checked from the sub-model queue to be checked, and check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the sub-model identifier to be checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, then correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0041] The data correction system described in the embodiment of the present application can capture abnormal events generated by the data synchronization subsystem through the abnormal event capture terminal, and determine the data submodel to be checked for suspected abnormal synchronization that needs to be checked based on the abnormal event information, and then obtain the submodel identifier of the data submodel to be checked. Finally, based on the submodel identifier, check the data synchronization result between the first service domain and the second service domain of the data submodel to be checked, and correct the data of the data submodel to be checked in the first service domain and the second service domain when the data are different. Therefore, the data correction system can determine the data submodel of abnormal synchronization when the data synchronization is abnormal, and then correct the data synchronization result based on the dimension of the data submodel, which effectively improves the efficiency of data correction and ensures the consistency of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of an application scenario of a data correction system provided in an embodiment of the present application;
[0043] Figure 2 is a schematic diagram of a data correction system provided in an embodiment of the present application;
[0044] Figure 3 is a schematic diagram of a data sub-model provided in an embodiment of the present application;
[0045] Figure 4 is a flow chart of a data correction method provided in the first embodiment of the present application;
[0046] Figure 5 is a schematic diagram of a data correction device provided in the second embodiment of the present application;
[0047] Figure 6 This is a schematic diagram of an electronic device provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0048] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0049] First, in order to enable those skilled in the art to better understand the present application, the following describes in detail the specific application scenarios of the embodiments of the data correction system provided by the present application. Figure 1 As shown, it is a schematic diagram of an application scenario of a data correction system provided in an embodiment of the present application.
[0050] Before introducing the application scenarios of the data correction system provided in the embodiments of the present application, a brief introduction is first given to the implementation background of the data correction system.
[0051] With the development of Internet technology, more and more service scenarios require the synchronization of data between multiple application domains. For example, in the scenario of ordering dishes, the data information of the dishes in the ordering device needs to be consistent with the dish information in the ordering applet. If the price of the dish "Fish-flavored Shredded Pork" in the menu of the ordering device is 20 yuan, then the price of the dish "Fish-flavored Shredded Pork" in the menu of the corresponding ordering applet should also be 20 yuan. Currently, in the scenario of ordering dishes, the data to be verified includes not only the price information of the dishes, but also the name information of the dishes, the inventory information of the dishes, and all other information of the dish dimensions, which are information that needs to maintain data consistency.
[0052] At present, in order to ensure the consistency of data in different application domains, when there is a consistency problem in the data, one way is to perform a full check on the data to be checked. In the full check scenario, all data needs to be checked in real time. The correction of the full data is not only time-consuming, but also easy to cause a large pressure on the data correction system, resulting in low data correction efficiency. It should be noted that the above-mentioned full real-time check method of data based on the service dimension needs to be checked for each data synchronization, and each record or each field in the data table is checked. Although it can guarantee the consistency of the data to the maximum extent, this method is not only time-consuming, but also increases the system overhead, causing a large pressure on the data correction system. Moreover, in the actual service execution process, most of the cases are normal data synchronization. Therefore, the full data check is not meaningful. Another way is to check the data to be checked offline. The offline check data result has a lag, resulting in a poor user experience. For example, the synchronization data triggered during the day, the data check at night may result in the discovery of data synchronization problems the next day, affecting the user experience.
[0053] Based on this, an embodiment of the present application provides a data correction system, which can capture abnormal events generated by the data synchronization subsystem through an abnormal event capture terminal, and determine the data submodel to be checked for suspected abnormal synchronization that needs to be checked based on the abnormal event information, and then obtain the submodel identifier of the data submodel to be checked. Finally, based on the submodel identifier, check the data synchronization result between the first service domain and the second service domain of the data submodel to be checked, and correct the data of the data submodel to be checked in the first service domain and the second service domain when the data is different. Therefore, the data correction system can determine the data submodel of abnormal synchronization when the data synchronization is abnormal, and then correct the data synchronization result based on the dimension of the data submodel, which effectively improves the efficiency of data correction and ensures the consistency of the data.
[0054] The following combination Figure 1 The application scenarios of the data correction system described in the embodiments of the present application are introduced in detail.
[0055] The embodiment of the present application is introduced by taking the ordering scenario as an example. The ordering device 101 is used to order food for customers. The ordering device can be a POS machine for ordering food, or a self-service ordering device. The ordering applet 102 can be an ordering QR code set on the restaurant table. The ordering applet can be entered by scanning the ordering QR code. The ordering device 101 or the ordering applet 102 are in different service domains. The ordering device 101 or the ordering applet 102 can provide users with the ordering service of the same target restaurant. Among them, the service data corresponding to the ordering device 101 is stored in the first database, and the service data corresponding to the ordering applet 102 is stored in the second database. Under normal circumstances, the data displayed on the ordering device 101 should be consistent with the data displayed in the ordering applet 102. For example, the price of the dish "Fish-flavored Shredded Pork" should be 20 yuan. If there is an abnormality in data synchronization, there may be inconsistency between the data displayed on the ordering device 101 and the data displayed in the ordering applet 102. The data correction system described in the embodiment of the present application is used to correct the data when the service data between the ordering device 101 and the ordering applet 102 are inconsistent.
[0056] The above is an introduction to the scenario of the embodiment of the present application. Figure 2 The data correction system provided in the embodiment of the present application is introduced in detail.
[0057] See also Figure 2 , Figure 2 It is a schematic diagram of a data correction system provided in an embodiment of the present application. The data correction system 20 includes: a data synchronization subsystem 201, an abnormal event capture terminal 202, and a data correction terminal 203. The data synchronization subsystem 201 is used to synchronize data between the first service domain 201-1 and the second service domain 201-2. The first service domain 201-1 and the second service domain 201-2 can be service domains that have synchronization requirements at the data level. For example, in the scenario of placing an order for dishes, the first service domain 201-1 can be the service domain where the ordering device is located, and the second service domain 201-2 can be the service domain where the ordering applet is located. The ordering service of the same target restaurant can be provided to users through the ordering device or the ordering applet. The dish data in the ordering device and the dish data in the ordering applet need to be consistent. The data synchronization subsystem 201 is used to synchronize data between the first service domain 201-1 and the second service domain 201-2.
[0058] The abnormal event capture terminal 202 is used to capture the abnormal event information generated by the data synchronization subsystem 201, determine the data submodel of suspected abnormal synchronization that needs to be checked according to the abnormal event information, as the data submodel to be checked, obtain the submodel identifier of the data submodel to be checked, as the submodel identifier to be checked, and add the submodel identifier to the submodel queue to be checked. The data submodel is a submodel derived from the data model, or a lower-level submodel derived from the upper-level data submodel, the data model is a parameter set of the service object's own characteristics, and the data submodel is a parameter set of the characteristics associated with the service object.
[0059] In specific implementation, if an exception occurs during data synchronization between the first service domain 201-1 and the second service domain 201-2, at this time, the abnormal event capture terminal 202 will capture the abnormal event information generated by the data synchronization subsystem 201, and according to the abnormal event information, the data sub-model of suspected abnormal synchronization that needs to be checked can usually be determined as the data sub-model to be checked. It should be noted that the data sub-model is a sub-model derived from the data model, or a lower-level sub-model derived from the upper-level data sub-model, the data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object.
[0060] See also Figure 3 , Figure 3It is a schematic diagram of the data sub-model provided in the embodiment of the present application. For example, the data model is a commodity model or a dish model of the commodity dimension, and the data sub-model may be a commodity inventory sub-model, a commodity category sub-model, a commodity channel sub-model, a commodity specification sub-model, a commodity minimum inventory unit sub-model, a commodity unit sub-model, a commodity note sub-model, etc. under the commodity model or dish model, and each data sub-model contains corresponding attribute information, for example, the commodity inventory sub-model includes attribute information such as commodity channel, commodity inventory balance, inventory organization, commodity sales status, etc., wherein the commodity channel indicates the source of commodity purchase, the commodity inventory balance indicates the remaining inventory quantity of the commodity, the inventory organization indicates the location of the commodity inventory, and the commodity sales status includes the status of the commodity being sold, the commodity sold out, etc.; the commodity category sub-model includes attribute information such as commodity name, commodity code, commodity type, etc., wherein the commodity type may be the specific sales form of the commodity, such as a single product, a set meal, or a temporary dish etc.; the commodity channel sub-model includes attribute information such as commodity channel name, commodity channel code, commodity channel source and commodity channel affiliated organization, among which, commodity channel source can refer to the end where the commodity enters the platform, such as a third party, and the commodity channel affiliated organization can refer to the brand or store to which the commodity specifically belongs; the commodity specification sub-model includes attribute information such as commodity name and commodity grouping; the commodity minimum inventory unit sub-model includes attribute information such as commodity name, commodity price, commodity barcode, commodity starting quantity, commodity additional quantity, etc.; the commodity unit sub-model includes attribute information such as commodity unit name, commodity unit type, commodity unit conversion rules, etc.; the commodity note sub-model includes attribute information such as commodity name, commodity sorting status, commodity type, among which, commodity sorting status can refer to the display order of commodities on the terminal, and status can indicate that the commodity is in a state such as available for sale, removed from the shelves, or disabled.
[0061] When an exception occurs during data synchronization between the first service domain 201-1 and the second service domain 201-2, the exception event capture terminal 202 will capture the exception information. Generally, the exception information can indicate the exception synchronization data sub-model to which the exception data belongs. For example, the exception information shows that the inventory balance information of the commodity is inconsistent. At this time, the exception event capture terminal 202 can determine that the data sub-model suspected of abnormal synchronization is the commodity inventory sub-model, and use the commodity inventory sub-model as the data sub-model to be checked. Then, the exception event capture terminal 202 obtains the sub-model identifier of the data sub-model to be checked as the sub-model identifier to be checked. For example, if the data sub-model suspected of abnormal synchronization is the commodity inventory sub-model, at this time, the exception event capture terminal 202 can obtain the identification information of the commodity inventory sub-model, which can specifically be the inventory ID, etc., and use the identifier of the commodity inventory sub-model as the sub-model identifier to be checked. After that, the sub-model identifier to be checked is added to the sub-model queue to be checked. Of course, when actually performing data synchronization processing, when an abnormal event occurs, there may be more than one suspected abnormal synchronization data sub-model. In specific implementation, multiple data sub-model identifiers corresponding to the suspected abnormal synchronization data sub-models can be added to the sub-model queue to be checked.
[0062] In the embodiment of the present application, the data synchronization subsystem 201 is also used to send the abnormal event information to the information interaction channel 204 between the data synchronization subsystem 201 and the abnormal event capture terminal 202 when an abnormal event occurs; the capturing of the abnormal event information generated by the data synchronization subsystem includes: capturing the abnormal event information from the information interaction channel 204. In specific implementation, an information interaction channel 204 is also provided between the data synchronization subsystem 201 and the abnormal event capture terminal 202, and the information interaction channel 204 is used to perform information interaction between the data synchronization subsystem 201 and the abnormal event capture terminal 202. When an abnormal event occurs in the data synchronization subsystem 201, the abnormal event information is first sent to the information interaction channel 204, and then the abnormal event capture terminal 202 obtains the abnormal event information from the information channel 204.
[0063] It should be noted that an abnormal event interceptor 201-3 is set in the data synchronization subsystem 201, and the abnormal event interceptor 201-3 is used to intercept the abnormal event information generated by the data synchronization subsystem 201 and send the abnormal event information to the abnormal event capture terminal 202; the capturing of the abnormal event information generated by the data synchronization subsystem 201 includes: obtaining the abnormal event information provided by the abnormal event interceptor 201-3.
[0064] In actual applications, if the frequency of exceptions occurring in the first service domain 201-1 of the data synchronization subsystem 201 is greater than a preset frequency, the abnormal event capture terminal 202 is also used to send an indication message to the data synchronization subsystem 201 for indicating that the data synchronization subsystem 201 synchronizes data with a priority greater than a preset priority. If exceptions frequently occur in the first service domain 201-1, at this time, the abnormal event capture terminal 202 can send an indication message to the data synchronization subsystem 201, and the indication message is used to indicate that the data synchronization subsystem 201 prioritizes synchronization of data with a high priority. For example, the abnormal event capture terminal 202 can send an indication message to the data synchronization subsystem 201 indicating that the price of the commodity is synchronized first, to ensure that the price of the commodity in the first service domain 201-1 is consistent with the price of the commodity in the second service domain 201-2.
[0065] In an embodiment of the present application, the data sub-model of suspected abnormal synchronization that needs to be checked according to the abnormal event information includes: judging whether abnormal synchronization data with abnormal pointing can be obtained from the abnormal event information according to the abnormal event information; if so, obtaining an abnormal data sub-model corresponding to the abnormal synchronization data according to the abnormal synchronization data, and determining the abnormal data sub-model as the data sub-model of suspected abnormal synchronization that needs to be checked; if not, obtaining suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured, and determining the data sub-model to which the suspected unsynchronized data belongs as the data sub-model of suspected abnormal synchronization that needs to be checked.
[0066] It should be noted that when determining the data sub-model of suspected abnormal synchronization that needs to be checked based on the abnormal event information, if the abnormal synchronization data with an abnormal pointing can be obtained from the abnormal event information, then the abnormal data sub-model corresponding to the abnormal synchronization data can be obtained based on the abnormal synchronization data pointed to by the abnormal pointing. For example, if the abnormal information shows that the inventory balance information of the product is inconsistent, at this time, the abnormal event capture terminal 202 can determine that the data sub-model of suspected abnormal synchronization is the product inventory sub-model, and use the product inventory sub-model as the data sub-model to be checked.
[0067] If the abnormal synchronization data with abnormal pointing cannot be obtained from the abnormal event information, for example, the abnormality of the data synchronization subsystem may be caused by network abnormality, load abnormality, etc., and the abnormal event information does not clearly indicate which type of data submodel has the abnormality, then the suspected unsynchronized data within the preset time period before the time point when the abnormal event information is captured can be obtained, and the data submodel to which the suspected unsynchronized data belongs can be determined as the suspected abnormally synchronized data submodel that needs to be checked. The obtaining of the suspected unsynchronized data within the preset time period before the time point when the abnormal event information is captured includes: querying the first data transmission log corresponding to the first service domain and the second data transmission log corresponding to the second service domain within the preset time period; obtaining the log difference data between the first data transmission log and the second data transmission log; and obtaining the suspected unsynchronized data within the preset time period before the time point when the abnormal event information is captured based on the log difference data.
[0068] In specific implementation, if the abnormal synchronization data with the abnormal pointing cannot be obtained from the abnormal event information, the data transmission logs in the first service domain and the second service domain within the preset time period before the time point when the abnormal event information is captured can be referred to, and the first data transmission log corresponding to the first service domain and the second data transmission log corresponding to the second service domain can be compared, and the suspected unsynchronized data can be determined according to the comparison result. For example, within the preset time period, the first data transmission log in the first service domain shows that the commodity price and the commodity inventory balance are synchronized within the time period, and correspondingly, the second data transmission log in the second service domain shows that the commodity price is synchronized within the time period, and there is no commodity inventory balance. At this time, the commodity inventory balance can be regarded as the suspected unsynchronized data, and the suspected unsynchronized data sub-model can be determined as the commodity inventory sub-model based on the suspected unsynchronized data, and then, the identification information of the commodity inventory sub-model is obtained as the sub-model identifier to be checked, and the sub-model identifier to be checked is added to the sub-model queue to be checked.
[0069] The above is the process of the abnormal event capture terminal 202 obtaining the identification of the sub-model to be checked. The following describes how to check the data synchronization result of the sub-model to be checked between the first service domain and the second service domain according to the identification of the sub-model to be checked.
[0070] In an embodiment of the present application, the data correction terminal 203 is used to obtain the identifier of the sub-model to be checked from the sub-model to be checked queue, and check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the sub-model to be checked identifier; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, then correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0071] It should be noted that the data correction end 203 is used to check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked, and to correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain when the data are different. In specific implementation, the data correction end 203 obtains the identification of the sub-model to be checked from the sub-model to be checked queue, and checks the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the identification of the sub-model to be checked, and corrects the data if they are different. For example, the data correction end 203 obtains the ID identifier of the commodity inventory sub-model from the queue of sub-models to be checked, and checks the abnormal attribute information of the commodity inventory sub-model in the first service domain and the second service domain based on the ID identifier of the commodity inventory sub-model. After checking, it is found that the commodity inventory balance data is inconsistent. At this time, the data correction end 203 will correct the commodity inventory balance data of the commodity inventory sub-model in the first service domain and the commodity inventory balance data in the second service domain to make the commodity inventory balance data of the commodity inventory sub-model in the first service domain the same as the commodity inventory balance data in the second service domain.
[0072] In practical applications, if there are many abnormal synchronization data, the priority of the abnormal synchronization data also needs to be considered. Specifically, the data correction terminal 203 is also used to determine the priority of the abnormal synchronization data in the data sub-model to be checked corresponding to the sub-model identifier to be checked. If the priority of the abnormal synchronization data is lower than the preset priority, the sub-model identifier to be checked of the data sub-model to be checked corresponding to the abnormal synchronization data is added to the candidate sub-model queue to be checked, and the candidate sub-model queue to be checked is used to store the sub-model identifier to be checked of the data sub-model to which the abnormal synchronization data with a priority lower than the preset priority belongs; the data synchronization result of the sub-model to be checked between the first service domain and the second service domain is checked according to the sub-model identifier to be checked, including: if the priority of the abnormal synchronization data is higher than the preset priority, the data synchronization result of the sub-model to be checked corresponding to the sub-model identifier to be checked between the first service domain and the second service domain is checked according to the sub-model identifier to be checked.
[0073] It should be noted that, after the abnormal event capture end 202 determines the to-be-checked data sub-model of the suspected abnormal synchronization data, it further obtains the to-be-checked sub-model identifier of the to-be-checked data sub-model, and adds the to-be-checked sub-model identifier to the to-be-checked sub-model queue. The data correction end 203 obtains the to-be-checked sub-model identifier from the to-be-checked sub-model queue. When the data synchronization result between the first service domain and the second service domain in the to-be-checked sub-model is compared with the to-be-checked sub-model identifier, the priority of the abnormal data is judged according to the to-be-checked sub-model identifier. If the priority of the abnormal synchronization data is lower than the preset priority, the to-be-checked sub-model identifier of the to-be-checked data sub-model corresponding to the abnormal synchronization data is added to the candidate to-be-checked sub-model queue. The candidate to-be-checked sub-model queue is used to store the to-be-checked sub-model identifier of the to-be-checked data sub-model to which the abnormal synchronization data having a priority lower than the preset priority belongs. For example, the sub-model identifiers to be checked stored in the sub-model queue to be checked include: commodity inventory sub-model identifier, commodity minimum inventory unit sub-model identifier, etc. After checking, the commodity inventory balance in the commodity inventory sub-model corresponding to the commodity inventory sub-model identifier is abnormal, and the commodity price in the commodity minimum inventory unit sub-model corresponding to the commodity minimum inventory unit sub-model identifier is abnormal. Since the priority of the commodity price is greater than the commodity inventory balance, at this time, the commodity minimum inventory unit sub-model where the commodity price is located can be corrected first, and the commodity inventory sub-model identifier of the commodity inventory sub-model to which the commodity inventory balance belongs is added to the candidate sub-model queue to be checked. After correcting the commodity minimum inventory unit sub-model where the commodity price is located, the commodity inventory sub-model identifier is obtained from the candidate sub-model queue to be checked, and the commodity balance data in the commodity inventory sub-model is further corrected, thereby ensuring that the data with higher priority can be corrected in time when it is abnormal.
[0074] In an embodiment of the present application, a first transferor is provided in the first service domain, and a second transferor is provided in the second service domain; the abnormal event capture end is further used to capture abnormal information with abnormal pointing generated when the first transferor transmits data to the second transferor; the data correction end is used to check the data sub-model to which the abnormal information belongs based on the abnormal information.
[0075] During specific implementation, the first service domain 201-1 and the second service domain 201-2 are respectively provided with a first database 205 and a second database 206 for storing data; if data synchronization in the data synchronization subsystem 201 is successful, the synchronized data between the first service domain 201-1 and the second service domain 201-2 are respectively stored in the first database 205 and the second database 206; if data synchronization in the data synchronization subsystem 201 fails, the corrected data in the first service domain 201-1 and the data in the second service domain 201-2 are respectively stored in the first database 205 and the second database 206.
[0076] In an embodiment of the present application, the data correction system can be applied in an ordering scenario, specifically, the first service domain is the service domain where the ordering device is located, and the second service domain is the service domain where the ordering applet is located. The ordering service of the same target restaurant can be provided to users through the ordering device or the ordering applet; the data model is a parameter set of dishes in the menu provided by the target restaurant, the service object is the dish in the menu, the data sub-model is a parameter set of features associated with the dish, and the data sub-model has a peak period verification urgency label, and the peak period verification urgency label is used to indicate the urgency of verifying the data synchronization result for the data sub-model if the sub-model identifier to be verified is obtained from the sub-model queue to be verified during the peak period of ordering at the target restaurant; the data correction terminal 203 is also used to determine the time point when the sub-model identifier to be verified is obtained from the sub-model queue to be verified. whether it is a time point within the peak ordering period of the target restaurant; the data synchronization result of the data sub-model to be checked between the first service domain and the second service domain is checked according to the sub-model identifier to be checked, including: if it is determined that the time point when the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant, then according to the sub-model identifier to be checked, the peak period verification urgency tag of the data sub-model to be checked is obtained; if the peak period verification urgency tag of the data sub-model to be checked is a preset high urgency tag, then the data synchronization result of the data sub-model to be checked between the first service domain and the second service domain is checked; the data correction end is also used to add the sub-model identifier to the non-peak period verification sub-model queue if it is determined that the peak period verification urgency tag of the data sub-model to be checked is a preset low urgency tag.
[0077] It should be noted that in the ordering scenario, the first service domain 201-1 may be the service domain where the ordering device is located, the second service domain 201-2 may be the service domain where the ordering applet is located, and the ordering device may be a POS machine for ordering, or a self-service ordering device. The ordering applet may be an ordering QR code set on the table of the target restaurant, and the ordering applet may be entered by scanning the ordering QR code. The ordering service of the same target restaurant can be provided to users through the ordering device or the ordering applet. At this time, the data model may be a dish model, which contains relevant parameter information of the dish, and the data sub-model may be parameter information associated with the characteristics of the dish, such as the price of the dish, the inventory of the dish, etc. In practical applications, the data sub-model also has a peak period verification urgency label. When verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the identifier of the sub-model to be verified, it is also necessary to determine whether the peak period verification urgency label of the data sub-model to be verified is a preset high urgency label. If it is a high urgency label, the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified is verified in time. If it is a low urgency label, the identifier of the sub-model to be verified can be added to the non-peak period verification sub-model queue. Here, it is mainly aimed at the situation where data synchronization is abnormal during the peak period of ordering. The peak period of ordering refers to the period when the number of orders in the target restaurant exceeds the preset threshold number within a preset period of time. The peak period of ordering is the peak period of ordering in the target restaurant. It is necessary to consider whether the data in the abnormal data sub-model has an impact on ordering. If there is an impact, the data correction end needs to process it in time. If there is no impact or the impact is not great, it can be temporarily placed in the non-peak processing queue. For example, if the commodity minimum inventory unit sub-model corresponding to the commodity minimum inventory unit sub-model identifier includes the commodity price, the commodity minimum inventory unit sub-model has a high urgency tag, and the commodity inventory sub-model corresponding to the commodity inventory sub-model identifier includes the commodity inventory balance, then the commodity inventory sub-model has a low urgency tag. It should be noted that the preset high urgency tag and the preset low urgency tag are pre-set information, and the high urgency and low urgency indicate the urgency of the data in the data sub-model to be corrected. If the data correction terminal 203 obtains the commodity minimum inventory unit sub-model identifier at the peak ordering period of 12:00 noon, the data correction terminal 203 will give priority to correcting the abnormal commodity price data of the commodity inventory sub-model in the ordering device and the ordering applet; if the data correction terminal 203 obtains the commodity inventory sub-model identifier at the peak ordering period of 12:00 noon, the data correction terminal 203 will add the commodity inventory sub-model identifier to the non-peak period verification sub-model queue, and then correct the abnormal commodity inventory balance data.
[0078] The data correction system described in the embodiment of the present application triggers verification and correction based on anomalies in the data synchronization process. The object of verification and correction is the data sub-model where the anomaly occurs rather than the entire data model, which reduces the triggering verification scenario and system load. In addition, when correcting data, it is only necessary to collect the anomalies and send them to the relevant queue, and the data repair is automatically completed by a special verification and correction interface, which greatly reduces the cost of data verification and correction, improves the efficiency of data correction, ensures data consistency, and also improves the user experience.
[0079] The above is the full process analysis of the data correction system, which includes: a data synchronization subsystem, an abnormal event capture terminal, and a data correction terminal; the data synchronization subsystem is used to synchronize data between the first service domain and the second service domain; the abnormal event capture terminal is used to capture the abnormal event information generated by the data synchronization subsystem, determine the data submodel of suspected abnormal synchronization that needs to be checked according to the abnormal event information, and use it as the data submodel to be checked, obtain the submodel identifier of the data submodel to be checked, and use it as the submodel identifier to be checked, and add the submodel identifier to the submodel queue to be checked, wherein the data submodel is a submodel derived from the data model, or a lower-level submodel derived from the upper-level data submodel. model, the data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; the data correction end is used to obtain the sub-model identifier to be checked from the sub-model queue to be checked, and check the data synchronization result of the data sub-model to be checked between the first service domain and the second service domain according to the sub-model identifier to be checked. If the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, then correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0080] The data correction system described in the embodiment of the present application can capture abnormal events generated by the data synchronization subsystem through the abnormal event capture terminal, and determine the data submodel to be checked for suspected abnormal synchronization that needs to be checked based on the abnormal event information, and then obtain the submodel identifier of the data submodel to be checked. Finally, based on the submodel identifier, check the data synchronization result between the first service domain and the second service domain of the data submodel to be checked, and correct the data of the data submodel to be checked in the first service domain and the second service domain when the data are different. Therefore, the data correction system can determine the data submodel of abnormal synchronization when the data synchronization is abnormal, and then correct the data synchronization result based on the dimension of the data submodel, which effectively improves the efficiency of data correction and ensures the consistency of the data.
[0081] The present application is described below through a number of embodiments and drawings.
[0082] First embodiment
[0083] The first embodiment of the present application provides a data correction method, as follows: Figure 4 The data correction method is described. Since the data correction method is similar to the content of the data correction end in the above-mentioned data correction system, please refer to the relevant description in the above-mentioned data correction system for the specific content, and will not be described in detail here.
[0084] Step S401: obtaining a sub-model identifier to be checked of a data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from a sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization subsystem, and the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a subordinate sub-model derived from an upper-level data sub-model, and the data model is a parameter set of characteristics of a service object itself, and the data sub-model is a parameter set of characteristics associated with the service object.
[0085] Optionally, the data sub-model suspected of abnormal synchronization to be checked is determined in the following manner:
[0086] According to the abnormal event information, determining whether abnormal synchronization data with abnormal pointing can be obtained from the abnormal event information;
[0087] If yes, then obtaining an abnormal data sub-model corresponding to the abnormal synchronization data according to the abnormal synchronization data, and determining the abnormal data sub-model as a suspected abnormal synchronization data sub-model to be checked;
[0088] If not, then the suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained, and the data sub-model to which the suspected unsynchronized data belongs is determined as the suspected abnormally synchronized data sub-model that needs to be checked.
[0089] Optionally, obtaining suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured includes:
[0090] querying a first data transmission log corresponding to the first service domain and a second data transmission log corresponding to the second service domain within the preset time period;
[0091] Obtaining log difference data between the first data transmission log and the second data transmission log;
[0092] According to the log difference data, suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained.
[0093] Step S402: According to the identifier of the data sub-model to be checked, check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain so that the data of the data sub-model to be checked in the first service domain is the same as the data in the second service domain.
[0094] Optionally, also include:
[0095] Determine the priority of the abnormal synchronization data in the data sub-model to be checked corresponding to the sub-model to be checked identifier, if the priority of the abnormal synchronization data is lower than the preset priority, then add the sub-model to be checked identifier of the data sub-model to be checked corresponding to the abnormal synchronization data to the candidate sub-model to be checked queue, the candidate sub-model to be checked queue is used to store the sub-model to be checked identifier of the data sub-model to be checked to which the abnormal synchronization data having a priority lower than the preset priority belongs;
[0096] The step of verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the sub-model identifier to be verified includes: if the priority of the abnormal synchronization data is higher than the preset priority, verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified corresponding to the sub-model identifier to be verified according to the sub-model identifier to be verified.
[0097] Optionally, the first service domain and the second service domain are respectively provided with a first database and a second database for storing data;
[0098] If data synchronization in the data synchronization subsystem is successful, the synchronization data between the first service domain and the second service domain are stored in the first database and the second database respectively;
[0099] If data synchronization fails in the data synchronization subsystem, the corrected data in the first service domain and the corrected data in the second service domain are stored in the first database and the second database respectively.
[0100] Optionally, the first service domain is a service domain where the ordering device is located, and the second service domain is a service domain where the ordering applet is located, and the ordering service of the same target restaurant can be provided to the user through the ordering device or the ordering applet;
[0101] The data model is a parameter set of dishes in the menu provided by the target restaurant, the service object is the dishes in the menu, the data sub-model is a parameter set of features associated with the dishes, and the data sub-model has a peak period verification urgency tag, and the peak period verification urgency tag is used to indicate the urgency of verifying the data synchronization result for the data sub-model if the sub-model identifier to be verified is obtained from the sub-model queue to be verified during the peak period of ordering at the target restaurant;
[0102] The method further comprises:
[0103] Determining whether the time point at which the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant;
[0104] The checking, according to the to-be-checked sub-model identifier, a data synchronization result between the to-be-checked data sub-model and the second service domain, includes:
[0105] If it is determined that the time point at which the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant, then obtaining the peak period checking urgency label of the sub-model to be checked according to the sub-model identifier to be checked;
[0106] If the peak period verification urgency tag of the to-be-verified data sub-model is a preset high urgency tag, verifying the data synchronization result between the to-be-verified data sub-model and the first service domain and the second service domain;
[0107] The method further comprises:
[0108] If it is determined that the peak period verification urgency tag of the to-be-verified data sub-model is a preset low urgency tag, the to-be-verified sub-model identifier is added to the non-peak period verification sub-model queue.
[0109] The embodiment of the present application provides a data correction method, comprising: obtaining a sub-model identifier to be checked of a data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from a sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization subsystem, and the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a lower-level sub-model derived from an upper-level data sub-model, and the data The model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; according to the identifier of the sub-model to be checked, the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked is checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, the data of the data sub-model to be checked in the first service domain and the data in the second service domain are corrected to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0110] The data correction method described in the embodiment of the present application can verify the data synchronization results between the first service domain and the second service domain of the data sub-model to be verified according to the identifier of the sub-model to be verified, and correct the data of the data sub-model to be verified in the first service domain and the second service domain to make the data the same when the data is different. The data sub-model to be verified is a data sub-model of suspected abnormal synchronization that needs to be verified based on the abnormal event information generated by the data synchronization subsystem. Therefore, the data correction method can correct the data synchronization results based on the dimensions of the data sub-model, effectively improving the efficiency of data correction and ensuring data consistency.
[0111] Second embodiment
[0112] In the above-mentioned first embodiment, a data correction method is provided. Correspondingly, the second embodiment of the present application provides a data correction device. Since the device embodiment is basically similar to the first method embodiment, the description is relatively simple. For relevant parts, please refer to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0113] Please refer to Figure 5 , which is a schematic diagram of a data correction device provided in the second embodiment of the present application.
[0114] The data correction device 500 includes: a sub-model identifier to be checked obtaining unit 501, which is used to obtain the sub-model identifier to be checked of the data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from the sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization subsystem, and the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a subordinate sub-model derived from an upper-level data sub-model, and the data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object.
[0115] Optionally, the data sub-model suspected of abnormal synchronization to be checked is determined in the following manner:
[0116] According to the abnormal event information, determining whether abnormal synchronization data with abnormal pointing can be obtained from the abnormal event information;
[0117] If yes, then obtaining an abnormal data sub-model corresponding to the abnormal synchronization data according to the abnormal synchronization data, and determining the abnormal data sub-model as a suspected abnormal synchronization data sub-model to be checked;
[0118] If not, then the suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained, and the data sub-model to which the suspected unsynchronized data belongs is determined as the suspected abnormally synchronized data sub-model that needs to be checked.
[0119] Optionally, obtaining suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured includes:
[0120] querying a first data transmission log corresponding to the first service domain and a second data transmission log corresponding to the second service domain within the preset time period;
[0121] Obtaining log difference data between the first data transmission log and the second data transmission log;
[0122] According to the log difference data, suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained.
[0123] The data synchronization result checking unit 502 is used to check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the identifier of the data sub-model to be checked. If the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, the data of the data sub-model to be checked in the first service domain and the data in the second service domain are corrected to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
[0124] Optionally, it also includes: an abnormal synchronization data priority judgment unit;
[0125] The abnormal synchronization data priority judgment unit is used to judge the priority of the abnormal synchronization data in the data sub-model to be checked corresponding to the sub-model to be checked identifier. If the priority of the abnormal synchronization data is lower than the preset priority, the sub-model to be checked identifier of the data sub-model to be checked corresponding to the abnormal synchronization data is added to the candidate sub-model to be checked queue. The candidate sub-model to be checked queue is used to store the sub-model to be checked identifier of the data sub-model to be checked to which the abnormal synchronization data having a priority lower than the preset priority belongs;
[0126] The step of verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the sub-model identifier to be verified includes: if the priority of the abnormal synchronization data is higher than the preset priority, verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified corresponding to the sub-model identifier to be verified according to the sub-model identifier to be verified.
[0127] Optionally, the first service domain and the second service domain are respectively provided with a first database and a second database for storing data;
[0128] If data synchronization in the data synchronization subsystem is successful, the synchronization data between the first service domain and the second service domain are stored in the first database and the second database respectively;
[0129] If data synchronization fails in the data synchronization subsystem, the corrected data in the first service domain and the corrected data in the second service domain are stored in the first database and the second database respectively.
[0130] Optionally, the first service domain is a service domain where the ordering device is located, and the second service domain is a service domain where the ordering applet is located, and the ordering service of the same target restaurant can be provided to the user through the ordering device or the ordering applet;
[0131] The data model is a parameter set of dishes in the menu provided by the target restaurant, the service object is the dishes in the menu, the data sub-model is a parameter set of features associated with the dishes, and the data sub-model has a peak period verification urgency tag, and the peak period verification urgency tag is used to indicate the urgency of verifying the data synchronization result for the data sub-model if the sub-model identifier to be verified is obtained from the sub-model queue to be verified during the peak period of ordering at the target restaurant;
[0132] The device also includes: a time point determination unit within the peak ordering period;
[0133] The time point determination unit within the ordering peak period is used to determine whether the time point obtained from the to-be-checked sub-model queue to obtain the to-be-checked sub-model identifier is a time point within the ordering peak period of the target restaurant;
[0134] The checking, according to the to-be-checked sub-model identifier, a data synchronization result between the to-be-checked data sub-model and the second service domain, includes:
[0135] If it is determined that the time point at which the sub-model identifier to be checked is obtained from the sub-model queue to be checked is a time point within the peak ordering period of the target restaurant, then obtaining the peak period checking urgency label of the sub-model to be checked according to the sub-model identifier to be checked;
[0136] If the peak period verification urgency tag of the to-be-verified data sub-model is a preset high urgency tag, verifying the data synchronization result between the to-be-verified data sub-model and the first service domain and the second service domain;
[0137] The device further comprises: an adding unit;
[0138] The adding unit is used for adding the sub-model identifier to be checked to the non-peak period checking sub-model queue if it is determined that the peak period checking urgency label of the sub-model to be checked is a preset low urgency label.
[0139] Third embodiment
[0140] Corresponding to the above method embodiment of the present application, the third embodiment of the present application further provides an electronic device. Figure 6 As shown, Figure 6This is a schematic diagram of an electronic device provided in the third embodiment of the present application. The electronic device includes: at least one processor 601, at least one communication interface 602, at least one memory 603 and at least one communication bus 604; optionally, the communication interface 602 can be an interface of a communication module, such as an interface of a GSM module; the processor 601 may be a processor CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement an embodiment of the present invention. The memory 603 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Among them, the memory 603 stores a program, and the processor 601 calls the program stored in the memory 603 to execute the method provided in the above embodiment of the present application.
[0141] Fourth embodiment
[0142] Corresponding to the above method of the present application, the fourth embodiment of the present application further provides a computer storage medium. The computer storage medium stores a computer program, which is executed by a processor to execute the method provided in the above embodiment of the present application.
[0143] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0144] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0145] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0146] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0147] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0149] 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, stored data, displayed data, 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 relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A data correction system, characterized in that: include: Data synchronization subsystem, abnormal event capture terminal, data correction terminal; The data synchronization subsystem is used to synchronize data between the first service domain and the second service domain; The abnormal event capture end is used to capture the abnormal event information generated by the data synchronization subsystem, determine the data sub-model of suspected abnormal synchronization that needs to be checked according to the abnormal event information, use it as the data sub-model to be checked, obtain the sub-model identifier of the data sub-model to be checked, use it as the sub-model identifier to be checked, and add the sub-model identifier to the sub-model queue to be checked, wherein the data sub-model is a sub-model derived from the data model, or a subordinate sub-model derived from the upper-level data sub-model, the data model is a parameter set of the service object's own characteristics, and the data sub-model is a parameter set of the characteristics associated with the service object; The data correction end is used to obtain the identifier of the sub-model to be checked from the sub-model queue to be checked, and check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the sub-model identifier to be checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
2. The data correction system according to claim 1, characterized in that: The data synchronization subsystem is also used to send the abnormal event information to the information interaction channel between the data synchronization subsystem and the abnormal event capture terminal when an abnormal event occurs; The capturing of the abnormal event information generated by the data synchronization subsystem includes: capturing the abnormal event information from the information interaction channel.
3. The data correction system according to claim 1, characterized in that: An abnormal event interceptor is set in the data synchronization subsystem, and the abnormal event interceptor is used to intercept the abnormal event information generated by the data synchronization subsystem and send the abnormal event information to the abnormal event capture terminal; The capturing of the abnormal event information generated by the data synchronization subsystem includes: obtaining the abnormal event information provided by the abnormal event interceptor.
4. The data correction system according to claim 1, characterized in that: The data sub-model of suspected abnormal synchronization that needs to be checked is determined according to the abnormal event information, including: According to the abnormal event information, determining whether abnormal synchronization data with abnormal pointing can be obtained from the abnormal event information; If yes, then obtaining an abnormal data sub-model corresponding to the abnormal synchronization data according to the abnormal synchronization data, and determining the abnormal data sub-model as a suspected abnormal synchronization data sub-model to be checked; If not, then the suspected unsynchronized data within a preset time period before the time point when the abnormal event information is captured is obtained, and the data sub-model to which the suspected unsynchronized data belongs is determined as the suspected abnormally synchronized data sub-model that needs to be checked.
5. The data correction system according to claim 1, characterized in that: The data correction end is further used to determine the priority of the abnormal synchronization data in the data sub-model to be checked corresponding to the sub-model identifier to be checked, and if the priority of the abnormal synchronization data is lower than the preset priority, the sub-model identifier to be checked of the data sub-model to be checked corresponding to the abnormal synchronization data is added to the candidate sub-model to be checked queue, and the candidate sub-model to be checked queue is used to store the sub-model identifier to be checked of the data sub-model to which the abnormal synchronization data having a priority lower than the preset priority belongs; The step of verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified according to the sub-model identifier to be verified includes: if the priority of the abnormal synchronization data is higher than the preset priority, verifying the data synchronization result between the first service domain and the second service domain of the data sub-model to be verified corresponding to the sub-model identifier to be verified according to the sub-model identifier to be verified.
6. The data correction system according to claim 1, characterized in that: The first service domain and the second service domain are respectively provided with a first database and a second database for storing data; If data synchronization in the data synchronization subsystem is successful, the synchronization data between the first service domain and the second service domain are stored in the first database and the second database respectively; If data synchronization fails in the data synchronization subsystem, the corrected data in the first service domain and the corrected data in the second service domain are stored in the first database and the second database respectively.
7. A data correction method, characterized in that: include: Obtaining a sub-model identifier to be checked of a data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from a sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization subsystem, and the data synchronization subsystem is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a subordinate sub-model derived from an upper-level data sub-model, the data model is a parameter set of a service object's own characteristics, and the data sub-model is a parameter set of characteristics associated with the service object; According to the identifier of the sub-model to be checked, the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked is checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, the data of the data sub-model to be checked in the first service domain and the data in the second service domain are corrected to make the data of the data sub-model to be checked in the first service domain the same as the data in the second service domain.
8. A data correction device, characterized in that: include: A sub-model identifier obtaining unit to be checked is used to obtain a sub-model identifier to be checked of a data sub-model to be checked; wherein the sub-model identifier to be checked is obtained from a sub-model queue to be checked, and the data sub-model to be checked is a data sub-model of suspected abnormal synchronization that needs to be checked according to abnormal event information; the abnormal event information is information generated by a data synchronization sub-system, and the data synchronization sub-system is used to synchronize data between a first service domain and a second service domain; wherein the data sub-model is a sub-model derived from a data model, or a subordinate sub-model derived from an upper-level data sub-model, the data model is a parameter set of a service object's own characteristics, and the data sub-model is a parameter set of characteristics associated with the service object; A data synchronization result checking unit is used to check the data synchronization result between the first service domain and the second service domain of the data sub-model to be checked according to the identifier of the data sub-model to be checked; if the data of the data sub-model to be checked in the first service domain is different from the data in the second service domain, correct the data of the data sub-model to be checked in the first service domain and the data in the second service domain so that the data of the data sub-model to be checked in the first service domain is the same as the data in the second service domain.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; The memory stores a computer program, and after the processor runs the computer program, the method according to claim 7 is executed.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and after the computer program is run by the processor, the method according to claim 7 is executed.
