Verification method and device of software system, equipment and storage medium

By intercepting database operations and recording target comparison information, the high time-consuming and data integrity problems caused by adding change time fields in the prior art are solved, and efficient data comparison and verification are achieved.

CN119830352AActive Publication Date: 2025-04-15CHINA CONSTRUCTION BANK +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411728965.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-15
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The prior art acquires data that has changed in the near future by adding a change time field to the table structure, which results in a large amount of time consuming when there are a large number of data tables and may destroy the integrity of the data, resulting in data loss or inconsistency.

Method used

By intercepting database operations, the operation table identifier is extracted and matched with the preset table identifier in the configuration information. If it matches, the target comparison information is recorded, including the target table identifier, the target primary key identifier and the target primary key data. The target data record is read from the target database and compared to verify the database operation results of the version to be verified.

Benefits of technology

The recent changes in data can be selected without changing the table structure for comparison, avoiding data loss caused by corruption of data integrity and improving comparison efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830352A_ABST
    Figure CN119830352A_ABST
Patent Text Reader

Abstract

The invention provides a software system verification method and device, equipment and a storage medium. Relates to the field of data processing. Comprising the steps of running a verified version and a version to be verified, intercepting an interface operation of the verified version, forwarding the interface operation to a software system of the version to be verified, extracting an operation table identifier from database operation information when a database operation of the software system is intercepted, and matching the operation table identifier with a preset table identifier; if the preset table identifier is matched with the operation table identifier, extracting and recording target comparison information from the database operation information, reading a target data record corresponding to the target comparison information from the target database as a verification result of the version to be verified, and when the first data record is consistent with the second data record, verifying the version to be verified. The verification result of the to-be-verified version is verification passing. The target comparison information is obtained by intercepting the database operation, a table structure does not need to be changed, the situation that data is lost due to the fact that data integrity is damaged is avoided, and comparison efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a verification method, device, equipment and storage medium for a software system. Background Art

[0002] The localization of banking systems refers to the localization of the bank's software system. Before the localized banking system goes online, the bank needs to fully verify the localized banking system to ensure that the system can operate normally after the transformation. The process of fully verifying the localized banking system is: run the new software system and the old software system at the same time, but the new software system does not undertake actual business, intercept the transaction request messages and outbound call return messages that actually occur on the old software system, forward the intercepted transaction request messages and outbound call return messages to the new software system, and replay them on the new software system. Then at the end of the day, compare the data of the new database corresponding to the new software system with the old database corresponding to the old system to see if they are the same. If they are the same, it proves that the new software system has been tested successfully.

[0003] When the old system has been in existence for a long time, there will be a large number of inactive users, and the data corresponding to these users will not change. Therefore, in order to improve the comparison efficiency, when comparing the new database with the old database, only the changed data needs to be compared. In the prior art, by adding a change time field to the data table to record when the data was updated, only the data with the recent data change time needs to be compared to improve the comparison efficiency.

[0004] Thus, when there are a large number of tables in the system, adding a change time field to the table structure will consume a lot of time, and changing a large number of table structures may damage the integrity of the data, resulting in data loss or inconsistency. Summary of the invention

[0005] The present application provides a software system verification method, device, equipment and storage medium to solve the problem in the prior art that data that has changed recently is obtained by changing the table structure, which results in a lot of time being consumed when there are a large number of data tables and may damage the integrity of the data.

[0006] In a first aspect, the present application provides a software system verification method, comprising:

[0007] Under the same operating environment, the verified version of the software system is run in an interface-operable manner and the version to be verified of the software system is run in an interface-locked manner, and the first interface operation of the verified version is intercepted;

[0008] Mapping the first interface operation to the second interface operation of the verified version, so as to forward the second interface operation to the version to be verified;

[0009] When a database operation of the software system is intercepted, an operation table identifier is extracted from database operation information corresponding to the database operation, and the operation table identifier is matched with a preset table identifier in the configuration information; the database operation includes: the operation of the version to be verified on the first database, and / or the operation of the verified version on the second database;

[0010] If the preset table identifier and the operation table identifier match, extracting and recording target comparison information from the database operation information, the target comparison information including: the target table identifier, the target primary key identifier and the target primary key data, the target table identifier being the operation table identifier;

[0011] Reading a target data record corresponding to the target comparison information from a target database, the target database including the first database and the second database, the target data record including: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database;

[0012] The first data record and the second data record are compared as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed; when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

[0013] In a possible design, the step of reading the target data record corresponding to the target comparison information from the target database includes:

[0014] Extracting a preset comparison period of the target table identifier from the configuration information, wherein the preset comparison period is used to indicate a comparison period of data in the target table identifier;

