Data verification method, system, device and storage medium

Through the dual branch verification method, different processing logics are used to verify the cost calculation results in the network freight field, solving the problem that freight abnormalities in the existing technology cannot be discovered in time, and real-time accuracy check and abnormal alarm of data are realized.

CN114168174BActive Publication Date: 2025-07-01JIANGSU MANYUN SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111478872.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-07-01
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The cost calculation in the field of online freight in the prior art lacks a real-time verification mechanism, which leads to abnormal freight costs not being discovered in time, resulting in loss or failure.

Method used

The double branch verification method is adopted. The first branch handles the customer request and generates output data. The second branch uses different processing logic to verify the output data of the first branch to generate comparison results.

Benefits of technology

Real-time accuracy verification of data is realized, abnormalities can be discovered in a timely manner, damage or failures can be prevented, and the accuracy and reliability of data processing are guaranteed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168174B_ABST
    Figure CN114168174B_ABST
Patent Text Reader

Abstract

The present invention provides a data verification method, system, device and storage medium. The method includes: receiving a data acquisition request and acquiring input parameters in the data acquisition request; based on the input parameters, a first branch uses a first processing logic to obtain first output data; the first branch sends the input parameters and the first output data to a second branch; based on the input parameters, the second branch uses a preset second processing logic to obtain second output data; the second branch compares the first output data and the second output data to generate a comparison result. By setting the second branch and using different processing logics to verify the processing result of the first branch, the present invention realizes real-time accuracy verification of data.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the field of the Internet, data calculation and query are often required. For example, after a taxi trip ends, it is necessary to calculate and query the taxi fare for this order and display it to the driver and the passenger. The fee calculation in the field of network freight is not standardized. If there is only one calculation and query logic, anomalies (such as too low freight) cannot be detected in time, resulting in capital losses or failures. Therefore, another set of algorithmic logic is urgently needed to verify and alarm. Summary of the Invention

[0003] Aiming at the problems in the prior art, the purpose of the present invention is to provide a data verification method, system, device and storage medium. By setting a second branch, different processing logics are used to verify the processing results of the first branch, so as to realize real-time accuracy verification of data.

[0004] An embodiment of the present invention provides a data verification method, including the following steps:

[0005] Receive a data acquisition request and obtain the input parameters in the data acquisition request;

[0006] Based on the input parameters, the first branch uses a first processing logic to obtain first output data;

[0007] The first branch sends the input parameters and the first output data to the second branch;

[0008] Based on the input parameters, the second branch uses a preset second processing logic to obtain second output data;

[0009] The second branch compares the first output data and the second output data to generate a comparison result.

[0010] In some embodiments, the data acquisition request further includes the requested data type. The first branch uses a preset first processing logic corresponding to the data type to obtain first output data, and sends the data type together with the input parameters and the first output data to the second branch;

[0011] The second branch uses a preset second processing logic corresponding to the data type to obtain second output data.

[0012] In some embodiments, the first branch using a preset first processing logic corresponding to the data type to obtain first output data includes the following steps:

[0013] The first branch queries a rule attribute table to obtain the attribute values of each rule attribute corresponding to the data type;

[0014] The first branch constructs the calculation logic corresponding to the data type according to the attribute values of each rule attribute queried;

[0015] The first branch takes the input parameter as the variable parameter of the calculation rule, and obtains the calculation result of the calculation rule as the first output data.

[0016] In some embodiments, the second branch obtains the second output data by using a preset second processing logic corresponding to the data type, including the following steps:

[0017] The second branch obtains the processing script of the data type, and the calculation logic corresponding to the data type is predefined in the processing script;

[0018] The second branch generates a class file based on the processing script of the data type;

[0019] The second branch takes the input parameter as the variable parameter of the class file, and obtains the calculation result of the class file as the second output data.

[0020] In some embodiments, the method further includes the following steps:

[0021] Receiving a rule modification request from the first branch, and obtaining the attribute value of the modified rule attribute and the corresponding relationship between the modified rule attribute and the data type from the rule modification request;

[0022] Modifying the attribute value of the corresponding rule attribute in the rule attribute table according to the rule modification request.

[0023] In some embodiments, the corresponding relationship between each rule attribute in the rule attribute table and each component element in the processing script is stored in advance; after modifying the attribute value of the corresponding rule attribute in the rule attribute table according to the rule modification request, the following steps are further included: modifying the corresponding component element in the processing script of the data type in the second branch according to the attribute value of the modified rule attribute in the rule attribute table and the corresponding data type, and generating a new processing script.

