Financial system testing method, device, equipment and storage medium

By positioning the production system, obtaining data and desensitizing it in the financial system testing method, the problems of inefficiency in the financial system testing and data security are solved, and an efficient and safe test environment connection is achieved.

CN113918467BActive Publication Date: 2025-04-25PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111268163.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-04-25
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

Financial system testing is inefficient, and obtaining data for testing in a production environment will lead to information leakage and affect the protection of user information.

Method used

In the financial system testing method, after receiving the test request, determine the test system, extract the test fields of the module to be tested, locate the associated production system, obtain production data, and desensitize the sensitive data, and finally perform test processing based on the desensitization data.

Benefits of technology

It realizes the docking between the production environment and the test environment, improves the efficiency of the test data provision, ensures data security, and avoids the leakage of sensitive data, thereby doublely improving the testing efficiency of the financial system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918467B_ABST
    Figure CN113918467B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence, and provides a financial system testing method, device, equipment and storage medium. The method can determine the test system according to the test request when receiving a test request; extract the test field from the test system according to the module to be tested of the test system; locate the production system associated with the test system according to the module to be tested; obtain production data from the production system according to the test field; perform duplicate information detection on the production data to obtain a test result; construct a desensitization list according to the test result and preset rules; generate desensitized data according to the desensitization list and the production data; perform test processing on the module to be tested based on the desensitized data to obtain a test result, which can not only improve the test efficiency, but also ensure the security of the generated data. In addition, the present invention also relates to blockchain technology, and the test result can be stored in the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of testing technology, and in particular to a financial system testing method, device, equipment and storage medium. Background Art

[0002] In the testing process of financial systems, obtaining a large amount of data in the production environment for simulation testing can better provide feedback on the performance of the financial system. However, due to the isolation between the test environment and the production environment, the data in the production environment cannot be directly imported into the test environment, resulting in low testing efficiency of the financial system. In addition, since the production environment of the financial system usually contains a lot of personal sensitive data, directly using the data in the production environment for testing the financial system will cause information leakage, which is not conducive to the protection of user information. Summary of the invention

[0003] In view of the above, it is necessary to provide a financial system testing method, device, equipment and storage medium, which can not only improve the testing efficiency of the financial system, but also ensure the security of the generated data.

[0004] In one aspect, the present invention provides a financial system testing method, the financial system testing method comprising:

[0005] When receiving a test request, determining a test system according to the test request;

[0006] extracting test fields from the test system according to the module to be tested of the test system;

[0007] Locating a production system associated with the test system according to the module to be tested;

[0008] Acquire production data from the production system according to the test field;

[0009] Performing duplicate information detection on the production data to obtain a detection result;

[0010] Construct a desensitization list according to the detection results and preset rules;

[0011] Generate desensitized data according to the desensitized list and the production data;

[0012] The module to be tested is tested based on the desensitized data to obtain a test result.

[0013] According to a preferred embodiment of the present invention, extracting a test field from the test system according to the module to be tested of the test system comprises:

[0014] Obtaining a target system script and a historical system script of the test system;

[0015] Parsing the target system script to obtain a target syntax tree of the test system, and parsing the historical system script to obtain a historical syntax tree of the test system;

[0016] Compare the target syntax tree with the historical syntax tree to obtain a new script;

[0017] Determine the function point corresponding to the newly added script as the module to be tested;

[0018] Obtaining a module identification code of the module to be tested, and obtaining a field storage list of the test system;

[0019] The test field is screened out from the field storage list according to the module identification code.

[0020] According to a preferred embodiment of the present invention, parsing the target system script to obtain the target syntax tree of the test system includes:

[0021] Detecting whether the script format of the target system script is a preset format;

[0022] If the script format is not the preset format, converting the target system script based on the preset format to obtain a script code having the preset format;

[0023] Performing lexical analysis on the script code to obtain multiple word units;

[0024] Performing grammatical analysis on the multiple word units to obtain preprocessing codes;

[0025] The target syntax tree is constructed according to the preprocessing code.

[0026] According to a preferred embodiment of the present invention, locating a production system associated with the test system according to the module to be tested comprises:

[0027] Obtaining module function information of the module to be tested;

[0028] Extracting key information from the module function information;

[0029] Based on the key information, the preset information in the preset list is traversed, and the system corresponding to the preset information that successfully matches the key information is determined as the feature system;

[0030] A historical version system of the feature system is obtained, and the feature system and the historical version system are determined as the production system.

[0031] According to a preferred embodiment of the present invention, performing duplicate information detection on the production data to obtain a detection result includes:

[0032] Building a data set based on production data of the same test field to obtain a feature data set for each test field, wherein the feature data set includes a plurality of feature elements;

[0033] For each feature element, determining the feature data set where the feature element is located as a target set;

[0034] Comparing other elements in the target set with the characteristic element;

[0035] When it is detected that all other elements in the target set are different from the characteristic element, the detection result is determined as the test field corresponding to the characteristic element being a sensitive field.

