CN111796864A - Data verification method and device - Google Patents

Data verification method and device Download PDF

Info

Publication number
CN111796864A
CN111796864A CN202010491055.2A CN202010491055A CN111796864A CN 111796864 A CN111796864 A CN 111796864A CN 202010491055 A CN202010491055 A CN 202010491055A CN 111796864 A CN111796864 A CN 111796864A
Authority
CN
China
Prior art keywords
service
result
code
request
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010491055.2A
Other languages
Chinese (zh)
Inventor
范鹏程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010491055.2A priority Critical patent/CN111796864A/en
Publication of CN111796864A publication Critical patent/CN111796864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Abstract

The present specification discloses a method and a device for data verification, wherein after a service platform receives a service request sent by a user, a service corresponding to the service request can be executed according to a current service code of a service corresponding to the service request deployed on line, and an obtained service result is used as a service result to be verified, and then an original service code of the service corresponding to the service request can be inquired, the service corresponding to the service request is executed through the original service code to obtain a standard service result, and then real-time data verification is performed on the current service code deployed on line according to the obtained standard service result and the service result to be verified. Compared with the prior art, the method can verify the reconstructed service code in time, and improves the verification efficiency.

Description

Data verification method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for data verification.
Background
In the field of computer technology, if a developer needs to optimize a program code of a service, the program code may be reconstructed by simplifying the program code and the like. In order to ensure that the reconstructed program code remains unchanged in service function (i.e. for the same service request, the result obtained by executing the service request by the reconstructed program code is consistent with the result obtained by executing the service request by the program code before reconstruction), the developer usually needs to verify the reconstructed program code.
In the prior art, if a developer needs to verify whether a reconstructed program code is correct, service requests received online and service results obtained by executing the service requests according to the program code before reconstruction can be stored. In the subsequent on-line testing system, each stored service request can be played back according to the reconstructed program code, and the obtained service result is compared with the stored service result so as to verify whether the reconstructed program code is normal in service function.
It can be seen that, in the prior art, a developer has a certain time delay for verifying the reconstructed program code, so how to verify the reconstructed program code in time is a problem to be solved urgently.
Disclosure of Invention
The present specification provides a method and an apparatus for data verification, which partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a method of data verification, comprising:
a service platform receives a service request sent by a user;
executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified;
inquiring an original service code of a service corresponding to the service request, and executing 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 is carried out on the basis of the original service code;
and performing real-time data verification on the current service code according to the standard service result and the service result to be verified.
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 on line and taking the obtained service result as the service result to be verified, the method further includes:
if the service corresponding to the service request is determined to be the service with the service code reconstructed, acquiring service data carried in the service request through a preset section-oriented programming (AOP) interception mode;
executing the service corresponding to the service request through the original service code to obtain a standard service result, which specifically comprises:
and processing the service data through the original service code so as to execute the service corresponding to the service request.
Optionally, determining that the service corresponding to the service request is a service with a service code reconstructed specifically includes:
determining a service interface of a service corresponding to the service request;
and if the service interface is marked with the set annotation, determining that the service corresponding to the service request is the service with the service code reconstructed.
Optionally, the method further comprises:
and if the service data is determined to carry the set identification, the service data is not processed through the original service code after the standard service result is obtained.
Optionally, performing real-time data verification on the current service code according to the standard service result and the service result to be verified, which specifically includes:
comparing the standard service result with the service result to be verified to obtain a comparison result;
and if the standard service result is consistent with the service result to be verified according to the comparison result, determining that the current service code is normal, otherwise, determining that the current service code is abnormal.
Optionally, the method further comprises:
and if the current service code is determined to be abnormal, sending prompt information for correcting the current service code.
Optionally, the service platform includes a first processing unit and a second processing unit;
receiving a service request sent by a user, specifically comprising:
receiving a service request sent by a user through the first processing unit;
executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified, which specifically comprises:
executing the service corresponding to the service request through the current service code stored in the first processing unit, and taking the obtained service result as a service result to be verified;
executing the service corresponding to the service request through the original service code to obtain a standard service result, which specifically comprises:
executing the service corresponding to the service request through the original service code stored in the second processing unit, and taking the obtained service result as a standard service result;
according to the standard service result and the service result to be verified, performing real-time data verification on the current service code, specifically comprising:
and performing real-time data verification on the current service code in the first processing unit according to the standard service result and the service result to be verified.
Optionally, before executing the service corresponding to the service request by using the original service code stored in the second processing unit and taking the obtained service result as a standard service result, the method further includes:
acquiring service data carried in the service request by a preset section-oriented programming AOP interception mode 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 through the original service code stored in the second processing unit, and taking the obtained service result as a standard service result, which specifically includes:
and processing the service data through the original service code stored in the second processing unit to execute the service corresponding to the service request.
This specification provides a data verification device, including:
the receiving module is used for receiving a service request sent by a user by the service platform;
the determining module is used for executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified;
the query module is used for querying an original service code of a service corresponding to the service request, executing the service corresponding to the service request through the original service code to obtain a standard service result, and reconstructing the current service code on the basis of the original service code to obtain a standard service result;
and the checking module is used for carrying out real-time data checking on the current service code according to the standard service result and the service result to be verified.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of data verification.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the above-mentioned data checking method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the data verification method provided in this specification, after receiving a service request sent by a user, a service platform may execute a service corresponding to the service request according to a current service code of a service corresponding to the service request deployed on line, and use an obtained service result as a service result to be verified, and then may query an original service code of the service corresponding to the service request, execute the service corresponding to the service request through the original service code, to obtain a standard service result, and further perform real-time data verification on the current service code deployed on line according to the obtained standard service result and the service result to be verified.
It can be seen from the above method that, after receiving a service request sent by a user, the method can immediately determine a service result obtained by executing the service requested by the service request by the current service code deployed on the line and a service result obtained by executing the service requested by the service request by the original service code, and then perform real-time data verification on the current service code by the obtained two service results. Compared with the mode that in the prior art, a developer needs to collect the service request firstly and then replay the service request to verify the reconstructed service code, the method can verify the reconstructed service code in time, and therefore the verification efficiency of the reconstructed service code is effectively improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic flow chart of a method for data verification according to the present disclosure;
fig. 2 is a schematic diagram of data verification implemented by a first processing unit and a second processing unit provided in this specification;
FIG. 3 is a schematic diagram of an apparatus for data verification provided herein;
fig. 4 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a data verification method in this specification, which specifically includes the following steps:
s101: and the service platform receives a service request sent by a user.
The user can send a service request to the service platform through the terminal held by the user or the client installed in the terminal, so as to execute the service on the service platform. Correspondingly, after receiving the service request, the service platform may execute the service corresponding to the service request. A terminal as referred to herein may refer to an electronic device such as a smartphone, tablet, desktop, laptop, etc. held by a user. It should be noted that, because the data verification method provided in this specification is intended to improve timeliness of performing data verification on the reconstructed service code, the service platform can perform data verification on the reconstructed service code immediately according to the service request after receiving the service request sent by the user.
S102: and executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified.
In practical application, in order to ensure that a service code corresponding to a service can better support smooth execution of the service, developers need to reconstruct the service code of the service according to actual optimization requirements, so as to improve the internal implementation performance of the service code by this means without changing the service function supported by the service code. Therefore, compared with the service code before reconstruction, the reconstructed service code has more excellent performance in the execution process, so that the execution efficiency of the service can be effectively improved, and good service experience is brought to a user.
As can be seen from the above, the significance of the reconstructed service code is to implement further optimization of the performance of the code inside the service on the basis of not changing the service function of the service itself, so that data check needs to be performed on the service function corresponding to the reconstructed service code, so as to ensure that the service function supported by the reconstructed service code is consistent with the service function supported by the service code before reconstruction.
Based on this, after receiving a service request sent by a user, the service platform can determine a service corresponding to the service request, and execute the service corresponding to the service request through a current service code deployed on line and used for executing the service. Here, the current service code mentioned here is obtained by reconstructing on the basis of the original service code corresponding to the service. That is, the original service code mentioned here may be understood as a service code before reconstruction, and the current service code may be understood as a code obtained by performing optimization on the basis of the original service code. For the same service, the service function supported by the original service code corresponding to the service should be the same as the service function supported by the reconstructed service code corresponding to the service, in other words, the service results obtained by respectively executing the original service code and the reconstructed service code of the service corresponding to the service request for the same service request should also be the same. It can be seen from this point that the data verification method provided in this specification is used to perform data verification on a reconstructed service code (i.e., a current service code) that has been deployed on a line, so as to ensure that the current service code deployed on the line is not abnormal in service function to a certain extent. However, since the data verification method provided in this specification is intended to perform data verification on the current service code already deployed on the line, a service result obtained by executing the service corresponding to the service request through the current service code may be referred to as a service result to be verified.
In this description, the original service code as well as the current service code may be stored in the same processing unit. Of course, the original service code and the current service code may also be stored in different processing units, and the different processing units may be located in the same hardware device or located in different hardware devices (for example, the different processing units are respectively stored in different servers). In addition, different processing units may be located in the same software environment in the same hardware device, or may be located in different software environments in the hardware device. Wherein, the processing unit storing the current service code may be referred to as a first processing unit, and the processing unit storing the original service code may be referred to as a second processing unit. That is to say, the service platform may receive and process a service request sent by a user through the first processing unit, and implement real-time data verification on a current service code while executing a service corresponding to the service request.
S103: and inquiring an original service code of a service corresponding to the service request, and executing 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 is carried out on the basis of the original service code.
The service platform can query an original service code of a service corresponding to the service request according to the service corresponding to the service request, execute the service corresponding to the service request through the original service code, and further take an obtained service result as a standard service result. It should be noted that, because the current service code is already deployed on the line, the service result to be verified, which is obtained by executing the service corresponding to the service request through the current service code, can be used for data verification of the current service code, and can also be returned to the user for displaying the user.
In practical applications, a service platform may provide multiple services to a user for execution, and in these services, service codes of all services are not always reconstructed. Therefore, after receiving a service request sent by a user, the service platform needs to determine whether a service corresponding to the service request is a service with a service code reconstructed.
If the service is a service with a reconstructed service code, the service platform can execute the service corresponding to the service request through the original service code and the current service code respectively to determine a standard service result and a service result to be verified. For example, the service platform may obtain service data carried in the service request in an intercept manner Oriented to tangent plane Programming (AOP), process the service data through the original service code, execute a service corresponding to the service request, and use the obtained service result as a standard service result.
For another example, the service platform may execute the service corresponding to the service request through the current service code to obtain a service result to be verified, and copy the service request at the same time, and then execute the copied service request according to the original service code to obtain the standard service result.
In this specification, there may be various ways to determine whether the service corresponding to the service request is a service with a service code reconstructed. For example, the service platform may determine in advance which services are services with service codes reconstructed, and store the service identifiers corresponding to the services with the service codes reconstructed in a preset data table. When the service platform receives the service request, it can inquire whether the service identifier of the service corresponding to the service request is located in the data table, if so, it is determined that the service corresponding to the service request is the service with the service code reconstructed, otherwise, it is determined that the service corresponding to the service request is not the service with the service code reconstructed.
For another example, the service platform may mark a set annotation on a service interface corresponding to each service with the service code reconstructed, where the set annotation is used to mark the service interface as the service interface corresponding to the service with the service code reconstructed. When the service platform receives a service request, whether a service interface of a service corresponding to the service request is marked with a set annotation can be determined, if the service is marked with the set annotation, the service corresponding to the service request is determined to be the service with the service code reconstructed, otherwise, the service corresponding to the service request is determined not to be the service with the service code reconstructed. If the service platform determines that the service interface of the service corresponding to the service request is marked with the annotation @ Compare (@ Compare is the set annotation set by the developer) after receiving the service request, it may be determined that the service interface of the service corresponding to the service request is marked with the set annotation, and then it is determined that the service corresponding to the service request is the service with the service code reconstructed.
It should be noted that, if the current service code and the original service code are respectively located in the first processing unit and the second processing unit, the service platform may obtain a service result to be verified through the first processing unit and obtain a standard service result through the second processing unit, and then perform data verification through the first processing unit, as shown in fig. 2.
Fig. 2 is a schematic diagram of data verification implemented by a first processing unit and a second processing unit provided in this specification.
As shown in the figure, the service platform may receive a service request sent by a user through the first processing unit, and execute a service corresponding to the service request through the current service code stored in the first processing unit, so as to obtain a service result to be verified. Meanwhile, the service platform can execute the service corresponding to the service request through the original service code stored in the second processing unit to obtain a standard service result. The service platform can perform real-time data verification on the current service code deployed on the online according to the determined standard service result and the service result to be verified in the first processing unit.
Before the service platform executes the service corresponding to the service request through the second processing unit to obtain the service result, the service platform may first obtain the service data carried in the service request through the first processing unit, and send the service data to the second processing unit through the first processing unit. Then, the service data is processed by the original service code stored in the second processing unit, and then the standard service result obtained after the second processing unit processes the service data is returned to the first processing unit, and the current service code is subjected to real-time data verification by the first processing unit. The service data mentioned here includes data such as parameter values, parameter types, method names, call classes, and types of call classes. In addition, the service platform can serialize the service data into binary data, and send the binary data to the second processing unit through the first processing unit, and the second processing unit receives the binary data and performs deserialization to obtain original service data.
It should be noted that, in practical applications, various data flow directions are configured in the configuration center of the service platform, and the data flow directions may indicate transmission flow directions of service data. For example, if one configured data flow direction is a transmission flow direction from the first processing unit to the second processing unit, after the service platform acquires the service data in the service request, the service data is transmitted from the first processing unit to the second processing unit.
For the above example, when the service platform executes the service corresponding to the service request through the second processing unit, a situation may occur that a worker misconfigures a data flow from the second processing unit to the first processing unit, and a service interface of the service corresponding to the original service code stored in the second processing unit is also marked with a set annotation. In this case, after the service platform processes the service data through the second processing unit, the service platform also transmits the service data from the second processing unit back to the first processing unit, which causes the first processing unit to execute the service corresponding to the service request again according to the current service code already deployed on the line. When the first processing unit executes the service, the original service code in the second processing unit is called to execute the service because the service interface corresponding to the service in the current service code is marked with the set annotation, so that the service platform can execute the service corresponding to the service request in an infinite loop manner.
In order to avoid the above situation, after the service platform obtains the service data carried in the service request, the service platform may label the service data with a setting identifier, and if the service platform determines that the service data is labeled with the setting identifier, after the service corresponding to the service request is executed by the original service code to obtain a standard service result, the service data is not processed again by the original service code. For the case that the current service code is located in the first processing unit and the original service code is located in the second processing unit, the service data is transmitted from the first processing unit to the second processing unit and then is not transmitted back from the second processing unit to the first processing unit for execution, thereby effectively solving the above problems. The setting identifier mentioned here may indicate that the service data is only used for data verification of the current service code already deployed on the line by obtaining a standard service result through the original service code.
S104: and performing real-time data verification on the current service code according to the standard service result and the service result to be verified.
After determining the standard service result and the service result to be verified, the service platform may perform data verification on the current service code of the service corresponding to the service request according to the standard service result and the service result to be verified.
The service platform may perform data verification according to the standard service result and the service result to be verified in a plurality of ways. For example, the service platform may compare the standard service result with the service result to be verified to obtain a comparison result, determine that the current service code is normal if the standard service result is determined to be consistent with the service result to be verified according to the comparison result, and otherwise determine that the current service code is abnormal.
For another example, the service platform may determine, according to the standard service result and the service result to be verified, a time for obtaining the service result to be verified through the current service code as a first time, and a time for obtaining the standard service result through the original service code as a second time, and if it is determined that the duration of the first time is less than the duration of the second time, it may be determined that the execution performance of the current service code is good, otherwise it is determined that the execution performance of the current service code needs to be improved.
If the current service code and the original service code are respectively located in the first processing unit and the second processing unit, the second processing unit executes according to the original service code to obtain a standard service result, and then sends the standard service result to the first processing unit, so that the first processing unit performs data verification on the current service code deployed on the line according to the standard service result and a to-be-verified service result obtained by executing the service corresponding to the service request according to the current service code.
It can be seen from the above that, after receiving the service request, the first processing unit may execute the service request according to the current service code, and return the obtained service result to be verified to the user, and meanwhile, based on the service result to be verified and the standard service result returned by the second processing unit, it is effectively achieved that, after receiving the service request, real-time data verification is immediately performed on the reconstructed service code based on the service request.
When the service platform determines that the current service code is abnormal, prompt information for correcting the current service code can be sent to a worker in the service platform, so that the worker in the service platform knows that the current service code is abnormal and corrects the current service code.
It can be seen from the above method that, after receiving a service request sent by a user, the method can immediately determine a service result obtained by executing the service requested by the current service code deployed on the line and a service result obtained by executing the service requested by the original service code, and further perform real-time data verification on the current service code by comparing whether the two obtained service results are consistent. Compared with the mode that in the prior art, a developer needs to collect the service request firstly and then replay the service request to verify the reconstructed service code, the method can verify the reconstructed service code in time, and therefore the verification efficiency of the reconstructed service code is effectively improved.
Based on the same idea, the data verification method provided above for one or more embodiments of the present specification further provides a corresponding data verification apparatus, as shown in fig. 3.
Fig. 3 is a schematic diagram of a data verification apparatus provided in this specification, which specifically includes:
a receiving module 301, configured to receive, by a service platform, a service request sent by a user;
a determining module 302, configured to execute a service corresponding to the service request according to a current service code of the service corresponding to the service request deployed on line, and use an obtained service result as a service result to be verified;
the query module 303 is configured to query an original service code of a 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, where the current service code is obtained by reconstructing based on the original service code;
and the checking module 304 is configured to perform real-time data checking on the current service code according to the standard service result and the service result to be verified.
Optionally, before the determining module 302 executes the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line and takes the obtained service result as a service result to be verified, the determining module 302 is further configured to, if it is determined that the service corresponding to the service request is a service in which the service code is reconstructed, obtain service data carried in the service request in a preset section-oriented programming AOP intercepting manner;
the query module 303 is specifically configured to process the service data through the original service code, so as to execute a service corresponding to the service request.
Optionally, the query module 303 is specifically configured to determine a service interface of a service corresponding to the service request; and if the service interface is marked with the set annotation, determining that the service corresponding to the service request is the service with the service code reconstructed.
Optionally, the query module 303 is further configured to, if it is determined that the service data carries a set identifier, after the standard service result is obtained, not process the service data through the original service code.
Optionally, the verification module 304 is specifically configured to compare the standard service result with the service result to be verified to obtain a comparison result; and if the standard service result is consistent with the service result to be verified according to the comparison result, determining that the current service code is normal, otherwise, determining that the current service code is abnormal.
Optionally, the checking module 304 is further configured to send a prompt message for correcting the current service code if it is determined that the current service code is abnormal.
Optionally, the service platform includes a first processing unit and a second processing unit;
the receiving module 301 is specifically configured to receive, by the first processing unit, a service request sent by a user;
the determining module 302 is specifically configured to execute a service corresponding to the service request through the current service code stored in the first processing unit, and use an obtained service result as a service result to be verified;
the query module 303 is specifically configured to execute a service corresponding to the service request through the original service code stored in the second processing unit, and use an obtained service result as a standard service result;
the checking module 304 is specifically configured to perform real-time data checking on the current service code in the first processing unit according to the standard service result and the service result to be verified.
Optionally, before the query module 303 executes the service corresponding to the service request through the original service code stored in the second processing unit and takes the obtained service result as a standard service result, the determination module 302 is further configured to obtain service data carried in the service request through a preset section-oriented programming AOP interception mode in the first processing unit; sending the service data to the second processing unit through the first processing unit;
the query module 303 is specifically configured to process the service data through the original service code stored in the second processing unit, so as to execute a service corresponding to the service request.
The present specification also provides a computer readable storage medium having stored thereon a computer program operable to perform the method of data verification provided in fig. 1 above.
This specification also provides a schematic block diagram of the electronic device shown in fig. 4. As shown in fig. 4, 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 hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the data verification method described in fig. 1 above. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (11)