[0024] In some embodiments, before the second branch obtains the processing script of the data type, the following steps are further included:

[0025] The second branch queries whether there is a class file of the processing script of the data type in the cache;

[0026] If so, the second branch directly obtains the class file of the processing script of the data type from the cache;

[0027] If the answer is no, the second branch obtains the processing script of the data type, generates a class file based on the processing script of the data type, and stores the class file in the cache.

[0028] In some embodiments, the second branch queries whether there is a class file of the processing script of the data type in the cache, including the following steps:

[0029] The second branch determines the latest version number of the processing script of the current data type;

[0030] The second branch queries whether there is a class file of the processing script of the latest version number of the data type in the cache.

[0031] In some embodiments, the processing script is a groovy script.

[0032] In some embodiments, the first branch sends the input parameter and the first output data to the second branch, including the following steps:

[0033] The first branch sends the input parameter and the first output data to the message queue;

[0034] The second branch obtains the input parameter and the first output data from the message queue.

[0035] In some embodiments, after the second branch compares the first output data and the second output data and generates a comparison result, the following steps are further included:

[0036] The second branch determines whether the first output data and the second output data are consistent;

[0037] If they are inconsistent, the second branch gives an alarm.

[0038] An embodiment of the present invention further provides a data verification system for implementing the data verification method, and the system includes:

[0039] A first branch subsystem, configured to receive a data acquisition request, obtain an input parameter in the data acquisition request, obtain a first output data based on the input parameter by using a first processing logic, and send the input parameter and the first output data to a second branch subsystem;

[0040] A second branch subsystem, configured to obtain a second output data based on the input parameter by using a preset second processing logic, compare the first output data and the second output data, and generate a comparison result.

[0041] An embodiment of the present invention further provides a data verification device, including:

[0042] A processor;

[0043] A memory storing executable instructions of the processor;

[0044] Wherein, the processor is configured to execute the steps of the data verification method by executing the executable instructions.

[0045] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, which when executed by a processor implements the steps of the data verification method.

[0046] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.

[0047] The data verification method, system, device and storage medium of the present invention have the following beneficial effects:

[0048] In the present invention, the first branch is used to process the client request, and the first output data is obtained by using the first processing logic. The first output data is used as the data returned to the client. The second branch is used to verify the first output data of the first branch. The second branch processes the same input parameters by using the second processing logic, and compares the obtained second output data with the first output data to obtain a comparison result. If the two are consistent, the data verification passes; if the two are inconsistent, the data verification fails, and an alarm can be given in time or other subsequent processing can be carried out to realize real-time data verification and be able to detect faults or points of asset loss in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] By reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings, other features, objects and advantages of the present invention will become more apparent.

[0050] Figure 1 is a flowchart of the data verification method according to an embodiment of the present invention;

[0051] Figure 2 is a specific implementation flowchart of the data verification method according to an embodiment of the present invention;

[0052] Figure 3 is a flowchart of the second branch obtaining the second output result according to an embodiment of the present invention;

[0053] Figure 4 is a flowchart of modifying the rules of the first branch according to an embodiment of the present invention;

[0054] Figure 5 is a schematic structural diagram of the data verification system according to an embodiment of the present invention;

[0055] Figure 6It is a schematic structural diagram of a data verification device according to an embodiment of the present invention;

[0056] Figure 7 It is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. Detailed implementation manners

[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0058] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0059] The flowcharts shown in the accompanying drawings are only exemplary illustrations and do not necessarily include all steps. For example, some steps can be decomposed, while some steps can be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.

[0060] As Figure 1 shown, an embodiment of the present invention provides a data verification method, including the following steps:

[0061] S100: Receive a data acquisition request and acquire the input parameters in the data acquisition request;

[0062] The requested data needs to be obtained through a set logical calculation based on the input parameters. For example, after the taxi trip ends, it is necessary to calculate and query the taxi fare for this trip order and display it to the driver and the passenger. In this case, the client or the front-end server needs to generate a data acquisition request. Among them, the variable data such as the trip mileage, which is required for calculating the taxi fare, is used as the input parameter. After logical calculation based on the distance of the trip, the taxi fare for the order can be obtained, that is, the taxi fare is the data requested to be acquired;

[0063] S200: Based on the input parameters, the first branch uses the first processing logic to obtain the first output data. Here, the first processing logic not only includes the logical calculation method for calculating the output data from the input data, but also includes the processing method for the input data, the construction method of the logical calculation method, etc.;

[0064] S300: The first branch sends the input parameters and the first output data to the second branch;

[0065] S400: Based on the input parameters, the second branch uses the preset second processing logic to obtain the second output data. Here, the second processing logic not only includes the logical calculation method for calculating the output data from the input data, but also includes the processing method for the input data, the construction method of the logical calculation method, etc.; This second processing logic is different from the first processing logic, that is, different processing logics are used to verify the first processing logic;

[0066] S500: The second branch compares the first output data and the second output data to generate a comparison result.

[0067] In the data verification method of the present invention, two branches are set: the first branch and the second branch. Among them, the first branch is used to process the customer request, and the first processing logic is used to obtain the first output data. The first output data is the data returned to the customer. The second branch is used to verify the first output data of the first branch. The second branch uses the second processing logic to process the same input parameters, and compares the obtained second output data with the first output data to obtain a comparison result. If the two are consistent, the data verification passes; if the two are inconsistent, the data verification fails, and an alarm can be issued in time or other subsequent processing can be performed to realize real-time data verification and be able to detect faults or points of asset loss in time. The first branch and the second branch of the present invention are decoupled, and the second branch will not affect the execution result of the first branch, nor will it affect the normal function realization of the first branch and the normal acquisition and return of data.

[0068] The first branch and the second branch can be applied to the same server and implemented by two different functional modules or subsystems respectively, or the first branch and the second branch can be set on different servers. For example, the first branch can be set on the server that interacts with the user, and the second branch can be set on the background server. When a user order settlement or commission demand occurs on the front-end client, the client generates a data acquisition request and sends the data acquisition request to the server where the first branch is located, or the front-end server generates a data acquisition request and sends the data acquisition request to the server or functional module where the first branch is located.

[0069] In this embodiment, the calculation logic included in the first processing logic is the same as the calculation logic included in the second processing logic. The difference between the two lies in the processing logic for input data and the construction method of the calculation logic. In this embodiment, the data acquisition request further includes the requested data type. For example, for a ride-hailing system, the requested data type can be divided into: trip fare, platform commission, cashback amount, discount amount, and so on. For each data type, there will be different processing logics, and the calculation logics in the processing logics of different data types are different. For example, the trip fare is set as: starting fare + (trip mileage - starting mileage) * unit price.

[0070] In step S200, the first branch uses a preset first processing logic corresponding to the data type to obtain first output data, and in step S300, the data type, the input parameters, and the first output data are sent to the second branch together. In step S400, the second branch uses a preset second processing logic corresponding to the data type to obtain second output data. In both the first branch and the second branch, processing logics corresponding to each data type are configured. Although the processing logics of the first branch and the second branch are different, in both the first processing logic and the second processing logic corresponding to the trip fare, the input parameter is the trip mileage, and the calculation logic is starting fare + (trip mileage - starting mileage) * unit price.

[0071] In this embodiment, after step S500: the second branch compares the first output data and the second output data and generates a comparison result, the following steps are further included:

[0072] The second branch determines whether the first output data and the second output data are consistent;

[0073] If they are inconsistent, the second branch issues an alarm, so that rapid verification and real-time alarm of the processing logic of the first branch can be achieved.

[0074] The following is combined with Figure 2Specifically introduce the process of the data verification method in a specific example. In this specific example, the first branch is used as the main path, and the second branch is used as the bypass. Their corresponding functions are realized by the main path subsystem and the bypass subsystem respectively. First, S1: The main path receives a user request, which is a data acquisition request, and its content includes the requested data type and input parameters. S2: The main path performs a trial calculation. The main path can perform calculations according to the input parameters using the above step S200 to obtain a trial calculation result. Then S3: The main path queries the trial calculation result, which is the first output data, and sends the first output data to the bypass. S4: The bypass receives the input parameters and the first output data. S5: The bypass calculates the result according to the input parameters, that is, performs calculations according to the input parameters using the above step S400 to obtain the second output data. Then S6: The bypass determines whether the calculation results of the main path and the bypass are consistent, that is, determines whether the first output data and the second output data are consistent. If they are inconsistent, then S7: An alarm is issued. If they are consistent, the current process ends.