[0036] According to a preferred embodiment of the present invention, the preset rule is a preset ratio, and constructing a desensitization list according to the detection result and the preset rule includes:

[0037] Obtaining setting information of the sensitive field;

[0038] Performing vectorization processing on the setting information to obtain an information vector;

[0039] Counting the number of elements of the information vector;

[0040] Calculate the product of the number of elements and the preset ratio to obtain the occlusion number;

[0041] Performing occlusion processing on the information vector based on the occlusion quantity to obtain occlusion information corresponding to the information vector;

[0042] The desensitization list is constructed according to the mapping relationship between the sensitive field, the information vector and the shielding information.

[0043] According to a preferred embodiment of the present invention, the testing process of the module to be tested based on the desensitized data to obtain the test result includes:

[0044] Running the desensitized data based on the module to be tested to obtain an operation result;

[0045] Acquire an execution result corresponding to the production data from the production system;

[0046] comparing the operation result with the execution result;

[0047] If the running result is the same as the execution result, the test result is determined as the module to be tested passing the test; or

[0048] If the running result is different from the execution result, the test result is determined as the module to be tested failing the test.

[0049] On the other hand, the present invention further provides a financial system testing device, the financial system testing device comprising:

[0050] a determination unit, configured to determine a test system according to a test request when a test request is received;

[0051] An extraction unit, configured to extract a test field from the test system according to a module to be tested of the test system;

[0052] A positioning unit, used for locating a production system associated with the test system according to the module to be tested;

[0053] an acquisition unit, configured to acquire production data from the production system according to the test field;

[0054] A detection unit, used to perform duplicate information detection on the production data to obtain a detection result;

[0055] A construction unit, used to construct a desensitization list according to the detection results and preset rules;

[0056] A generating unit, configured to generate desensitized data according to the desensitized list and the production data;

[0057] The testing unit is used to perform testing on the module to be tested based on the desensitized data to obtain a test result.

[0058] On the other hand, the present invention further provides an electronic device, comprising:

[0059] a memory storing computer readable instructions; and

[0060] A processor executes the computer-readable instructions stored in the memory to implement the financial system testing method.

[0061] On the other hand, the present invention further proposes a computer-readable storage medium, in which computer-readable instructions are stored. The computer-readable instructions are executed by a processor in an electronic device to implement the financial system testing method.

[0062] It can be seen from the above technical solutions that the present invention locates the production system associated with the test system through the module to be tested, and then obtains the production data from the production system according to the test field, and desensitizes the production data, and finally uses the desensitized data after desensitization to test the module to be tested, which can realize the docking of the production environment and the test environment, and effectively improve the efficiency of providing data during the test process. At the same time, since there is no need to capture and analyze all the field data in the production system, only the data corresponding to the extracted test field needs to be captured and analyzed, which can further improve the efficiency of providing data during the test process, thereby doubly improving the test efficiency of the financial system. In addition, since sensitive data has the characteristic of uniqueness, by performing repeated information detection and analysis on the production data, it is possible to accurately determine the sensitive fields that need to be desensitized, so that a comprehensive desensitization list can be constructed, and the production data is further desensitized based on the desensitization list, which can avoid the leakage of sensitive data when the module to be tested is tested, and ensure the security of the production data. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a flow chart of a preferred embodiment of the financial system testing method of the present invention.

[0064] Figure 2 It is a functional module diagram of a preferred embodiment of the financial system testing device of the present invention.

[0065] Figure 3 It is a schematic diagram of the structure of an electronic device of a preferred embodiment of the financial system testing method of the present invention. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] like Figure 1 FIG. 1 is a flowchart of a preferred embodiment of the financial system testing method of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0068] The financial system testing method can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0069] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0070] The financial system testing method is applied to one or more electronic devices, which are devices that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions, and whose hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0071] The electronic device may be any electronic product that can perform human-computer interaction with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0072] The electronic device may include a network device and / or a user device. The network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of multiple network electronic devices, or a cloud consisting of a large number of hosts or network electronic devices based on cloud computing.

[0073] The network where the electronic device is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0074] S10: When a test request is received, a test system is determined according to the test request.

[0075] In at least one embodiment of the present invention, the test request may be triggered and generated when the financial system is developed. The information carried in the test request includes, but is not limited to: system code and the like.

[0076] The test system refers to a system that needs to perform software testing. For example, the test system may be a financial system.

[0077] In at least one embodiment of the present invention, the electronic device determining the test system according to the test request comprises:

[0078] Parsing the message of the test request to obtain data information carried in the message;

[0079] Extracting information corresponding to a preset tag from the data information as the system code;

[0080] A system corresponding to the system code is determined as the test system.

[0081] The preset label is used to indicate the system code, for example, the preset label may be num.

[0082] The system code refers to a code that can uniquely identify the test system.

[0083] The test system can be accurately identified by the system code.