[0015] The target data record corresponding to the target comparison information is read from the target database according to the preset comparison period.

[0016] In a possible design, the configuration information further includes: a preset field identifier corresponding to the target table identifier, the preset field identifier being used to indicate a field to be compared in a data table corresponding to the target table identifier, and the comparison of the first data record and the second data record as a verification result of the version to be verified includes:

[0017] Acquire first field data corresponding to the preset field identifier from the first data record;

[0018] Acquire second field data corresponding to the preset field identifier from the second data record;

[0019] The first field data and the second field data are compared as a verification result of the version to be verified.

[0020] In a possible design, the configuration information further includes: a preset format conversion rule corresponding to the preset field identifier, and the comparing the first field data with the second field data as a verification result of the version to be verified includes:

[0021] If the first field data and the second field data correspond to different formats, converting the first field data and the second field data into the same format according to the preset format conversion rule;

[0022] The first field data and the second field data having the same format are compared as the verification result of the version to be verified.

[0023] In one possible design, running the verified version of the software system in an interface-operable manner includes:

[0024] Extracting database call statements from the verified version of software code;

[0025] Determine the software interface where the database call statement is located;

[0026] Recursively analyzing upstream from the software interface in the interface call link of the verified version to obtain the most upstream business interface that calls the software interface;

[0027] The first interface control corresponding to the most upstream business interface is displayed on the operational interface of the verified version, and the second interface controls other than the first interface control are grayed out.

[0028] In a possible design, extracting the target comparison information from the database operation information includes:

[0029] Extracting the operation field identifier from the database operation information;

[0030] If the operation field identifier is the preset field identifier, the target comparison information is extracted from the database operation information.

[0031] In a possible design, obtaining pre-recorded target comparison information includes:

[0032] After reading data from a pre-generated comparison information storage file as the target comparison information, the data in the comparison information storage file is deleted.

[0033] In a second aspect, the present application provides a task scheduling device, comprising:

[0034] An interception module, used to run the verified version of the software system in an interface-operable manner and the version to be verified of the software system in an interface-locked manner under the same operating environment, and intercept the first interface operation of the verified version;

[0035] A sending module, configured to map the first interface operation to a second interface operation of the verified version, so as to forward the second interface operation to the version to be verified;

[0036] a processing module, configured to extract an operation table identifier from database operation information corresponding to the database operation when intercepting a database operation of the software system, and match the operation table identifier with a preset table identifier in the configuration information; the database operation includes: an operation of the version to be verified on the first database, and / or an operation of the verified version on the second database;

[0037] The processing module is further configured to extract and record target comparison information from the database operation information if the preset table identifier matches the operation table identifier, the target comparison information including: the target table identifier, the target primary key identifier and the target primary key data, the target table identifier being the operation table identifier;

[0038] The processing module is further used to read the target data record corresponding to the target comparison information from the target database, the target database includes the first database and the second database, and the target data record includes: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database;

[0039] The processing module is also used to compare the first data record and the second data record as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed; when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

[0040] In one possible design, this includes:

[0041] A processing module, used for extracting a preset comparison period of the target table identifier from the configuration information, wherein the preset comparison period is used for indicating a comparison period of data in the target table identifier;

[0042] A processing module is used to read the target data record corresponding to the target comparison information from the target database according to the preset comparison period.

[0043] In one possible design, this includes:

[0044] An acquisition module, used for acquiring first field data corresponding to the preset field identifier from the first data record;

[0045] The acquisition module is further used to acquire the second field data corresponding to the preset field identifier from the second data record;

[0046] The processing module is further used to compare the first field data with the second field data as the verification result of the version to be verified.

[0047] In one possible design, this includes:

[0048] If the first field data and the second field data correspond to different formats, the processing module converts the first field data and the second field data into the same format according to the preset format conversion rule;

[0049] The processing module is used to compare the first field data and the second field data having the same format as each other, and use the comparison as the verification result of the version to be verified.

[0050] In one possible design, it also includes:

[0051] A processing module, used for extracting database call statements from the software code of the verified version;

[0052] The processing module is further used to determine the software interface where the database call statement is located;

[0053] The processing module is further used to recursively analyze upstream from the software interface in the interface call link of the verified version to obtain the most upstream business interface that calls the software interface;

[0054] The processing module is further used to display the first interface control corresponding to the most upstream business interface on the operational interface of the verified version, and to gray out the second interface controls other than the first interface control.

[0055] In one possible design, this includes:

[0056] A processing module, used for extracting the operation field identifier from the database operation information;

[0057] If the operation field identifier is the preset field identifier, the processing module extracts the target comparison information from the database operation information.