1. A method of data verification, comprising:
a service platform receives a service request sent by a user;
executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified;
inquiring an original service code of a service corresponding to the service request, and executing 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 is carried out on the basis of the original service code;
and performing real-time data verification on the current service code according to the standard service result and the service result to be verified.
2. The method according to claim 1, wherein before executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line and taking the obtained service result as the service result to be verified, the method further comprises:
if the service corresponding to the service request is determined to be the service with the service code reconstructed, acquiring service data carried in the service request through a preset section-oriented programming (AOP) interception mode;
executing the service corresponding to the service request through the original service code to obtain a standard service result, which specifically comprises:
and processing the service data through the original service code so as to execute the service corresponding to the service request.
3. The method of claim 2, wherein determining that the service corresponding to the service request is a service with a service code reconfigured specifically comprises:
determining a service interface of a service corresponding to the service request;
and if the service interface is marked with the set annotation, determining that the service corresponding to the service request is the service with the service code reconstructed.
4. The method of claim 2, wherein the method further comprises:
and if the service data is determined to carry the set identification, the service data is not processed through the original service code after the standard service result is obtained.
5. The method of claim 1, wherein performing real-time data verification on the current service code according to the standard service result and the service result to be verified specifically comprises:
comparing the standard service result with the service result to be verified to obtain a comparison result;
and if the standard service result is consistent with the service result to be verified according to the comparison result, determining that the current service code is normal, otherwise, determining that the current service code is abnormal.
6. The method of claim 5, wherein the method further comprises:
and if the current service code is determined to be abnormal, sending prompt information for correcting the current service code.
7. The method of claim 1, wherein the service platform comprises a first processing unit and a second processing unit;
receiving a service request sent by a user, specifically comprising:
receiving a service request sent by a user through the first processing unit;
executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified, which specifically comprises:
executing the service corresponding to the service request through the current service code stored in the first processing unit, and taking the obtained service result as a service result to be verified;
executing the service corresponding to the service request through the original service code to obtain a standard service result, which specifically comprises:
executing the service corresponding to the service request through the original service code stored in the second processing unit, and taking the obtained service result as a standard service result;
according to the standard service result and the service result to be verified, performing real-time data verification on the current service code, specifically comprising:
and performing real-time data verification on the current service code in the first processing unit according to the standard service result and the service result to be verified.
8. The method of claim 7, wherein before executing the service corresponding to the service request by using the original service code stored in the second processing unit and taking the obtained service result as a standard service result, the method further comprises:
acquiring service data carried in the service request by a preset section-oriented programming AOP interception mode 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 through the original service code stored in the second processing unit, and taking the obtained service result as a standard service result, which specifically includes:
and processing the service data through the original service code stored in the second processing unit to execute the service corresponding to the service request.
9. An apparatus for data verification, comprising:
the receiving module is used for receiving a service request sent by a user by the service platform;
the determining module is used for executing the service corresponding to the service request according to the current service code of the service corresponding to the service request deployed on line, and taking the obtained service result as a service result to be verified;
the query module is used for querying an original service code of a service corresponding to the service request, executing the service corresponding to the service request through the original service code to obtain a standard service result, and reconstructing the current service code on the basis of the original service code to obtain a standard service result;
and the checking module is used for carrying out real-time data checking on the current service code according to the standard service result and the service result to be verified.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 8.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 8 when executing the program.
CN202010491055.2A 2020-06-02 2020-06-02 Data verification method and device Pending CN111796864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010491055.2A CN111796864A (en) 2020-06-02 2020-06-02 Data verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010491055.2A CN111796864A (en) 2020-06-02 2020-06-02 Data verification method and device