[0084] S11, extracting test fields from the test system according to the modules to be tested of the test system.

[0085] In at least one embodiment of the present invention, the module to be tested refers to a specific module in the test system that needs to be tested, and the module to be tested may be a newly added module in the test system.

[0086] The test field refers to a field included in the module to be tested. For example, the test field may include: identity card number, bank card number, etc.

[0087] In at least one embodiment of the present invention, the electronic device extracting a test field from the test system according to the module to be tested of the test system comprises:

[0088] Obtaining a target system script and a historical system script of the test system;

[0089] Parsing the target system script to obtain a target syntax tree of the test system, and parsing the historical system script to obtain a historical syntax tree of the test system;

[0090] Compare the target syntax tree with the historical syntax tree to obtain a new script;

[0091] Determine the function point corresponding to the newly added script as the module to be tested;

[0092] Obtaining a module identification code of the module to be tested, and obtaining a field storage list of the test system;

[0093] The test field is screened out from the field storage list according to the module identification code.

[0094] The target system script refers to a development script in the test system that is closest to the generation time of the test request. The historical system script refers to a historical development script in the test system that is closest to the generation time of the target system script. For example, if the target system script is a V3 script of the test system, the historical system script may be a V2 script of the test system.

[0095] The target syntax tree refers to the tree representation of the target system script in the abstract syntax structure. Each node of the target syntax tree represents a structure of the target system script.

[0096] The field storage list stores mapping relationships between multiple modules and fields in the test system.

[0097] Constructing the target syntax tree through the target system script and constructing the historical syntax tree through the historical system script is beneficial to the comparison between the target syntax tree and the historical syntax tree, thereby improving the efficiency of determining the new script, and then the test field can be accurately obtained according to the module identification code.

[0098] Specifically, the electronic device parses the target system script to obtain the target syntax tree of the test system, including:

[0099] Detecting whether the script format of the target system script is a preset format;

[0100] If the script format is not the preset format, converting the target system script based on the preset format to obtain a script code having the preset format;

[0101] Performing lexical analysis on the script code to obtain multiple word units;

[0102] Performing grammatical analysis on the multiple word units to obtain preprocessing codes;

[0103] The target syntax tree is constructed according to the preprocessing code.

[0104] Among them, the preset format refers to a format that can generate an abstract syntax tree. Since the target system script can be converted into a unified preset format, the present invention does not limit the script format of the target system script. For example, the target system script can be in C language format or JAVA language format, etc.

[0105] By converting the format of the target system script, a unified preset format can be obtained, thereby improving the comprehensiveness of the construction of the target syntax tree. Furthermore, by performing lexical analysis on the script code, the script code can be cut into multiple word units, and further through syntax analysis, the word units can be combined into statements with certain grammar, thereby improving the logic of the preprocessing code and thus improving the accuracy of the construction of the target syntax tree.

[0106] In at least one embodiment of the present invention, the generation method of the historical syntax tree is the same as the generation method of the target syntax tree, which is not described in detail in the present invention.

[0107] S12: Locate a production system associated with the test system according to the module to be tested.

[0108] In at least one embodiment of the present invention, the generation system refers to a system including the same functional points as the module to be tested. For example, the module to be tested can be used for payment, system A includes the payment function, and system B includes the payment function. Therefore, the generation system includes the system A and the system B.

[0109] In at least one embodiment of the present invention, the electronic device locates a production system associated with the test system according to the module to be tested, including:

[0110] Obtaining module function information of the module to be tested;

[0111] Extracting key information from the module function information;

[0112] Based on the key information, the preset information in the preset list is traversed, and the system corresponding to the preset information that successfully matches the key information is determined as the feature system;

[0113] A historical version system of the feature system is obtained, and the feature system and the historical version system are determined as the production system.

[0114] The module function information is used to indicate the specific function of the module to be tested.

[0115] The key information refers to a word that can represent the module function information. The key information belongs to any word in the module function information.

[0116] The preset list includes a mapping relationship between preset information and the system, and the preset information includes a plurality of words for indicating functions, such as payment.

[0117] By extracting key information from the module function information and then traversing the preset list based on the key information, the efficiency and accuracy of determining the feature system can be improved, and then the production system can be comprehensively determined based on the feature system determined from the preset list and the historical version system of the feature system.

[0118] S13, acquiring production data from the production system according to the test field.

[0119] In at least one embodiment of the present invention, the production data refers to data in the production system corresponding to the test field.

[0120] In at least one embodiment of the present invention, the electronic device acquiring the production data from the production system according to the test field comprises:

[0121] Generate a query instruction according to the test field;

[0122] Locating a storage path of data in the production system;

[0123] The query instruction is executed according to the storage path to obtain the production data.

[0124] By directly calling the storage information in the storage path through the query instruction, the production data can be quickly acquired.

[0125] S14, performing duplicate information detection on the production data to obtain a detection result.

[0126] In at least one embodiment of the present invention, the detection result includes: the test field corresponding to the production data is a sensitive field, and the test field corresponding to the production data is not a sensitive field.

