A method and device for data verification

After receiving the user's business request on the business platform, the refactored program code is verified in real time by using the comparison between the current and original business codes, which solves the verification delay problem in the existing technology and improves verification efficiency and accuracy.

CN111796864BActive Publication Date: 2024-12-24BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010491055.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-02
Publication Date
2024-12-24
Estimated Expiration
2040-06-02

AI Technical Summary

Technical Problem

In the prior art, developers have delays when verifying the refactored program code, and cannot verify in time whether the refactored program code is correct.

Method used

After receiving the user's business request on the business platform, the business is executed according to the current business code and the business results to be verified, and the original business code is queried to obtain standard business results. The two are compared in real time to perform data verification to determine whether the current business code is normal.

Benefits of technology

It realizes timely verification of the refactored business code, improves verification efficiency, and ensures the consistency and accuracy of business functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111796864B_ABST
    Figure CN111796864B_ABST
Patent Text Reader

Abstract

This specification discloses a method and device for data verification. After receiving a business request sent by a user, the business platform can execute the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online, and use the obtained business result as the business result to be verified. Then, the original business code of the business corresponding to the business request can be queried, and the business corresponding to the business request can be executed through the original business code to obtain a standard business result. Then, according to the obtained standard business result and the business result to be verified, the current business code deployed online is verified in real time. Therefore, compared with the prior art, this method can verify the reconstructed business code in a timely manner, thereby improving the verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly to a method and device for data verification. Background Art

[0002] In the field of computer technology, if developers need to optimize the program code of a business, they can refactor the program code by simplifying the program code, etc. In order to ensure that the refactored program code remains unchanged in terms of business functions (i.e., for the same business request, the result obtained by executing the business request with the refactored program code should be consistent with the result obtained by executing the business request with the program code before refactoring), developers usually need to verify the refactored program code.

[0003] In the prior art, if developers need to verify whether the reconstructed program code is correct, they can save the business requests received online and the business results obtained by executing the business requests according to the program code before reconstruction. Later, in the offline test system, the saved business requests can be replayed according to the reconstructed program code, and the obtained business results can be compared with the saved business results to verify whether the reconstructed program code is normal in terms of business functions.

[0004] It can be seen that in the prior art, there is a certain delay in developers verifying the reconstructed program code. Therefore, how to verify the reconstructed program code in a timely manner is an issue that needs to be solved urgently. Summary of the invention

[0005] This specification provides a data verification method and device to partially solve the above-mentioned problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This specification provides a data verification method, including:

[0008] The business platform receives the business request sent by the user;

[0009] According to the current business code of the business corresponding to the business request deployed online, execute the business corresponding to the business request, and use the obtained business result as the business result to be verified;

[0010] Querying the original business code of the business corresponding to the business request, and executing the business corresponding to the business request through the original business code to obtain a standard business result, wherein the current business code is obtained after reconstruction based on the original business code;

[0011] According to the standard business result and the business result to be verified, real-time data verification is performed on the current business code.

[0012] Optionally, before executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed online and using the obtained service result as the service result to be verified, the method further includes:

[0013] If it is determined that the business corresponding to the business request is a business with reconstructed business code, the business data carried in the business request is obtained through a preset aspect-oriented programming AOP interception method;

[0014] The service corresponding to the service request is executed by the original service code to obtain a standard service result, which specifically includes:

[0015] The service data is processed by the original service code to execute the service corresponding to the service request.

[0016] Optionally, determining that the service corresponding to the service request is a service with reconstructed service code specifically includes:

[0017] Determine the service interface of the service corresponding to the service request;

[0018] If it is determined that the business interface is marked with a setting annotation, it is determined that the business corresponding to the business request is a business with reconstructed business code.

[0019] Optionally, the method further comprises:

[0020] If it is determined that the service data carries a set identifier, after obtaining the standard service result, the service data is no longer processed using the original service code.

[0021] Optionally, performing real-time data verification on the current business code according to the standard business result and the business result to be verified specifically includes:

[0022] Compare the standard business result and the business result to be verified to obtain a comparison result;

[0023] If, according to the comparison result, it is determined that the standard business result is consistent with the business result to be verified, it is determined that the current business code is normal; otherwise, it is determined that there is an abnormality in the current business code.

[0024] Optionally, the method further comprises:

[0025] If it is determined that the current service code is abnormal, a prompt message for correcting the current service code is sent.

[0026] Optionally, the service platform includes a first processing unit and a second processing unit;

[0027] Receive business requests sent by users, including:

[0028] Receiving, by the first processing unit, a service request sent by a user;

[0029] According to the current business code of the business corresponding to the business request deployed online, the business corresponding to the business request is executed, and the obtained business result is used as the business result to be verified, specifically including:

[0030] Execute the service corresponding to the service request by using the current service code stored in the first processing unit, and use the obtained service result as the service result to be verified;

[0031] The service corresponding to the service request is executed by the original service code to obtain a standard service result, which specifically includes:

[0032] Execute the service corresponding to the service request by using the original service code stored in the second processing unit, and use the obtained service result as the standard service result;

[0033] According to the standard business result and the business result to be verified, real-time data verification is performed on the current business code, specifically including:

[0034] According to the standard service result and the service result to be verified, real-time data verification is performed on the current service code in the first processing unit.

[0035] Optionally, before executing the service corresponding to the service request by using the original service code stored in the second processing unit and using the obtained service result as the standard service result, the method further includes:

[0036] Obtaining the business data carried in the business request through the aspect-oriented programming (AOP) interception method preset in the first processing unit;

[0037] sending the service data to the second processing unit through the first processing unit;

[0038] Executing the service corresponding to the service request by using the original service code stored in the second processing unit, and using the obtained service result as the standard service result, specifically includes:

[0039] The service data is processed by the original service code stored in the second processing unit to execute the service corresponding to the service request.

[0040] This specification provides a data verification device, including:

[0041] Receiving module, used for the business platform to receive business requests sent by users;

[0042] A determination module, configured to execute the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online, and use the obtained business result as the business result to be verified;

[0043] A query module, used to query the original business code of the business corresponding to the business request, and execute the business corresponding to the business request through the original business code to obtain a standard business result, wherein the current business code is obtained after reconstruction based on the original business code;

[0044] The verification module is used to perform real-time data verification on the current business code according to the standard business result and the business result to be verified.

[0045] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned data verification method is implemented.

[0046] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data verification method when executing the program.

[0047] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0048] In the data verification method provided in the present specification, after the business platform receives a business request sent by a user, it can execute the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online, and use the obtained business result as the business result to be verified. Then, the original business code of the business corresponding to the business request can be queried, and the business corresponding to the business request can be executed through the original business code to obtain a standard business result. Then, based on the obtained standard business result and the business result to be verified, the current business code deployed online can be subjected to real-time data verification.

[0049] It can be seen from the above method that after receiving the business request sent by the user, this method can immediately determine the business result obtained by the current business code deployed online executing the business of the business request, and the business result obtained by the original business code executing the business of the business request, and then perform real-time data verification on the current business code through the two obtained business results. Compared with the prior art method in which developers need to collect business requests first and then replay them before verifying the reconstructed business code, this method can verify the reconstructed business code in a timely manner, thereby effectively improving the verification efficiency of the reconstructed business code. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0051] Figure 1 A flowchart of a data verification method in this specification;

[0052] Figure 2 A schematic diagram of implementing data verification by a first processing unit and a second processing unit provided in this specification;

[0053] Figure 3 A schematic diagram of a data verification device provided in this specification;

[0054] Figure 4 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0056] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0057] Figure 1 The following is a flow chart of a data verification method in this specification, which specifically includes the following steps:

[0058] S101: The service platform receives a service request sent by a user.

[0059] The user can send a service request to the service platform through the terminal he holds or the client installed in the terminal to execute the service on the service platform. Correspondingly, after receiving the service request, the service platform can execute the service corresponding to the service request. The terminal mentioned here may refer to electronic devices such as smart phones, tablet computers, desktop computers, laptops, etc. held by the user. It should be pointed out that since the data verification method provided in this specification is intended to improve the timeliness of data verification of the reconstructed service code, the service platform can immediately implement data verification on the reconstructed service code according to the service request after receiving the service request sent by the user.

[0060] S102: Execute the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online, and use the obtained business result as the business result to be verified.

[0061] In actual applications, in order to ensure that the business code corresponding to a business can better support the smooth execution of the business, developers need to refactor the business code of the business according to the actual optimization needs, so as to achieve internal performance improvement without changing the business functions supported by the business code. Therefore, compared with the business code before refactoring, the refactored business code has better performance during execution, which can effectively improve the execution efficiency of the business and bring a good business experience to users.

[0062] From the above content, we can see that the significance of the reconstructed business code is to achieve further optimization of the performance of the internal business code without changing the business functions of the business itself. Therefore, it is necessary to implement data verification on the reconstructed business code on its corresponding business functions to ensure that the business functions supported by the reconstructed business code are consistent with the business functions supported by the business code before reconstruction.

[0063] Based on this, after the business platform receives the business request sent by the user, it can determine the business corresponding to the business request, and execute the business corresponding to the business request through the current business code deployed online for executing the business. Among them, the current business code mentioned here is reconstructed on the basis of the original business code corresponding to the business. In other words, the original business code mentioned here can be understood as the business code before reconstruction, and the current business code can be understood as the code obtained after optimization on the basis of the original business code. For the same business, the business functions supported by the original business code corresponding to the business and the business functions supported by the reconstructed business code corresponding to the business should be the same. In other words, the business results obtained after executing the same business request according to the original business code and the reconstructed business code of the business corresponding to the business request should also be the same. And it can be seen from here that the data verification method provided in this specification is used to perform data verification on the reconstructed business code (i.e., the current business code) that has been deployed online, so as to ensure to a certain extent that the current business code deployed online will not be abnormal in business functions. Since the data verification method provided in this specification is intended to perform data verification on the current business code that has been deployed online, the business result obtained by executing the business corresponding to the business request through the current business code can be called the business result to be verified.

[0064] In this specification, the original business code and the current business code can be stored in the same processing unit. Of course, the original business code and the current business code can also be stored in different processing units, and the different processing units can be located in the same hardware device, or in different hardware devices (such as storing different processing units in different servers). In addition, different processing units can also be located in the same software environment in the same hardware device, or in different software environments in the hardware device. Among them, the processing unit storing the current business code can be referred to as the first processing unit, and the processing unit storing the original business code can be referred to as the second processing unit. In other words, the business platform can receive and process the business request sent by the user through the first processing unit, and realize real-time data verification of the current business code while executing the business corresponding to the business request.

[0065] S103: Query the original service code of the service corresponding to the service request, and execute the service corresponding to the service request through the original service code to obtain a standard service result, wherein the current service code is obtained after reconstruction based on the original service code.

[0066] The business platform can query the original business code of the business corresponding to the business request according to the business corresponding to the business request, and execute the business corresponding to the business request through the original business code, and then use the obtained business result as the standard business result. It should be noted that since the current business code has been deployed online, the business result to be verified obtained by executing the business corresponding to the business request through the current business code can not only be used for data verification of the current business code, but also be returned to the user for display to the user.

[0067] In actual applications, the business platform can provide users with multiple services for execution, but among these services, the business codes of all services are often not refactored. Therefore, after receiving the business request sent by the user, the business platform needs to first determine whether the business corresponding to the business request is a business with refactored business code.

[0068] If the business is a business with reconstructed business code, the business platform can execute the business corresponding to the above business request through the original business code and the current business code respectively to determine the standard business result and the business result to be verified. There are many ways for the business platform to determine the standard business result and the business result to be verified. For example, the business platform can obtain the business data carried in the business request through the interception method of aspect-oriented programming (AOP), and then process the business data through the original business code, execute the business corresponding to the business request and use the obtained business result as the standard business result.

[0069] For another example, the business platform can execute the business corresponding to the business request through the current business code to obtain the business result to be verified, and at the same time copy the business request, and then execute the copied business request according to the original business code to obtain the above-mentioned standard business result.

[0070] In this specification, there are multiple ways to determine whether the business corresponding to the business request is a business with a reconstructed business code. For example, the business platform can predetermine which businesses are businesses with reconstructed business codes, and save the business identifiers corresponding to the businesses with reconstructed business codes in a preset data table. When the business platform receives a business request, it can query whether the business identifier of the business corresponding to the business request is located in the data table. If so, it is determined that the business corresponding to the business request is a business with a reconstructed business code. Otherwise, it is determined that the business corresponding to the business request is not a business with a reconstructed business code.