[0058] In one possible design, this includes:

[0059] After reading data from the pre-generated comparison information storage file as the target comparison information, the processing module deletes the data in the comparison information storage file.

[0060] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes a software system verification method as described in the first aspect and various possible designs of the first aspect.

[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a software system verification method as described in the first aspect and various possible designs of the first aspect is implemented.

[0062] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements a software system verification method as described in the first aspect and various possible designs of the first aspect.

[0063] The present application provides a software system verification method, apparatus, device and storage medium, which runs a verified version of the software system in an interface-operable manner and a to-be-verified version of the software system in an interface-locked manner under the same operating environment, intercepts a first interface operation of the verified version, maps the first interface operation to a second interface operation of the verified version, and forwards the second interface operation to the to-be-verified version. Then, when a database operation of the software system is intercepted, an operation table identifier is extracted from database operation information corresponding to the database operation, and the operation table identifier is matched with a preset table identifier in the configuration information; the database operation includes: the operation of the to-be-verified version on the first database, and / or the operation of the verified version on the second database. If the preset table identifier and the operation table identifier match , then extract and record the target comparison information from the database operation information, the target comparison information includes: the target table identifier, the target primary key identifier and the target primary key data, the target table identifier is the operation table identifier, read the target data record corresponding to the target comparison information from the target database, the target database includes the first database and the second database, the target data record includes: the first data record corresponding to the target comparison information in the first database, the second data record corresponding to the target comparison information in the second database, compare the first data record and the second data record as the verification result of the version to be verified, when the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed, when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed. Compared with the prior art, the changed data is obtained by adding a change time period in the table structure, which causes a lot of time consumption and data loss, the present application obtains the target comparison information by intercepting the database operation, and reads the changed data in the database according to the target comparison information, without changing the table structure, avoiding the situation of data loss caused by the destruction of data integrity, and improving the comparison efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0065] Figure 1 A schematic diagram of an application scenario of the verification method of the software system provided in an embodiment of the present application;

[0066] Figure 2 The verification method process of the software system provided in the embodiment of the present application Figure 1 ;

[0067] Figure 3 The verification method process of the software system provided in the embodiment of the present application Figure 2 ;

[0068] Figure 4 The verification method process of the software system provided in the embodiment of the present application Figure 3 ;

[0069] Figure 5 The verification method process of the software system provided in the embodiment of the present application Figure 4 ;

[0070] Figure 6 The verification method process of the software system provided in the embodiment of the present application Figure 5 ;

[0071] Figure 7 A schematic diagram of the structure of a verification device for a software system provided in an embodiment of the present application;

[0072] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0073] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0074] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0075] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0076] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0077] In the prior art, when comparing new data with old data, in order to improve the comparison efficiency, a change time field is added to the data table to record the data update time, and finally the data with the data change time in the recent period is compared based on the change time field. However, in the banking system, the number of data tables that need to be compared is huge. By adding a change time field to the table structure, the workload will be increased, and changing a large number of table structures may damage the integrity of the data, resulting in data loss or inconsistency.

[0078] Based on this, the inventive concept of the present application is to provide a verification method for a software system, which can screen out data that has changed in the recent period without changing the data table structure, so as to compare the data and realize the verification of the software system. Based on this, the database operation can be intercepted to record the table identifier, primary key identifier and gradual data of the database operation as the relevant information of the changed data, indicating the data that needs to be compared. The recorded information is independent of any file outside the database, and does not require the modification of the table structure in the database. Therefore, it can reduce the workload and reduce the occurrence of data integrity damage on the basis of improving the comparison efficiency.

[0079] Figure 1 Schematic diagram of application scenarios of the verification method of the software system provided in the embodiment of the present application. Figure 1 As shown, the new system includes a new system application and a new system database, and the data generated by the operation of the new system application is stored in the new system database; the old system includes an old system application and an old system database, and the data generated by the operation of the old system application is stored in the old system database. The data comparison tool includes a data marking module, a data comparison module, and a configuration library, wherein the data marking module takes over the database operation module in a proxy manner and intercepts the database operation. The data comparison module compares the data tables in the old system database and the data tables in the new system database based on the configuration information stored in the configuration library and the target comparison information obtained by the data marking module when intercepting the database operation, and finally forms a verification result.

[0080] Figure 2 The verification method process of the software system provided in the embodiment of the present application Figure 1 ,like Figure 1 As shown, the method comprises the following steps:

[0081] S201: Under the same operating environment, the verified version of the software system is run in an interface-operable manner and the to-be-verified version of the software system is run in an interface-locked manner, and the first interface operation of the verified version is intercepted.

[0082] In the embodiment of the present application, the verified version of the software system refers to the banking system before the localization transformation of the banking system, and the version of the software system to be verified refers to the banking system after the localization transformation of the banking system. First, ensure that the operating environment of the verified version of the software system and the version of the software system to be verified is the same. Optionally, the same operating environment means the same operating system, the same hardware configuration, and the same software dependencies. In order to simplify the complexity of environment configuration and management, when performing software system verification, a consistent development and testing environment can be created through virtualization technology, so that the same operating environment can be simulated on different physical hardware.

[0083] Then, the verified version of the software system is run in an interface-operable manner, that is, the user is allowed to operate the verified version of the software system, but the version to be verified of the software system is run in an interface-locked manner, preventing the user from directly operating the version to be verified of the software system, and intercepting the first interface operation when the verified version is operated, thereby ensuring the consistency of the operation of the verified version and the version to be verified, and then being able to effectively verify the consistency of the data of the verified version and the version to be verified at the database operation level, avoiding the lack of comparability at the database operation level due to inconsistent operations. For example, for the verified version of the software system, the user can directly operate through the user interface, and no special restrictions or interceptions are imposed on the interface operation, for example, the user can use the mouse, keyboard and light input devices to click and input operations normally. For the software system to be verified, the operating system API can be used to disable the mouse and keyboard, or by creating a window or control, and setting the window or control to be transparent and non-interactive, and the window or control covers the entire window of the entire software system to be verified, so that the user cannot directly click or input into the operation interface of the software system to be verified.

[0084] S202: Map the first interface operation to the second interface operation of the verified version, so as to forward the second interface operation to the version to be verified.

[0085] In the embodiment of the present application, the intercepted first interface operation is mapped to the second operation interface of the verified version, and then the second interface operation is forwarded to the version to be verified, so that the operation of the version to be verified is the same as that of the verified version. Specifically, an event listener can be used to listen to the operation of the software system in the verified version to generate a first interface operation, and then the first interface operation is mapped to the second interface operation of the verified version, so that the second interface operation is forwarded to the version to be verified to perform the same interface operation.

[0086] S203: When a database operation of the software system is intercepted, an operation table identifier is extracted from the database operation information corresponding to the database operation, and the operation table identifier is matched with a preset table identifier in the configuration information; the database operation includes: the operation of the version to be verified on the first database, and / or the operation of the verified version on the second database.

[0087] In an embodiment of the present application, when the to-be-verified version and the verified version of the software system perform interface operations, the operation table identifier is extracted from the database operation information corresponding to the database operation by intercepting the operation on the respective databases, and then the operation table identifier is matched with the preset table identifier in the configuration information. For example, by deploying middleware between the database and the software system, when the to-be-verified version of the software system operates on the first database, the middleware intercepts the operation on the first database to obtain the operation information corresponding to the first database. Similarly, the operation on the second database by the verified version of the software system is intercepted by the middleware to obtain the operation information corresponding to the second database. Then, by parsing the database language (Structured Query Language, SQL) statement in the database operation information, the operation table identifier is extracted. Optionally, the operation table identifier is the name of the operation table. It should be noted here that since the interface operations of the to-be-verified version of the software system and the verified version of the software system are the same, their database operations are also the same, so the operation table identifier extracted from the database operation information should also be the same. Finally, the operation table identifier is matched with the preset table identifier in the configuration information to obtain a matching result.

[0088] The configuration information is pre-defined by the user, including the table name to be compared, the table fields to be compared, and the comparison rules.

[0089] S204: If the preset table identifier and the operation table identifier match, extract and record target comparison information from the database operation information, the target comparison information including: a target table identifier, a target primary key identifier and target primary key data, and the target table identifier is the operation table identifier.

[0090] In an embodiment of the present application, if the preset table identifier and the operation table identifier match, the target comparison information is extracted and recorded from the database operation information, wherein the target comparison information is: target table identifier, target primary key identifier and target primary key data, and the target table identifier is the operation table identifier.

[0091] For example, when the preset table identifier and the operation table identifier match, a SQL query statement is used to extract the target primary key identifier and the target primary key data in the operation table identifier.

[0092] S205: Read target data records corresponding to the target comparison information from a target database, where the target database includes a first database and a second database, and the target data records include: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database.

[0093] In an embodiment of the present application, corresponding target data records are read from the first database and the second database respectively according to the obtained target comparison information, that is, the first data record is read from the first database according to the target table identifier, the target primary key identifier and the target primary key data, and the second data record is read from the second database according to the target table identifier, the target primary key identifier and the target primary key data.

[0094] S206: Compare the first data record and the second data record as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed. When the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

[0095] In the embodiment of the present application, the first data record and the second data record are compared, for example, the target primary key identifiers of the first data record and the second data record are traversed, and the target primary key data corresponding to the target primary key identifiers are compared in turn as the verification result of the version to be verified. If the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed, and if the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

[0096] In an embodiment of the present application, by running a verified version of the software system in an interface-operable manner and a to-be-verified version of the software system in an interface-locked manner under the same operating environment, and intercepting a first interface operation of the verified version, the first interface operation is mapped to a second interface operation of the verified version, so as to forward the second interface operation to the to-be-verified version, and then when a database operation of the software system is intercepted, an operation table identifier is extracted from database operation information corresponding to the database operation, and the operation table identifier is matched with a preset table identifier in the configuration information; the database operation includes: the operation of the to-be-verified version on the first database, and / or, the operation of the verified version on the second database. If the preset table identifier and the operation table identifier match, the operation table identifier is extracted from the database operation information corresponding to the database operation. The target comparison information is extracted and recorded, the target comparison information includes: a target table identifier, a target primary key identifier and a target primary key data, the target table identifier is an operation table identifier, and the target data record corresponding to the target comparison information is read from the target database. The target database includes a first database and a second database, and the target data record includes: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database. The first data record and the second data record are compared as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed. When the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed. Compared with the prior art, the changed data is obtained by adding a change time period in the table structure, which causes a lot of time consumption and data loss. The present application obtains the target comparison information by intercepting the database operation, and reads the changed data in the database according to the target comparison information. There is no need to change the table structure, which avoids the situation of data loss caused by the destruction of data integrity and improves the comparison efficiency.

[0097] Figure 3 The verification method process of the software system provided in the embodiment of the present application Figure 2 , in the above Figure 2 Based on the embodiment shown, Figure 3 As shown, a specific implementation method of reading the target data record corresponding to the target comparison information from the target database is:

[0098] S301: extracting a preset comparison period of a target table identifier from configuration information, where the preset comparison period is used to indicate a comparison period of data in the target table identifier.

[0099] In an embodiment of the present application, when reading the target data record corresponding to the target comparison information from the target database, the configuration information stored in the configuration library is first obtained, wherein the configuration information includes a preset comparison period of the target table identifier, and the preset comparison period is used to indicate the comparison period of the data in the target table identifier.

[0100] S302: Reading target data records corresponding to target comparison information from a target database according to a preset comparison period.

[0101] In the embodiment of the present application, for example, the setting of the preset comparison period can be a unified preset comparison period for all tables in the target database; a different preset comparison period can be set for each table in the target database; or different preset comparison periods can be set for some tables in the target database. The target data record corresponding to the target comparison information is read from the target database according to the preset comparison period.

[0102] In an embodiment of the present application, when reading the target data record corresponding to the target comparison information from the target database, configuration information is obtained, the configuration information includes a preset comparison period of the target table identifier, the preset comparison period is used to indicate the comparison period of the data in the target table identifier, and the target data record corresponding to the target comparison information is read from the target database according to the preset comparison period. Frequent data comparison consumes a large amount of system resources, such as CPU, memory or network bandwidth. By setting a reasonable preset comparison period, it is possible to ensure the accuracy and synchronization of the data while avoiding unnecessary impact on system performance.

[0103] Figure 4 The verification method process of the software system provided in the embodiment of the present application Figure 3 , in the above Figure 2 or Figure 3 Based on the embodiment shown, Figure 4 As shown, a specific implementation of step S206 is:

[0104] S401: Acquire first field data corresponding to a preset field identifier from a first data record.

[0105] In the embodiment of the present application, the configuration information includes a preset field identifier corresponding to the target table identifier, and the preset field identifier refers to the field to be compared in the data table corresponding to the target table identifier. The first field data corresponding to the preset field identifier is obtained from the first data record. For example, the preset field identifier is the field name to be compared, and the first field data is the specific value of the field name to be compared in the first database, then the specific value of the field name to be compared in the first database is obtained from the first data record.

[0106] S402: Acquire second field data corresponding to the preset field identifier from the second data record.

[0107] In an embodiment of the present application, the second field data corresponding to the preset field identifier is obtained from the second data record. For example, the preset field identifier is the field name to be compared, and the second field data is the specific value of the field name to be compared in the second database, that is, the specific value of the field name to be compared in the second database is obtained from the second data record.

[0108] S403: Compare the first field data with the second field data as the verification result of the version to be verified.

[0109] In an embodiment of the present application, the extracted first field data and the second field data are compared. Optionally, the comparison content includes: whether the field data are consistent and which inconsistent field data are included. Based on the comparison result of the field data, a verification report or log is generated as the verification result of the version to be verified.

[0110] The configuration information also includes: a preset format conversion rule corresponding to the preset field identifier, comparing the first field data with the second field data as a verification result of the version to be verified, including:

[0111] If the first field data and the second field data correspond to different formats, the first field data and the second field data are converted into the same format according to a preset format conversion rule.

[0112] In an embodiment of the present application, when the first field data and the second field data correspond to different formats, the first field data and the second field data are converted to the same format according to a preset format conversion rule corresponding to a preset field identifier in the configuration information. For example, the format conversion includes multiple types such as date format, number format, and string format. Optionally, the first data field format can be converted to the second field data format, or the second field format can be converted to the first field data format, or both the first field data and the second field data can be converted to other identical formats according to the preset format conversion rule stored in the configuration information.

[0113] The first field data and the second field data having the same format are compared as the verification result of the version to be verified.

[0114] In an embodiment of the present application, the first field data and the second field data having the same format are compared to generate a verification report or log as a verification result of the version to be verified.

[0115] In an embodiment of the present application, when the preset field identifier corresponding to the target table identifier is included in the configuration information, the first field data corresponding to the preset field identifier is obtained from the first data record, and the second field data corresponding to the preset field identifier is obtained from the second data record, and the first field data and the second field data are compared as the verification result of the version to be verified. The target table identifier and the preset field identifier in the configuration information provide clear guidance for the data comparison and verification process, which helps to ensure the accuracy and consistency of the data. When the preset format conversion rule corresponding to the preset field identifier is included in the configuration information, if the first field data and the second field data correspond to different formats, the first field data and the second field data are converted to the same format according to the preset format conversion rule, and the first field data and the second field data with the same format are compared as the verification result of the version to be verified. The preset format conversion rule corresponding to the preset field identifier is provided in the configuration information, and the first field data and the second field data of different formats are converted to the same format and then compared, ensuring that the data have the same rules when compared, thereby improving the accuracy of the comparison.

[0116] Figure 5 The verification method process of the software system provided in the embodiment of the present application Figure 4 , in the above Figures 2 to 4 Based on any of the embodiments shown, Figure 5 As shown, the specific implementation method of running the verified version of the software system in an interface-operable manner in step S201 is:

[0117] S501: Extracting database call statements from the verified version of software code.

[0118] In an embodiment of the present application, database call statements are extracted from the verified version of the software code to identify the code segments for the verified version of the software system to interact with the first database. For example, the search function of the code editor is used to find specific SQL keywords to extract the database call statements.

[0119] S502: Determine the software interface where the database call statement is located.

[0120] In an embodiment of the present application, the software interface to which the code segment of the database call statement belongs is determined, and through code structure analysis, the class or module to which the code segment containing the database call statement belongs is identified, and the software interface provided by these classes or modules is determined.

[0121] S503: Recursively analyze the software interface in the interface call link of the verified version upstream to obtain the most upstream business interface that calls the software interface.

[0122] In the embodiment of the present application, the software interface in the interface call link of the verified version is recursively analyzed upstream, the interface call link is traced, and the most upstream business interface that calls the target software interface is found. Starting from the interface of the verified version, the call link is recursively analyzed upstream, that is, other interfaces or components of the software interface where the database call statement is located, and the call relationship is identified by using code analysis tools or manually reviewing the code, and the top-level business interface that interacts with the user is found at the most upstream of the call link.

[0123] S504: Displaying a first interface control corresponding to the most upstream business interface on the operational interface of the verified version, and graying out second interface controls other than the first interface control.

[0124] In an embodiment of the present application, the first interface control corresponding to the upstream business interface is displayed on the operational interface of the verified version of the software system, and the second interface controls other than the first interface control are grayed out to limit the user's operation scope and prevent the user from triggering unverified business logic through other interface controls.

[0125] In an embodiment of the present application, a database call statement is extracted from the verified version of the software code, and then the software interface where the database call statement is located is determined, and a recursive analysis is performed upstream from the software interface in the interface call link of the verified version to obtain the upstreammost business interface that calls the software interface, and a first interface control corresponding to the upstreammost business interface is displayed on the operable interface of the verified version, and a second interface control other than the first interface control is grayed out. When the verified version of the software system is run in an interface-operable manner, the database call statement is extracted from the verified version of the software code, the interface location is determined, the call link is traced, and the interface control corresponding to the upstreammost business interface is highlighted on the user interface, and other controls are grayed out to limit the user's operating scope, so that the user can only operate the interface that interacts with the database, thereby ensuring that the verified version of the software system will make modifications to the first database when processing operations, thereby improving the verification rate of the software system.

[0126] In order to reduce the amount of target comparison information and save storage space, the target comparison information extracted from the database operation information includes:

[0127] Extract the operation field identifier from the database operation information.

[0128] In the embodiment of the present application, the operation field identifier is extracted from the database operation information, that is, when the database operation data table changes, the table name of the data table is extracted.

[0129] If the operation field identifier is a preset field identifier, the target comparison information is extracted from the database operation information.

[0130] In the embodiment of the present application, if the extracted operation field identifier is a preset field identifier, that is, the extracted table name is a table name pre-stored in the configuration library, the target comparison information is extracted from the database operation information. If the extracted table name is not pre-stored in the configuration library, the database operation is intercepted again and the operation data table identifier is extracted from the database operation information.

[0131] In an embodiment of the present application, a database operation is intercepted, and the database operation includes: the operation of the version to be verified on the first database, and / or the operation of the verified version on the second database. In response to intercepting the database operation, an operation data table identifier is extracted from the database operation information corresponding to the database operation. If the operation data table identifier is a preset table identifier, the target comparison information is extracted from the database operation information and the target comparison information is recorded. By configuring the preset table identifier and intercepting the database operation to extract and record the target comparison information, the changes in the data can be captured in real time. In order to reduce the amount of target comparison information and save storage space, when intercepting the database operation, it can be determined whether it is an operation field identifier that needs to be compared. If it is an operation field identifier that needs to be compared, it will be recorded.

[0132] Figure 6 The verification method process of the software system provided in the embodiment of the present application Figure 5 , in the above Figures 2 to 5 Based on any of the embodiments shown, Figure 6 As shown, a specific implementation method of obtaining the pre-recorded target comparison information is:

[0133] S601: After reading data from a pre-generated comparison information storage file as target comparison information, the data in the comparison information storage file is deleted.

[0134] In an embodiment of the present application, after each database operation is intercepted to obtain comparison information, the comparison information will be stored in a pre-generated comparison information storage file through a snapshot record. When the data in the pre-generated comparison information storage file is used as the target comparison information, the data in the comparison information storage file will be deleted.

[0135] In an embodiment of the present application, after reading data from a pre-generated comparison information storage file as target comparison information, by deleting the data in the comparison information storage file, it is avoided that the data will be regarded as target comparison information again when the comparison is performed next time, thereby causing repeated comparison and unnecessary calculations.

[0136] Figure 7 This is a schematic diagram of the structure of the verification device of the software system provided in the embodiment of the present application. Figure 7 As shown, the verification device of the software system includes: an interception module 701, a sending module 702, and a processing module 703.

[0137] The interception module 701 is used to run the verified version of the software system in an interface-operable manner and the to-be-verified version of the software system in an interface-locked manner under the same operating environment, and intercept the first interface operation of the verified version; the sending module 702 is used to map the first interface operation to the second interface operation of the verified version, so as to forward the second interface operation to the to-be-verified version; the processing module 703 is used to extract the operation table identifier from the database operation information corresponding to the database operation when intercepting the database operation of the software system, and match the operation table identifier with the preset table identifier in the configuration information; the database operation includes: the operation of the to-be-verified version on the first database, and / or, the operation of the verified version on the second database; the processing module 703 is also used to extract the operation table identifier from the database operation information corresponding to the database operation when intercepting the database operation of the software system. The target comparison information is extracted and recorded from the operation information, the target comparison information includes: a target table identifier, a target primary key identifier and target primary key data, the target table identifier is the operation table identifier; the processing module 703 is also used to read the target data record corresponding to the target comparison information from the target database, the target database includes a first database and a second database, the target data record includes: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database; the processing module 703 is also used to compare the first data record and the second data record as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed, and when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

[0138] A verification device for a software system provided in an embodiment of the present application can be used to execute the technical solution of a verification method for a software system in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0139] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the interception module 701 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above interception module 701. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0140] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include: a transceiver 801 , a processor 802 and a memory 803 .

[0141] The processor 802 executes the computer execution instructions stored in the memory, so that the processor 802 executes the scheme in the above embodiment. The processor 802 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0142] The memory 803 is connected to the processor 802 via a system bus and implements communication therebetween. The memory 803 is used to store computer program instructions.

[0143] The transceiver 801 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0144] The system bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries).

[0145] The memory may include a random access memory (RAM) and may also include a non-volatile memory (VNM).

[0146] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of a verification method for a software system in the above embodiment.

[0147] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of a verification method for a software system in the above embodiment.

[0148] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of a verification method for a software system in the above embodiment.

[0149] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0150] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0151] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0152] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0153] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0154] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0155] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A software system verification method, characterized in that: include: Under the same operating environment, the verified version of the software system is run in an interface-operable manner and the version to be verified of the software system is run in an interface-locked manner, and the first interface operation of the verified version is intercepted; Mapping the first interface operation to the second interface operation of the verified version, so as to forward the second interface operation to the version to be verified; When a database operation of the software system is intercepted, an operation table identifier is extracted from database operation information corresponding to the database operation, and the operation table identifier is matched with a preset table identifier in the configuration information; the database operation includes: the operation of the version to be verified on the first database, and / or the operation of the verified version on the second database; If the preset table identifier and the operation table identifier match, extracting and recording target comparison information from the database operation information, the target comparison information including: the target table identifier, the target primary key identifier and the target primary key data, the target table identifier being the operation table identifier; Reading a target data record corresponding to the target comparison information from a target database, the target database including the first database and the second database, the target data record including: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database; The first data record and the second data record are compared as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed; when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

2. The method according to claim 1, characterized in that The step of reading the target data record corresponding to the target comparison information from the target database includes: Extracting a preset comparison period of the target table identifier from the configuration information, wherein the preset comparison period is used to indicate a comparison period of data in the target table identifier; The target data record corresponding to the target comparison information is read from the target database according to the preset comparison period.

3. The method according to claim 2, characterized in that The configuration information also includes: a preset field identifier corresponding to the target table identifier, the preset field identifier is used to indicate a field to be compared in the data table corresponding to the target table identifier, and the comparison of the first data record and the second data record as the verification result of the version to be verified includes: Acquire first field data corresponding to the preset field identifier from the first data record; Acquire second field data corresponding to the preset field identifier from the second data record; The first field data and the second field data are compared as a verification result of the version to be verified.

4. The method according to claim 3, characterized in that The configuration information also includes: a preset format conversion rule corresponding to the preset field identifier, and the comparison of the first field data and the second field data as the verification result of the version to be verified includes: If the first field data and the second field data correspond to different formats, converting the first field data and the second field data into the same format according to the preset format conversion rule; The first field data and the second field data having the same format are compared as the verification result of the version to be verified.

5. The method according to any one of claims 1 to 4, characterized in that The step of running the verified version of the software system in an interface-operable manner includes: Extracting database call statements from the verified version of software code; Determine the software interface where the database call statement is located; Recursively analyzing upstream from the software interface in the interface call link of the verified version to obtain the most upstream business interface that calls the software interface; The first interface control corresponding to the most upstream business interface is displayed on the operational interface of the verified version, and the second interface controls other than the first interface control are grayed out.

6. The method according to claim 5, characterized in that The extracting the target comparison information from the database operation information comprises: Extracting the operation field identifier from the database operation information; If the operation field identifier is the preset field identifier, the target comparison information is extracted from the database operation information.

7. The method according to any one of claims 1 to 3, characterized in that: Get pre-recorded target comparison information, including: After reading data from a pre-generated comparison information storage file as the target comparison information, the data in the comparison information storage file is deleted.

8. A verification device for a software system, characterized in that: include: An interception module, used to run the verified version of the software system in an interface-operable manner and the version to be verified of the software system in an interface-locked manner under the same operating environment, and intercept the first interface operation of the verified version; A sending module, configured to map the first interface operation to a second interface operation of the verified version, so as to forward the second interface operation to the version to be verified; a processing module, configured to extract an operation table identifier from database operation information corresponding to the database operation when intercepting a database operation of the software system, and match the operation table identifier with a preset table identifier in the configuration information; the database operation includes: an operation of the version to be verified on the first database, and / or an operation of the verified version on the second database; The processing module is further configured to extract and record target comparison information from the database operation information if the preset table identifier matches the operation table identifier, the target comparison information including: the target table identifier, the target primary key identifier and the target primary key data, the target table identifier being the operation table identifier; The processing module is further used to read the target data record corresponding to the target comparison information from the target database, the target database includes the first database and the second database, and the target data record includes: a first data record corresponding to the target comparison information in the first database, and a second data record corresponding to the target comparison information in the second database; The processing module is also used to compare the first data record and the second data record as the verification result of the version to be verified. When the first data record and the second data record are consistent, the verification result of the version to be verified is verification passed; when the first data record and the second data record are inconsistent, the verification result of the version to be verified is verification failed.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.

Citation Information

Patent Citations

  • Data verification method and device, electronic equipment and storage medium

    CN116108017A

  • Database transformation method and device, equipment, storage medium and program product

    CN116483806A

  • Data table verification method and device, equipment, storage medium and program product

    CN117251430A

  • Database version management method and device, computing equipment and storage medium

    CN117349258A

  • Data migration verification method and system, electronic equipment and storage medium

    CN118445266A