[0127] It can be understood that if the production data in the test field is unique, then the test field is a sensitive field, such as an ID number; if the production data in the test field is not unique, then the test field is not a sensitive field, such as a name.

[0128] In at least one embodiment of the present invention, the electronic device performs duplicate information detection on the production data, and obtaining the detection result includes:

[0129] Building a data set based on production data of the same test field to obtain a feature data set for each test field, wherein the feature data set includes a plurality of feature elements;

[0130] For each feature element, determining the feature data set where the feature element is located as a target set;

[0131] Comparing other elements in the target set with the characteristic element;

[0132] When it is detected that all other elements in the target set are different from the characteristic element, the detection result is determined as the test field corresponding to the characteristic element being a sensitive field.

[0133] By comparing each characteristic element with other elements in the characteristic data set where the characteristic element is located, it is possible to comprehensively determine whether there is repeated information in the production data corresponding to each test field, thereby improving the accuracy of the detection result.

[0134] S15, constructing a desensitization list according to the detection results and preset rules.

[0135] In at least one embodiment of the present invention, the desensitization list includes the sensitive field, the information vector corresponding to the sensitive field and the mapping relationship between the shielding information. For example, the sensitive field is: ID card number, the information vector is 20 characters, and the shielding information can be: 00xxxx.

[0136] In at least one embodiment of the present invention, the preset rule is a preset ratio, and the electronic device constructs a desensitization list according to the detection result and the preset rule, including:

[0137] Obtaining setting information of the sensitive field;

[0138] Performing vectorization processing on the setting information to obtain an information vector;

[0139] Counting the number of elements of the information vector;

[0140] Calculate the product of the number of elements and the preset ratio to obtain the occlusion number;

[0141] Performing occlusion processing on the information vector based on the occlusion quantity to obtain occlusion information corresponding to the information vector;

[0142] The desensitization list is constructed according to the mapping relationship between the sensitive field, the information vector and the shielding information.

[0143] The setting information refers to the specific information value corresponding to the sensitive field.

[0144] The occlusion quantity refers to the total number of elements that need to be occluded for the information vector.

[0145] Specifically, the electronic device obtains the occlusion information by randomly replacing vector elements in the information vector with occluding characters.

[0146] By performing vectorization processing on the setting information, an information vector containing only numerical information can be generated, thereby improving the security of the setting information. By performing occlusion processing on the information vector, the security of the setting information can be further improved.

[0147] S16, generating desensitized data according to the desensitized list and the production data.

[0148] In at least one embodiment of the present invention, the desensitized data refers to data generated by replacing sensitive data in the generated data based on the desensitization list.

[0149] In at least one embodiment of the present invention, the electronic device generating the desensitized data according to the desensitized list and the production data includes:

[0150] extracting sensitive data from the production data according to the sensitive field;

[0151] Mapping the sensitive data based on the desensitization list to obtain feature data;

[0152] The sensitive data is replaced in the production data based on the characteristic data to obtain the desensitized data.

[0153] The sensitive data refers to the data in the production data corresponding to the sensitive field.

[0154] By mapping the sensitive data through the desensitizing list, the security of the sensitive data can be improved, and the sensitive data can be replaced according to the characteristic data without re-entering the non-sensitive data in the production data, thereby improving the generation efficiency of the desensitized data.

[0155] S17, testing the module to be tested based on the desensitized data to obtain a test result.

[0156] It should be emphasized that in order to further ensure the privacy and security of the above test results, the above test results can also be stored in a blockchain node.

[0157] In at least one embodiment of the present invention, the test result refers to a result obtained after testing the module to be tested.

[0158] In at least one embodiment of the present invention, the electronic device performs test processing on the module to be tested based on the desensitized data, and obtaining the test result includes:

[0159] Running the desensitized data based on the module to be tested to obtain an operation result;

[0160] Acquire an execution result corresponding to the production data from the production system;

[0161] comparing the operation result with the execution result;

[0162] If the running result is the same as the execution result, the test result is determined as the module to be tested passing the test; or

[0163] If the running result is different from the execution result, the test result is determined as the module to be tested failing the test.

[0164] By analyzing the module to be tested through the desensitized data, the security of the production data can be ensured when the module to be tested is tested.

[0165] It can be seen from the above technical solutions that the present invention locates the production system associated with the test system through the module to be tested, and then obtains the production data from the production system according to the test field, and desensitizes the production data, and finally uses the desensitized data after desensitization to test the module to be tested, which can realize the docking of the production environment and the test environment, and effectively improve the efficiency of providing data during the test process. At the same time, since there is no need to capture and analyze all the field data in the production system, only the data corresponding to the extracted test field needs to be captured and analyzed, which can further improve the efficiency of providing data during the test process, thereby doubly improving the test efficiency of the financial system. In addition, since sensitive data has the characteristic of uniqueness, by performing repeated information detection and analysis on the production data, it is possible to accurately determine the sensitive fields that need to be desensitized, so that a comprehensive desensitization list can be constructed, and the production data is further desensitized based on the desensitization list, which can avoid the leakage of sensitive data when the module to be tested is tested, and ensure the security of the production data.

[0166] like Figure 2 , which is a functional module diagram of a preferred embodiment of the financial system testing device of the present invention. The financial system testing device 11 includes a determination unit 110, an extraction unit 111, a positioning unit 112, an acquisition unit 113, a detection unit 114, a construction unit 115, a generation unit 116 and a test unit 117. The module / unit referred to in the present invention refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and can complete a fixed function, which is stored in the memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0167] When receiving a test request, the determining unit 110 determines a test system according to the test request.

[0168] In at least one embodiment of the present invention, the test request may be triggered and generated when the financial system is developed. The information carried in the test request includes, but is not limited to: system code and the like.

[0169] The test system refers to a system that needs to perform software testing. For example, the test system may be a financial system.

[0170] In at least one embodiment of the present invention, the determining unit 110 determines the test system according to the test request, including:

[0171] Parsing the message of the test request to obtain data information carried in the message;

[0172] Extracting information corresponding to a preset tag from the data information as the system code;

[0173] A system corresponding to the system code is determined as the test system.

[0174] The preset label is used to indicate the system code, for example, the preset label may be num.

[0175] The system code refers to a code that can uniquely identify the test system.

[0176] The test system can be accurately identified by the system code.

[0177] The extraction unit 111 extracts test fields from the test system according to the modules to be tested of the test system.

[0178] In at least one embodiment of the present invention, the module to be tested refers to a specific module in the test system that needs to be tested, and the module to be tested may be a newly added module in the test system.

[0179] The test field refers to a field included in the module to be tested. For example, the test field may include: identity card number, bank card number, etc.

[0180] In at least one embodiment of the present invention, the extracting unit 111 extracts the test field from the test system according to the module to be tested of the test system, including:

[0181] Obtaining a target system script and a historical system script of the test system;

[0182] Parsing the target system script to obtain a target syntax tree of the test system, and parsing the historical system script to obtain a historical syntax tree of the test system;

[0183] Compare the target syntax tree with the historical syntax tree to obtain a new script;

[0184] Determine the function point corresponding to the newly added script as the module to be tested;

[0185] Obtaining a module identification code of the module to be tested, and obtaining a field storage list of the test system;

[0186] The test field is screened out from the field storage list according to the module identification code.

[0187] The target system script refers to a development script in the test system that is closest to the generation time of the test request. The historical system script refers to a historical development script in the test system that is closest to the generation time of the target system script. For example, if the target system script is a V3 script of the test system, the historical system script may be a V2 script of the test system.

[0188] The target syntax tree refers to the tree representation of the target system script in the abstract syntax structure. Each node of the target syntax tree represents a structure of the target system script.

[0189] The field storage list stores mapping relationships between multiple modules and fields in the test system.

[0190] Constructing the target syntax tree through the target system script and constructing the historical syntax tree through the historical system script is beneficial to the comparison between the target syntax tree and the historical syntax tree, thereby improving the efficiency of determining the new script, and then the test field can be accurately obtained according to the module identification code.

[0191] Specifically, the extraction unit 111 parses the target system script to obtain the target syntax tree of the test system including:

[0192] Detecting whether the script format of the target system script is a preset format;

[0193] If the script format is not the preset format, converting the target system script based on the preset format to obtain a script code having the preset format;

[0194] Performing lexical analysis on the script code to obtain multiple word units;

[0195] Performing grammatical analysis on the multiple word units to obtain preprocessing codes;

[0196] The target syntax tree is constructed according to the preprocessing code.

[0197] Among them, the preset format refers to a format that can generate an abstract syntax tree. Since the target system script can be converted into a unified preset format, the present invention does not limit the script format of the target system script. For example, the target system script can be in C language format or JAVA language format, etc.

[0198] By converting the format of the target system script, a unified preset format can be obtained, thereby improving the comprehensiveness of the construction of the target syntax tree. Furthermore, by performing lexical analysis on the script code, the script code can be cut into multiple word units, and further through syntax analysis, the word units can be combined into statements with certain grammar, thereby improving the logic of the preprocessing code and thus improving the accuracy of the construction of the target syntax tree.

[0199] In at least one embodiment of the present invention, the historical syntax tree is generated in the same manner as the target syntax tree, which is not described in detail in the present invention.

[0200] The positioning unit 112 locates a production system associated with the test system according to the module to be tested.

[0201] In at least one embodiment of the present invention, the generation system refers to a system including the same functional points as the module to be tested. For example, the module to be tested can be used for payment, system A includes the payment function, and system B includes the payment function. Therefore, the generation system includes the system A and the system B.

[0202] In at least one embodiment of the present invention, the positioning unit 112 locates the production system associated with the test system according to the module to be tested, including:

[0203] Obtaining module function information of the module to be tested;

[0204] Extracting key information from the module function information;

[0205] Based on the key information, the preset information in the preset list is traversed, and the system corresponding to the preset information that successfully matches the key information is determined as the feature system;

[0206] A historical version system of the feature system is obtained, and the feature system and the historical version system are determined as the production system.

[0207] The module function information is used to indicate the specific function of the module to be tested.

[0208] The key information refers to a word that can represent the module function information. The key information belongs to any word in the module function information.

[0209] The preset list includes a mapping relationship between preset information and the system, and the preset information includes a plurality of words for indicating functions, such as payment.

[0210] By extracting key information from the module function information and then traversing the preset list based on the key information, the efficiency and accuracy of determining the feature system can be improved, and then the production system can be comprehensively determined based on the feature system determined from the preset list and the historical version system of the feature system.

[0211] The acquisition unit 113 acquires production data from the production system according to the test field.

[0212] In at least one embodiment of the present invention, the production data refers to data in the production system corresponding to the test field.

[0213] In at least one embodiment of the present invention, the acquiring unit 113 acquires the production data from the production system according to the test field, including:

[0214] Generate a query instruction according to the test field;

[0215] Locating a storage path of data in the production system;

[0216] The query instruction is executed according to the storage path to obtain the production data.

[0217] By directly calling the storage information in the storage path through the query instruction, the production data can be quickly acquired.

[0218] The detection unit 114 performs duplicate information detection on the production data to obtain a detection result.

[0219] In at least one embodiment of the present invention, the detection result includes: the test field corresponding to the production data is a sensitive field, and the test field corresponding to the production data is not a sensitive field.

[0220] It can be understood that if the production data in the test field is unique, then the test field is a sensitive field, such as an ID number; if the production data in the test field is not unique, then the test field is not a sensitive field, such as a name.

[0221] In at least one embodiment of the present invention, the detection unit 114 performs duplicate information detection on the production data, and the detection result obtained includes:

[0222] Building a data set based on production data of the same test field to obtain a feature data set for each test field, wherein the feature data set includes a plurality of feature elements;

[0223] For each feature element, determining the feature data set where the feature element is located as a target set;

[0224] Comparing other elements in the target set with the characteristic element;

[0225] When it is detected that all other elements in the target set are different from the characteristic element, the detection result is determined as the test field corresponding to the characteristic element being a sensitive field.

[0226] By comparing each characteristic element with other elements in the characteristic data set where the characteristic element is located, it is possible to comprehensively determine whether there is repeated information in the production data corresponding to each test field, thereby improving the accuracy of the detection result.

[0227] The construction unit 115 constructs a desensitization list according to the detection results and preset rules.

[0228] In at least one embodiment of the present invention, the desensitization list includes the sensitive field, the information vector corresponding to the sensitive field and the mapping relationship between the shielding information. For example, the sensitive field is: ID card number, the information vector is 20 characters, and the shielding information can be: 00xxxx.

[0229] In at least one embodiment of the present invention, the preset rule is a preset ratio, and the construction unit 115 constructs the desensitization list according to the detection result and the preset rule, including:

[0230] Obtaining setting information of the sensitive field;

[0231] Performing vectorization processing on the setting information to obtain an information vector;

[0232] Counting the number of elements of the information vector;

[0233] Calculate the product of the number of elements and the preset ratio to obtain the occlusion number;

[0234] Performing occlusion processing on the information vector based on the occlusion quantity to obtain occlusion information corresponding to the information vector;

[0235] The desensitization list is constructed according to the mapping relationship between the sensitive field, the information vector and the shielding information.

[0236] The setting information refers to the specific information value corresponding to the sensitive field.

[0237] The occlusion quantity refers to the total number of elements that need to be occluded for the information vector.

[0238] Specifically, the construction unit 115 obtains the occlusion information by randomly replacing vector elements in the information vector with occluding characters.

[0239] By performing vectorization processing on the setting information, an information vector containing only numerical information can be generated, thereby improving the security of the setting information. By performing occlusion processing on the information vector, the security of the setting information can be further improved.

[0240] The generating unit 116 generates desensitized data according to the desensitized list and the production data.

[0241] In at least one embodiment of the present invention, the desensitized data refers to data generated by replacing sensitive data in the generated data based on the desensitization list.

[0242] In at least one embodiment of the present invention, the generating unit 116 generates the desensitized data according to the desensitized list and the production data, including:

[0243] extracting sensitive data from the production data according to the sensitive field;

[0244] Mapping the sensitive data based on the desensitization list to obtain feature data;

[0245] The sensitive data is replaced in the production data based on the characteristic data to obtain the desensitized data.

[0246] The sensitive data refers to the data in the production data corresponding to the sensitive field.

[0247] By mapping the sensitive data through the desensitizing list, the security of the sensitive data can be improved, and the sensitive data can be replaced according to the characteristic data without re-entering the non-sensitive data in the production data, thereby improving the generation efficiency of the desensitized data.