[0071] For another example, the business platform may pre-annotate the business interface corresponding to each business whose business code has been reconstructed with a setting annotation, and the setting annotation is used to mark the business interface as the business interface corresponding to the business whose business code has been reconstructed. When the business platform receives a business request, it can determine whether the business interface of the business corresponding to the business request is annotated with a setting annotation. If it is determined that the business is annotated with a setting annotation, it is determined that the business corresponding to the business request is a business whose business code has been reconstructed. Otherwise, it is determined that the business corresponding to the business request is not a business whose business code has been reconstructed. For example, if the business platform receives a business request and determines that the business interface of the business corresponding to the business request is annotated with the annotation @Compare (@Compare is the setting annotation set by the developer), it can be determined that the business interface of the business corresponding to the business request is annotated with a setting annotation, and then it is determined that the business corresponding to the business request is a business whose business code has been reconstructed.

[0072] It should be noted that if the current business code and the original business code are located in the first processing unit and the second processing unit respectively, the business platform can obtain the business result to be verified through the first processing unit and obtain the standard business result through the second processing unit, and then perform data verification through the first processing unit. Figure 2 shown.

[0073] Figure 2 A schematic diagram of implementing data verification by a first processing unit and a second processing unit provided in this specification.

[0074] As shown in the figure, the business platform can receive the business request sent by the user through the first processing unit, and execute the business corresponding to the business request through the current business code saved in the first processing unit to obtain the business result to be verified. At the same time, the business platform can execute the business corresponding to the business request through the original business code saved in the second processing unit to obtain the standard business result. In the first processing unit, the business platform can perform real-time data verification on the current business code deployed online according to the determined standard business result and the business result to be verified.

[0075] Among them, before the business platform executes the business corresponding to the business request through the second processing unit to obtain the business result, it can first obtain the business data carried in the business request through the first processing unit, and send the business data to the second processing unit through the first processing unit. Then, the business data is processed by the original business code stored in the second processing unit, and then the standard business result obtained after the second processing unit processes the business data is returned to the first processing unit, and the current business code is verified in real time through the first processing unit. Among them, the business data mentioned here includes parameter values, parameter types, method names, calling classes, calling class types and other data. In addition, the business platform can serialize the business data into binary data, and send the binary data to the second processing unit through the first processing unit. The second processing unit receives the binary data and then deserializes it to obtain the original business data.

[0076] It should be noted that in actual applications, various data flows are configured in the configuration center of the business platform, and the data flow can indicate the transmission direction of the business data. For example, if a configured data flow is a transmission flow from the first processing unit to the second processing unit, then after the business platform obtains the business data in the business request, the business data will be transmitted from the first processing unit to the second processing unit.

[0077] For the above example, when the business platform executes the business corresponding to the business request through the second processing unit, the staff may misconfigure the data flow from the second processing unit to the first processing unit, and the business interface of the business corresponding to the original business code stored in the second processing unit is also marked with a setting annotation. In this case, after the business platform processes the business data through the second processing unit, it will also transmit the business data from the second processing unit back to the first processing unit, which will cause the first processing unit to execute the business corresponding to the business request again according to the current business code that has been deployed online. When the first processing unit executes the business, because the business interface corresponding to the business in the current business code is marked with a setting annotation, the original business code in the second processing unit is called to execute the business, which causes the business platform to execute the business corresponding to the business request in an infinite loop.

[0078] In order to avoid the above situation, after the business platform obtains the business data carried in the business request, it can mark the business data with a set identifier. If the business platform determines that the business data is marked with a set identifier, after the standard business result is obtained by executing the business corresponding to the business request through the original business code, the business data will no longer be processed again through the original business code. In the case where the current business code is located in the first processing unit and the original business code is located in the second processing unit, after the business data is transmitted from the first processing unit to the second processing unit, it will no longer be transmitted back from the second processing unit to the first processing unit for execution, thereby effectively solving the above problem. The set identifier mentioned here can indicate that the business data is only used to obtain the standard business result through the original business code to perform data verification on the current business code that has been deployed online.

[0079] S104: Perform real-time data verification on the current business code according to the standard business result and the business result to be verified.

[0080] After the business platform determines the above-mentioned standard business result and the business result to be verified, it can perform data verification on the current business code of the business corresponding to the above-mentioned business request according to the standard business result and the business result to be verified.

[0081] There are multiple ways for the business platform to perform data verification based on the standard business result and the business result to be verified. For example, the business platform can compare the standard business result and the business result to be verified and obtain a comparison result. If the standard business result is determined to be consistent with the business result to be verified based on the comparison result, the current business code is determined to be normal, otherwise, the current business code is determined to be abnormal.

[0082] For another example, the business platform can determine the time to obtain the business result to be verified through the current business code as the first time, and the time to obtain the standard business result through the original business code as the second time based on the standard business result and the business result to be verified. If it is determined that the duration of the first time is less than the duration of the second time, it can be determined that the execution performance of the current business code is good; otherwise, it is determined that the execution performance of the current business code needs to be improved.

[0083] If the current business code and the original business code are respectively located in the above-mentioned first processing unit and the second processing unit, the second processing unit will send the standard business result to the first processing unit after executing the original business code to obtain the standard business result, so that the first processing unit can perform data verification on the current business code that has been deployed online based on the standard business result and the business result to be verified obtained by executing the business corresponding to the above-mentioned business request according to the current business code.

[0084] From the above, it can be seen that after receiving the business request, the first processing unit can execute the business request according to the current business code, and return the obtained business result to be verified to the user. At the same time, based on the business result to be verified and the standard business result returned by the second processing unit, it is effectively realized that after receiving the business request, the reconstructed business code is immediately subjected to real-time data verification based on the business request.

[0085] When the business platform determines that there is an abnormality in the current business code, it can send a prompt message for correcting the current business code to the staff in the business platform, so that the staff in the business platform will be aware of the abnormality in the current business code and correct the current business code.

[0086] It can be seen from the above method that after receiving the business request sent by the user, this method can immediately determine the business result obtained by the current business code deployed online executing the business of the business request, and the business result obtained by the original business code executing the business of the business request, and then compare whether the two business results are consistent, and perform real-time data verification on the current business code. Compared with the prior art method in which developers need to collect business requests first and then replay them before verifying the reconstructed business code, this method can verify the reconstructed business code in a timely manner, thereby effectively improving the verification efficiency of the reconstructed business code.

[0087] The above is a data verification method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding data verification device, such as Figure 3 shown.

[0088] Figure 3 A schematic diagram of a data verification device provided in this specification specifically includes:

[0089] Receiving module 301, used for the service platform to receive the service request sent by the user;

[0090] The determination module 302 is used to execute the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online, and use the obtained business result as the business result to be verified;

[0091] A query module 303 is used to query the original business code of the business corresponding to the business request, and execute the business corresponding to the business request through the original business code to obtain a standard business result, wherein the current business code is obtained after reconstruction based on the original business code;

[0092] The verification module 304 is used to perform real-time data verification on the current business code according to the standard business result and the business result to be verified.

[0093] Optionally, before the determination module 302 executes the business corresponding to the business request according to the current business code of the business corresponding to the business request deployed online and uses the obtained business result as the business result to be verified, the determination module 302 is further used to, if it is determined that the business corresponding to the business request is a business with reconstructed business code, obtain the business data carried in the business request through a preset aspect-oriented programming AOP interception method;

[0094] The query module 303 is specifically used to process the service data through the original service code to execute the service corresponding to the service request.

[0095] Optionally, the query module 303 is specifically used to determine a business interface of a business corresponding to the business request; if it is determined that the business interface is marked with a setting annotation, it is determined that the business corresponding to the business request is a business with reconstructed business code.

[0096] Optionally, the query module 303 is further configured to, if it is determined that the service data carries a set identifier, no longer process the service data using the original service code after obtaining the standard service result.

[0097] Optionally, the verification module 304 is specifically used to compare the standard business results and the business results to be verified to obtain a comparison result; if, based on the comparison result, it is determined that the standard business results are consistent with the business results to be verified, the current business code is determined to be normal; otherwise, it is determined that there is an abnormality in the current business code.

[0098] Optionally, the verification module 304 is further used to send a prompt message for correcting the current business code if it is determined that the current business code is abnormal.

[0099] Optionally, the service platform includes a first processing unit and a second processing unit;

[0100] The receiving module 301 is specifically configured to receive, through the first processing unit, a service request sent by a user;

[0101] The determination module 302 is specifically configured to execute the service corresponding to the service request through the current service code stored in the first processing unit, and use the obtained service result as the service result to be verified;

[0102] The query module 303 is specifically used to execute the service corresponding to the service request through the original service code stored in the second processing unit, and use the obtained service result as the standard service result;

[0103] The verification module 304 is specifically configured to perform real-time data verification on the current business code in the first processing unit according to the standard business result and the business result to be verified.

[0104] Optionally, before the query module 303 executes the business corresponding to the business request through the original business code stored in the second processing unit and uses the obtained business result as the standard business result, the determination module 302 is further used to obtain the business data carried in the business request through the aspect-oriented programming AOP interception method preset in the first processing unit; and send the business data to the second processing unit through the first processing unit;