[0075] In this embodiment, step S300: The first branch sends the input parameters and the first output data to the second branch, including: The first branch asynchronously sends the input parameters and the first output data to the message queue MQ; The second branch obtains the input parameters and the first output data from the message queue. By asynchronously transmitting the input parameters and the first output data between the first branch and the second branch, it is ensured that the second branch can accurately receive the data sent by the first branch. Further, as described above, when the first branch asynchronously sends the input parameters and the first output data through the message queue, the input parameters and the first output data can be sent to the second branch together with the requested data type.

[0076] In this embodiment, the first branch obtains the first output data by using a preset first processing logic corresponding to the data type, including the following steps:

[0077] The first branch queries the rule attribute table to obtain the attribute values of each rule attribute corresponding to the data type; For example, for the acquisition of travel expenses, its calculation logic is: starting fee + (travel mileage - starting mileage) * unit price. Its input parameter is travel mileage, and it includes multiple calculation items and multiple calculation operators. Its first calculation item is "starting fee", and the attribute value is the pricing of the starting fee. The attribute value of the first calculation operator is "+", the attribute value of the second calculation operator is "()", the second calculation item is "starting mileage", and the attribute value is the value of the starting mileage, such as 3km, 2.5km, etc. The third calculation operator is "-", the fourth calculation operator is "*", the third calculation item is "unit price", and the attribute value is the unit price of the freight per kilometer;

[0078] The first branch constructs the calculation logic corresponding to the data type according to the attribute values of each rule attribute queried; for example, combines the above-mentioned multiple calculation items, multiple operators, and input parameters into a calculation logic of starting fee + (travel mileage - starting mileage) * unit price;

[0079] The first branch takes the input parameter as the variable parameter of the calculation rule, obtains the calculation result of the calculation rule, and uses it as the first output data. For example, takes the actual travel mileage as the travel mileage in the calculation logic, and the calculated equation result is the first output data.

[0080] As Figure 3 shown, in this embodiment, the step S400: The second branch uses a preset second processing logic corresponding to the data type to obtain the second output data, including the following steps:

[0081] S410: The second branch obtains the processing script of the data type. The calculation logic corresponding to the data type is predefined in the processing script. In this embodiment, the processing script is a groovy script, and the corresponding code of the calculation logic has been pre-edited in this processing script;

[0082] S420: The second branch generates a java class file based on the processing script of the data type;

[0083] S430: The second branch takes the input parameter as the variable parameter of the class file, obtains the calculation result of the class file, and uses it as the second output data.

[0084] Therefore, in the second processing logic, the calculation logic corresponding to the same data type is the same as the calculation logic constructed based on the rule attributes and attribute values in the first processing logic. However, in the first processing logic, the storage of the calculation logic is through the storage of the rule attribute table. Then, when performing calculations, after querying the rule attribute table, the calculation logic is constructed. While the second processing logic directly defines the calculation logic in the processing script and directly uses the class file of the processing script to implement it during calculations.

[0085] As Figure 3 shown, in this embodiment, before the step S410: The second branch obtains the processing script of the data type, the following steps are further included:

[0086] S401: The second branch queries whether there is a class file of the processing script of the data type in the cache;

[0087] If so, continue with step S402: The second branch directly obtains the class file of the processing script of the data type from the cache, and then continue with step S430, that is, when the class file of the previously generated processing script already exists in the cache, there is no need to regenerate the class file, and directly call the previously generated class file from the cache;

[0088] If not, continue with step S410: The second branch obtains the processing script of the data type, and step S420: After the second branch generates a class file based on the processing script of the data type, continue with step S440: The second branch stores the class file in the cache.

[0089] Therefore, in this embodiment, by introducing a cache mechanism, it is avoided that each time a processing script is called, a class file needs to be generated, which is likely to trigger the garbage collection mechanism (GC), and it is also avoided that each time a processing script is called, generating a class file increases the processing time of the second branch.

[0090] Furthermore, for the processing script corresponding to the same data type, the version of the processing script may need to be upgraded as the processing logic is modified or updated. After the version of the processing script is upgraded, the class file of the latest version of the processing script needs to be used for processing. In this embodiment, the step S401: The second branch queries whether there is a class file of the processing script of the data type in the cache, includes the following steps:

[0091] The second branch determines the latest version number of the current processing script of the data type;

[0092] The second branch queries whether there is a class file of the processing script of the latest version number of the data type in the cache.

[0093] If there is a class file of the processing script of the latest version number of the data type in the cache, step S402 can be continued to directly obtain the class file from the cache. If there is a class file of the processing script of the data type in the cache, but its version is an old version, steps S410 and S420 still need to be continued to regenerate the class file and store it in the cache, and the old version of the class file can be deleted.

[0094] As Figure 4 shown, in this embodiment, the data verification method further includes a process of modifying the rules of the first branch. Specifically, modifying the rules of the first branch includes the following steps:

[0095] S610: Receive a rule modification request for the first branch, and obtain the attribute value of the rule attribute to be modified and the corresponding relationship between the modified rule attribute and the data type from the rule modification request; for example, for the calculation logic of the trip cost, modify the starting fee amount, or modify the unit price amount per kilometer, etc., and for the calculation logic of the platform commission, modify the commission ratio value;

[0096] S620: Modify the attribute value of the corresponding rule attribute in the rule attribute table according to the rule modification request; after modifying the attribute value, when using the corresponding first processing logic in the first branch to process the input parameter, that is, use the modified attribute value to construct the calculation logic and obtain the output data.

[0097] In this embodiment, since a script is pre-edited in the second branch, the processing script includes multiple components. For example, for the calculation logic of "starting fee + (trip mileage - starting mileage) * unit price", the components included in the partial code of the processing script regarding this calculation logic are: starting fee, +, (), -, starting mileage, etc., and there is a corresponding relationship between the components of this part and the rule attributes in the first processing logic. Therefore, after the first processing logic in the first branch is modified, the corresponding second processing logic can be modified in real time and dynamically.

[0098] Specifically, in this embodiment, the corresponding relationship between each rule attribute in the rule attribute table and each component in the processing script is pre-stored. After the step S620: Modify the attribute value of the corresponding rule attribute in the rule attribute table according to the rule modification request, the following steps are further included:

[0099] S630: Modify the corresponding component in the processing script of the data type in the second branch according to the attribute value of the rule attribute to be modified in the rule attribute table and the corresponding data type, and generate a new processing script. For example, for the calculation logic of the trip cost, after modifying the starting fee amount in the rule attribute table of the first branch, the value at the code position corresponding to the starting fee in the processing script of the second processing logic can be modified accordingly, realizing the automatic modification of the second processing logic in the second branch without manual intervention. For the staff, only need to modify the first processing logic in the first branch, and the second processing logic in the second branch can be automatically modified without manual modification twice.

[0100] Such as Figure 5As shown in the figure, an embodiment of the present invention further provides a data verification system for implementing the above data verification method. The system includes a first branch subsystem M100 and a second branch subsystem M200. The first branch subsystem M100 is configured to receive a data acquisition request, obtain the input parameters in the data acquisition request, based on the input parameters, obtain first output data using a first processing logic, and send the input parameters and the first output data to the second branch subsystem M200. The second branch subsystem M200 is configured to obtain second output data using a preset second processing logic based on the input parameters, compare the first output data and the second output data, and generate a comparison result.

[0101] In the data verification system of the present invention, the first branch subsystem M100 is configured to execute the functions of the first branch in the above data verification method, and the second branch subsystem M200 is configured to execute the functions of the second branch in the above data verification method. The first branch subsystem M100 is configured to process a client request, obtain first output data using a first processing logic, and the first output data is used as the data returned to the client. The second branch subsystem M200 is configured to verify the first output data of the first branch. The second branch subsystem M200 processes the same input parameters using a second processing logic, and compares the obtained second output data with the first output data to obtain a comparison result. If the two are consistent, the data verification passes; if the two are inconsistent, the data verification fails, and an alarm or other subsequent processing can be performed in a timely manner to achieve real-time data verification and be able to detect faults or points of asset loss in a timely manner. The first branch subsystem M100 and the second branch subsystem M200 can be set in the same server or in different servers to respectively implement the functions of processing client requests and data verification.

[0102] In this embodiment, the implementation of each function of the first branch subsystem M100 and the second branch subsystem M200 can be implemented by the specific implementation manners of the corresponding steps of the above data verification method, which will not be elaborated here.

[0103] An embodiment of the present invention further provides a data verification device, including a processor; a memory storing executable instructions of the processor; wherein, the processor is configured to execute the steps of the above data verification method by executing the executable instructions.

[0104] Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, a method, or a program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module", or "platform" here.

[0105] Reference will now be made to Figure 6 to describe the electronic device 600 according to such an embodiment of the present invention. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.

[0106] As Figure 6 shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0107] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the above data verification method part of this specification. For example, the processing unit 610 can execute the steps as Figure 1 shown in.

[0108] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.

[0109] The storage unit 620 may further include a program / utilities 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. The implementation of a network environment may be included in each or some combination of these examples.

[0110] The bus 630 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any bus structure in a variety of bus structures.

[0111] The electronic device 600 can also communicate with one or more external devices 700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 650. Moreover, the electronic device 600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 through the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0112] In the data verification device, when the program in the memory is executed by the processor, the steps of the data verification method are implemented. Therefore, the device can also obtain the technical effects of the above data verification method.

[0113] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, and when the program is executed by the processor, the steps of the data verification method are implemented. In some possible implementation manners, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above data verification method part of this specification.

[0114] Referring Figure 7 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described. It can be a portable compact disc read-only memory (CD-ROM) and includes program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.

[0115] The program product may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] The computer-readable storage medium may include a data signal propagated in or as part of a carrier wave in a baseband, which carries the readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable storage medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0117] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0118] When the program in the computer storage medium is executed by a processor, the steps of the data verification method are implemented. Therefore, the computer storage medium can also achieve the technical effects of the above data verification method.

[0119] The above content is a further detailed description of the present invention in combination with specific preferred embodiments. It cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.

Claims

1. A data verification method, characterized in that, Including the following steps: Receiving a data acquisition request, obtaining the input parameters in the data acquisition request, and the data acquisition request further includes the requested data type; Based on the input parameters, the first branch uses the first processing logic to obtain the first output data, including: the first branch queries the rule attribute table to obtain the attribute values of each rule attribute corresponding to the data type; the first branch constructs the calculation logic corresponding to the data type according to the obtained attribute values of each rule attribute; the first branch uses the input parameters as the variable parameters of the calculation rule, and obtains the calculation result of the calculation rule as the first output data; The first branch sends the input parameters and the first output data to the second branch; Based on the input parameters, the second branch uses the preset second processing logic to obtain the second output data, including: the second branch generates a class file based on the processing script of the data type; the second branch uses the input parameters as the variable parameters of the class file, and obtains the calculation result of the class file as the second output data; The second branch compares the first output data and the second output data to generate a comparison result; Among them, the corresponding relationship between each rule attribute in the rule attribute table and each component in the processing script is stored in advance; the method further includes the following steps: Receiving a rule modification request from the first branch, and obtaining the attribute value of the modified rule attribute and the corresponding relationship between the modified rule attribute and the data type from the rule modification request; Modifying the attribute value of the corresponding rule attribute in the rule attribute table according to the rule modification request; according to the attribute value of the modified rule attribute in the rule attribute table and the corresponding data type, modifying the corresponding component in the processing script of the data type in the second branch to generate a new processing script.

2. The data verification method according to claim 1, wherein Before the second branch obtains the processing script of the data type, the following steps are further included: The second branch queries whether there is a class file of the processing script of the data type in the cache; If so, the second branch directly obtains the class file of the processing script of the data type from the cache; If not, the second branch obtains the processing script of the data type, generates a class file based on the processing script of the data type, and stores the class file in the cache.

3. The data verification method according to claim 2, wherein The second branch queries whether there is a class file of the processing script of the data type in the cache, including the following steps: The second branch determines the latest version number of the current processing script of the data type; The second branch queries whether there is a class file of the processing script of the latest version number of the data type in the cache.

4. The data verification method according to claim 1, wherein The processing script is a groovy script.

5. The data verification method according to claim 1, wherein The first branch sends the input parameters and the first output data to the second branch, including the following steps: The first branch sends the input parameters and the first output data to the message queue; The second branch obtains the input parameters and the first output data from the message queue.

6. The data verification method according to claim 1, wherein After the second branch compares the first output data and the second output data and generates a comparison result, the following steps are further included: The second branch determines whether the first output data and the second output data are consistent; If they are inconsistent, the second branch gives an alarm.

7. A data verification system, characterized in that, For implementing the data verification method according to any one of claims 1 to 6, the system includes: A first branch subsystem, configured to receive a data acquisition request, acquire the input parameters in the data acquisition request, obtain first output data based on the input parameters by using a first processing logic, and send the input parameters and the first output data to a second branch subsystem; A second branch subsystem, configured to obtain second output data based on the input parameters by using a preset second processing logic, compare the first output data and the second output data, and generate a comparison result.

8. A data verification device, characterized in that, Including: A processor; A memory, in which executable instructions of the processor are stored; Wherein, the processor is configured to execute the steps of the data verification method according to any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, the steps of the data verification method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Business data verification method and device, electronic equipment and storage medium

    CN112540996A