[0248] The testing unit 117 performs test processing on the module to be tested based on the desensitized data to obtain a test result.

[0249] It should be emphasized that in order to further ensure the privacy and security of the above test results, the above test results can also be stored in a blockchain node.

[0250] In at least one embodiment of the present invention, the test result refers to a result obtained after testing the module to be tested.

[0251] In at least one embodiment of the present invention, the testing unit 117 performs test processing on the module to be tested based on the desensitized data, and the test result obtained includes:

[0252] Running the desensitized data based on the module to be tested to obtain an operation result;

[0253] Acquire an execution result corresponding to the production data from the production system;

[0254] comparing the operation result with the execution result;

[0255] If the running result is the same as the execution result, the test result is determined as the module to be tested passing the test; or

[0256] If the running result is different from the execution result, the test result is determined as the module to be tested failing the test.

[0257] By analyzing the module to be tested through the desensitized data, the security of the production data can be ensured when the module to be tested is tested.

[0258] It can be seen from the above technical solutions that the present invention locates the production system associated with the test system through the module to be tested, and then obtains the production data from the production system according to the test field, and desensitizes the production data, and finally uses the desensitized data after desensitization to test the module to be tested, which can realize the docking of the production environment and the test environment, and effectively improve the efficiency of providing data during the test process. At the same time, since there is no need to capture and analyze all the field data in the production system, only the data corresponding to the extracted test field needs to be captured and analyzed, which can further improve the efficiency of providing data during the test process, thereby doubly improving the test efficiency of the financial system. In addition, since sensitive data has the characteristic of uniqueness, by performing repeated information detection and analysis on the production data, it is possible to accurately determine the sensitive fields that need to be desensitized, so that a comprehensive desensitization list can be constructed, and the production data is further desensitized based on the desensitization list, which can avoid the leakage of sensitive data when the module to be tested is tested, and ensure the security of the production data.

[0259] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device of a preferred embodiment of the financial system testing method of the present invention.

[0260] In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions stored in the memory 12 and executable on the processor 13, such as a financial system testing program.

[0261] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the electronic device 1 may also include input and output devices, network access devices, buses, etc.

[0262] The processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 13 is the computing core and control center of the electronic device 1, and uses various interfaces and lines to connect various parts of the entire electronic device 1, and executes the operating system of the electronic device 1 and various installed applications, program codes, etc.

[0263] Exemplarily, the computer-readable instructions may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into a determination unit 110, an extraction unit 111, a positioning unit 112, an acquisition unit 113, a detection unit 114, a construction unit 115, a generation unit 116, and a test unit 117.

[0264] The memory 12 can be used to store the computer-readable instructions and / or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the memory 12, and calling the data stored in the memory 12. The memory 12 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device, etc. The memory 12 can include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other storage devices.

[0265] The memory 12 may be an external memory and / or an internal memory of the electronic device 1. Furthermore, the memory 12 may be a memory in a physical form, such as a memory stick, a TF card (Trans-flash Card), and the like.

[0266] If the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned various method embodiments can be implemented.

[0267] The computer-readable instructions include computer-readable instruction codes, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM).

[0268] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0269] Combination Figure 1 The memory 12 in the electronic device 1 stores computer-readable instructions to implement a financial system testing method, and the processor 13 can execute the computer-readable instructions to implement:

[0270] When receiving a test request, determining a test system according to the test request;

[0271] extracting test fields from the test system according to the module to be tested of the test system;

[0272] Locating a production system associated with the test system according to the module to be tested;

[0273] Acquire production data from the production system according to the test field;

[0274] Performing duplicate information detection on the production data to obtain a detection result;

[0275] Construct a desensitization list according to the detection results and preset rules;

[0276] Generate desensitized data according to the desensitized list and the production data;

[0277] The module to be tested is tested based on the desensitized data to obtain a test result.

[0278] Specifically, the specific implementation method of the processor 13 for the above-mentioned computer readable instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0279] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0280] The computer-readable storage medium stores computer-readable instructions, wherein the computer-readable instructions are used to implement the following steps when executed by the processor 13:

[0281] When receiving a test request, determining a test system according to the test request;

[0282] extracting test fields from the test system according to the module to be tested of the test system;

[0283] Locating a production system associated with the test system according to the module to be tested;

[0284] Acquire production data from the production system according to the test field;

[0285] Performing duplicate information detection on the production data to obtain a detection result;

[0286] Construct a desensitization list according to the detection results and preset rules;

[0287] Generate desensitized data according to the desensitized list and the production data;

[0288] The module to be tested is tested based on the desensitized data to obtain a test result.

[0289] 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 achieve the purpose of the solution of this embodiment.

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

[0291] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0292] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices mentioned can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0293] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A financial system testing method, characterized in that: The financial system testing method comprises: When receiving a test request, determining a test system according to the test request; Extracting a test field from the test system according to the module to be tested of the test system, wherein the test field is a field included in the module to be tested; Locating the production system associated with the test system according to the module to be tested, including: obtaining module function information of the module to be tested; extracting key information in the module function information; traversing preset information in a preset list based on the key information, and determining the system corresponding to the preset information that successfully matches the key information as a feature system; obtaining a historical version system of the feature system, and determining the feature system and the historical version system as the production system; Acquire production data from the production system according to the test field; Performing duplicate information detection on the production data to obtain a detection result includes: constructing a data set based on the production data of the same test field to obtain a feature data set for each test field, wherein the feature data set includes a plurality of feature elements; for each feature element, determining the feature data set where the feature element is located as a target set; comparing other elements in the target set with the feature element; when it is detected that all other elements in the target set are different from the feature element, determining the detection result as that the test field corresponding to the feature element is a sensitive field; Construct a desensitization list according to the detection results and preset rules; Generate desensitized data according to the desensitized list and the production data; The module to be tested is tested based on the desensitized data to obtain a test result, including: running the desensitized data based on the module to be tested to obtain an operation result; acquiring an execution result corresponding to the production data from the production system; comparing the operation result with the execution result; if the operation result is the same as the execution result, determining the test result as that the module to be tested has passed the test; if the operation result is different from the execution result, determining the test result as that the module to be tested has failed the test.

2. The financial system testing method according to claim 1, characterized in that: The extracting the test field from the test system according to the module to be tested of the test system comprises: Obtaining a target system script and a historical system script of the test system; Parsing the target system script to obtain a target syntax tree of the test system, and parsing the historical system script to obtain a historical syntax tree of the test system; Compare the target syntax tree with the historical syntax tree to obtain a new script; Determine the function point corresponding to the newly added script as the module to be tested; Obtaining a module identification code of the module to be tested, and obtaining a field storage list of the test system; The test field is screened out from the field storage list according to the module identification code.

3. The financial system testing method according to claim 2, characterized in that: The step of parsing the target system script to obtain the target syntax tree of the test system comprises: Detecting whether the script format of the target system script is a preset format; If the script format is not the preset format, converting the target system script based on the preset format to obtain a script code having the preset format; Performing lexical analysis on the script code to obtain multiple word units; Performing grammatical analysis on the multiple word units to obtain preprocessing codes; The target syntax tree is constructed according to the preprocessing code.

4. The financial system testing method according to claim 1, characterized in that: The preset rule is a preset ratio, and constructing a desensitization list according to the detection results and the preset rule includes: Obtaining setting information of the sensitive field; Performing vectorization processing on the setting information to obtain an information vector; Counting the number of elements of the information vector; Calculate the product of the number of elements and the preset ratio to obtain the occlusion number; Performing occlusion processing on the information vector based on the occlusion quantity to obtain occlusion information corresponding to the information vector; The desensitization list is constructed according to the mapping relationship between the sensitive field, the information vector and the shielding information.

5. A financial system testing device, characterized in that: The financial system testing device comprises: a determination unit, configured to determine a test system according to a test request when a test request is received; An extraction unit, configured to extract a test field from the test system according to the module to be tested of the test system, wherein the test field is a field included in the module to be tested; A positioning unit, used to locate the production system associated with the test system according to the module to be tested, including: obtaining module function information of the module to be tested; extracting key information in the module function information; traversing the preset information in the preset list based on the key information, and determining the system corresponding to the preset information that successfully matches the key information as the feature system; obtaining the historical version system of the feature system, and determining the feature system and the historical version system as the production system; an acquisition unit, configured to acquire production data from the production system according to the test field; A detection unit is used to perform duplicate information detection on the production data to obtain a detection result, including: constructing a data set according to the production data of the same test field to obtain a feature data set for each test field, wherein the feature data set includes multiple feature elements; for each feature element, determining the feature data set where the feature element is located as a target set; comparing other elements in the target set with the feature element; when it is detected that all other elements in the target set are different from the feature element, determining the detection result as that the test field corresponding to the feature element is a sensitive field; A construction unit, used to construct a desensitization list according to the detection results and preset rules; A generating unit, configured to generate desensitized data according to the desensitized list and the production data; A testing unit is used to perform test processing on the module to be tested based on the desensitized data to obtain a test result, including: running the desensitized data based on the module to be tested to obtain an operation result; acquiring an execution result corresponding to the production data from the production system; comparing the operation result with the execution result; if the operation result is the same as the execution result, determining the test result as that the module to be tested has passed the test; if the operation result is different from the execution result, determining the test result as that the module to be tested has failed the test.

6. An electronic device, characterized in that: The electronic device comprises: a memory storing computer-readable instructions; and A processor executes the computer-readable instructions stored in the memory to implement the financial system testing method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the financial system testing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Test data acquisition method and device, electronic equipment and medium

    CN111651363A

  • Test data collection method, device, equipment and computer readable storage medium

    CN113282506A