[0105] The query module 303 is specifically configured to process the service data through the original service code stored in the second processing unit to execute the service corresponding to the service request.

[0106] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provides data validation methods.

[0107] This manual also provides Figure 4 The schematic structure diagram of the electronic device shown in FIG. Figure 4 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0108] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0109] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0110] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0111] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0112] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may 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.

[0113] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0114] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0116] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0117] 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.

[0118] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0119] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0120] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may 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.

[0121] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.

[0122] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0123] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for data verification, characterized in that: include: The business platform receives the business request sent by the user; Determining that the service corresponding to the service request is a service with reconstructed service code; According to the current business code of the business corresponding to the business request deployed online, execute the business corresponding to the business request, and use the obtained business result as the business result to be verified; Querying the original business code of the business corresponding to the business request, and executing the business corresponding to the business request through the original business code to obtain a standard business result, wherein the current business code is obtained after reconstruction based on the original business code; If it is determined that the service data carried by the service request carries a set identifier, after obtaining the standard service result, the service data is no longer processed by the original service code; Performing real-time data verification on the current business code according to the standard business result and the business result to be verified; The determining that the service corresponding to the service request is a service with a reconstructed service code includes: In the case where the business platform pre-annotates the business interface corresponding to each business whose business code has been reconstructed, When the service platform receives the service request, it determines whether the service interface of the service corresponding to the service request is marked with a setting annotation. If it is determined that the service interface has a setting annotation, it is determined that the service corresponding to the service request is a service with a reconstructed service code. Otherwise, it is determined that the service corresponding to the service request is not a service with a reconstructed service code. Wherein, if it is determined that the service data carried by the service request carries a set identifier, after obtaining the standard service result, the service data is no longer processed by the original service code, including: After the business platform obtains the business data carried in the business request, it marks the business data with a set identifier. If the business platform determines that the business data is marked with a set identifier, after executing the business corresponding to the business request through the original business code to obtain a standard business result, the business data will no longer be processed again through the original business code.

2. The method according to claim 1, characterized in that According to the current business code of the business corresponding to the business request deployed online, executing the business corresponding to the business request, and using the obtained business result as the business result to be verified, the method further includes: If it is determined that the business corresponding to the business request is a business with reconstructed business code, the business data carried in the business request is obtained through a preset aspect-oriented programming AOP interception method; The service corresponding to the service request is executed by the original service code to obtain a standard service result, which specifically includes: The service data is processed by the original service code to execute the service corresponding to the service request.

3. The method according to claim 1, characterized in that According to the standard business result and the business result to be verified, real-time data verification is performed on the current business code, specifically including: Compare the standard business result and the business result to be verified to obtain a comparison result; If, according to the comparison result, it is determined that the standard business result is consistent with the business result to be verified, it is determined that the current business code is normal; otherwise, it is determined that there is an abnormality in the current business code.

4. The method according to claim 3, characterized in that The method further comprises: If it is determined that the current service code is abnormal, a prompt message for correcting the current service code is sent.

5. The method according to claim 1, characterized in that The service platform includes a first processing unit and a second processing unit; Receive business requests sent by users, including: Receiving, by the first processing unit, a service request sent by a user; According to the current business code of the business corresponding to the business request deployed online, the business corresponding to the business request is executed, and the obtained business result is used as the business result to be verified, specifically including: Execute the service corresponding to the service request by using the current service code stored in the first processing unit, and use the obtained service result as the service result to be verified; The service corresponding to the service request is executed by the original service code to obtain a standard service result, which specifically includes: Execute the service corresponding to the service request by using the original service code stored in the second processing unit, and use the obtained service result as the standard service result; According to the standard business result and the business result to be verified, real-time data verification is performed on the current business code, specifically including: According to the standard service result and the service result to be verified, real-time data verification is performed on the current service code in the first processing unit.

6. The method according to claim 5, characterized in that Before executing the service corresponding to the service request by using the original service code stored in the second processing unit and using the obtained service result as the standard service result, the method further includes: Obtaining the business data carried in the business request through the aspect-oriented programming (AOP) interception method preset in the first processing unit; sending the service data to the second processing unit through the first processing unit; Executing the service corresponding to the service request by using the original service code stored in the second processing unit, and using the obtained service result as the standard service result, specifically includes: The service data is processed by the original service code stored in the second processing unit to execute the service corresponding to the service request.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.