Publications (1)

Publication Number Publication Date
CN111796864A true CN111796864A (en) 2020-10-20

Family

ID=72806080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010491055.2A Pending CN111796864A (en) 2020-06-02 2020-06-02 Data verification method and device

Country Status (1)

Country Link
CN (1) CN111796864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631695A (en) * 2020-12-22 2021-04-09 北京达佳互联信息技术有限公司 Data verification method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631695A (en) * 2020-12-22 2021-04-09 北京达佳互联信息技术有限公司 Data verification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107450979B (en) Block chain consensus method and device
CN106970873B (en) On-line mock testing method, device and system
CN107450981B (en) Block chain consensus method and equipment
CN109002362B (en) Service method, device and system and electronic equipment
CN110704037B (en) Rule engine implementation method and device
CN107038041B (en) Data processing method, error code dynamic compatibility method, device and system
CN108959341B (en) Data synchronization method, device and equipment
CN107066519B (en) Task detection method and device
CN108268289B (en) Parameter configuration method, device and system for web application
CN112597013A (en) Online development and debugging method and device
CN107479868B (en) Interface loading method, device and equipment
CN111459724A (en) Node switching method, device, equipment and computer readable storage medium
CN110781192A (en) Verification method, device and equipment of block chain data
CN109144600B (en) Application program running method and device and computer readable medium
CN111949297B (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN111796864A (en) Data verification method and device
CN110022351B (en) Service request processing method and device
CN110874322B (en) Test method and test server for application program
CN111078435A (en) Service processing method and device and electronic equipment
CN111338655A (en) Installation package distribution method and system
CN115129728A (en) File checking method and device
CN110688430B (en) Method and device for obtaining data bypass and electronic equipment
CN114625410A (en) Request message processing method, device and equipment
CN112286572A (en) Configuration method and device of business process
CN110659105A (en) Virtualized resource processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination