CN116737532A - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116737532A
CN116737532A CN202310213329.5A CN202310213329A CN116737532A CN 116737532 A CN116737532 A CN 116737532A CN 202310213329 A CN202310213329 A CN 202310213329A CN 116737532 A CN116737532 A CN 116737532A
Authority
CN
China
Prior art keywords
result data
target
test
result
hash value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310213329.5A
Other languages
Chinese (zh)
Inventor
胡文涛
罗剑平
陈鹏翼
张先刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310213329.5A priority Critical patent/CN116737532A/en
Publication of CN116737532A publication Critical patent/CN116737532A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a data processing method, apparatus, device, and storage medium, which can be applied to the fields of computer technology and financial science and technology. The method comprises the following steps: executing test operations of a plurality of batches in different test environments by using the test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches; based on the hash function, according to the dependency relationship between the test script and the business process and the association relationship between the business process, a first result data sequence and a second result data sequence of a plurality of batches are obtained by processing the test result of each batch; comparing the first result data sequence with the second result data sequence to obtain a target batch, a first target result data packet and a second target result data packet with different results; and comparing the first target result data packet with the second target result data packet to obtain a target business process with a difference result and a target test script with a dependency relationship with the target business process.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology and financial technology, and more particularly, to a data processing method, apparatus, device, medium, and program product.
Background
The current distributed architecture has a plurality of modules or interfaces, the calling relationship among the modules is complex, and the modification of one bottom layer or middle module can cause the error reporting of other related calling parties.
In the automatic test process, the analysis of the existing comparison test result is generally based on an assertion mechanism, and only the interface abnormal output of the system layer can be obtained. However, in the process of cluster migration and performance optimization, optimization updating is not performed on the service processing logic generally, so that after cluster migration or performance optimization is performed on the data processing platform of the distributed architecture, the conventional test result analysis method cannot determine whether the cluster migration or performance optimization has an influence on the service flow process.
Disclosure of Invention
In view of the foregoing, the present disclosure provides data processing methods, apparatus, devices, media, and program products.
According to a first aspect of the present disclosure, there is provided a data processing method comprising:
executing test operations of a plurality of batches in different test environments by using the test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, wherein the test operations of the plurality of batches are used for simulating business processes in different business scenes;
Based on the hash function, according to the dependency relationship between the test script and the business process and the association relationship between the business process, a first result data sequence of a plurality of batches is obtained by processing the first test result of each batch, and a second result data sequence of a plurality of batches is obtained by processing the second test result of each batch;
comparing the first result data sequence with the second result data sequence to obtain a target batch with a difference in result, and a first target result data packet and a second target result data packet corresponding to the target batch;
and comparing the first target result data packet with the second target result data packet to obtain a target business process with a difference result and a target test script with a dependency relationship with the target business process.
According to an embodiment of the present disclosure, the processing a first test result of each batch according to a dependency relationship between a test script and a business process and an association relationship between business processes based on a hash function to obtain a first result data sequence includes:
constructing a tree according to the dependency relationship between the test script and the business process and the association relationship between the business process; the tree comprises N layers, wherein the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes, N is an integer more than 1 and less than or equal to N, and N is an integer more than 1;
For the test result of each batch, based on a hash function, starting from the nth layer of the tree, sequentially obtaining hash values of the branch nodes of the N-1 th layer according to the test result of the test script corresponding to the branch nodes of the nth layer until obtaining hash values of the root node;
and sequencing the hash values of the root nodes corresponding to each batch according to the batch sequence to obtain the first result data sequence.
According to an embodiment of the present disclosure, the nth layer of branch nodes includes a plurality of branch nodes, the testing result for each batch is based on a hash function, and the step of obtaining hash values of the nth-1 layer of branch nodes sequentially from the nth layer of the tree according to the testing result of the testing script corresponding to the nth layer of branch nodes until obtaining a root node hash value includes:
selecting a target branch node from the plurality of branch nodes according to the association degree of each branch node on the business flow aiming at the N-layer branch node, wherein the target branch node comprises at least two branch nodes of which the association degree meets a preset threshold value;
combining the test results corresponding to the target branch nodes to obtain combined result data;
Processing the combined result data based on a hash function to obtain a hash value of a combined result; processing the other branch nodes of the N layer respectively to obtain hash values of a plurality of discrete results;
and generating the hash value of the N-1 layer branch node according to the hash value of the merging result and the hash values of the plurality of discrete results.
According to an embodiment of the disclosure, the obtaining the target lot information with the difference in the result data by comparing the first result data sequence and the second result data sequence includes:
performing backtracking query processing on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with differences of a plurality of result data;
the target lot information is determined from the candidate lot information in which the plurality of result data are different.
According to an embodiment of the present disclosure, the first result data sequence includes S batches of first result data; the second result data sequence includes second result data of S batches, and the backtracking query processing is performed on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with differences in a plurality of result data, including:
Performing a data comparison operation with respect to the first result data of the s-th lot and the second result data of the s-th lot;
decrementing s and returning to execute the data comparison operation under the condition that the difference exists between the first result data of the s-th batch and the second result data of the s-th batch;
in the case where it is determined that there is no difference between the first result data of the s-th lot and the second result data of the s-th lot, the s+1th lot is determined as target lot information.
According to an embodiment of the present disclosure, by comparing the first result data sequence and the second result data sequence, a target lot having a difference in result data, and a first target result data packet and a second target result data packet corresponding to the target lot are obtained, including:
comparing the first result data sequence with the second result data sequence to obtain a target batch with difference of result data;
and obtaining the first target result data packet from the first result data sequence and the second target result data packet from the second result data sequence according to the target batch.
According to an embodiment of the present disclosure, the first target result data packet includes a first hash value of an N-layer branch node, the second target result data packet includes a second hash value of an N-layer branch node, and the obtaining, by comparing the first target result data packet with the second target result data packet, a target business process in which a difference exists between result data and a target test script in which a dependency relationship exists between the target business process and the target business process includes:
Performing data comparison operation on the first hash value of the nth layer branch node and the second hash value of the nth layer branch node;
under the condition that the first hash value of the n-th layer branch node is determined to be the same as the second hash value of the n-th layer branch node, increasing n, and returning to execute the data comparison operation;
and when the first hash value of the nth layer branch node and the second hash value of the nth layer branch node are the same, determining the service flow corresponding to the nth layer branch node as the target service flow, and determining the test script corresponding to the nth layer branch node as the target test script.
According to an embodiment of the present disclosure, the above data processing method further includes:
acquiring a first hash value of an N-layer branch node from the first target result data packet, and acquiring a second hash value of an N-layer branch node from the second target result data packet;
obtaining a target hash value according to the first hash value of the N-layer branch node and the second hash value of the N-layer branch node;
and determining that a test result corresponding to the second hash value of the n-th layer branch node exists in the first target result data packet when the target hash value is determined to be the same as the first hash value of the root node in the first target result data packet.
A second aspect of the present disclosure provides a data processing apparatus comprising: the system comprises an acquisition module, a test module and a control module, wherein the acquisition module is used for executing test operations of a plurality of batches in different test environments by using test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, and the test operations of the plurality of batches are used for simulating business processes in different business scenes; the processing module is used for processing the first test result of each batch based on the hash function according to the dependency relationship between the test script and the business process and the association relationship between the business process to obtain a first result data sequence of a plurality of batches, and processing the second test result of each batch to obtain a second result data sequence of a plurality of batches; the first determining module is used for obtaining a target batch with a difference in result and a first target result data packet and a second target result data packet corresponding to the target batch by comparing the first result data sequence and the second result data sequence; and the second determining module is used for obtaining a target business process with a difference result and a target test script with a dependency relationship with the target business process by comparing the first target result data packet with the second target result data packet.
According to an embodiment of the present disclosure, a processing module includes a building unit, a first acquisition unit, and a second acquisition unit. The building unit is used for building a tree according to the dependency relationship between the test script and the business process and the association relationship between the business processes; the tree comprises N layers, the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes, wherein N is an integer greater than 1 and less than or equal to N, and N is an integer greater than 1. The first obtaining unit is configured to obtain, for each batch of test results, hash values of the N-1 th layer branch nodes sequentially from the nth layer of the tree based on the hash function according to test results of the test scripts corresponding to the nth layer branch nodes until a root node hash value is obtained. And the second acquisition unit is used for sequencing the hash values of the root nodes corresponding to each batch according to the batch sequence to obtain the first result data sequence.
According to an embodiment of the present disclosure, the N-th layer branch node includes a plurality of branch nodes, and the first acquisition unit includes a filtering subunit, a first processing subunit, a second processing subunit, and a generating subunit. The screening subunit is configured to select, for an nth layer of branch nodes, a target branch node from the plurality of branch nodes according to a relevance of each branch node on a service flow, where the target branch node includes at least two branch nodes whose relevance meets a predetermined threshold. And the first processing subunit is used for carrying out combination processing on the test results corresponding to the target branch nodes to obtain combination result data. The second processing subunit is used for processing the combined result data based on a hash function to obtain a hash value of the combined result; and processing the other branch nodes of the N layer respectively to obtain hash values of a plurality of discrete results. And the generation subunit is used for generating the hash value of the N-1 layer branch node according to the hash value of the merging result and the hash values of the plurality of discrete results.
According to an embodiment of the disclosure, the first determination module comprises a query unit and a first determination unit. And the query unit is used for performing backtracking query processing on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with difference of a plurality of result data. A first determination unit configured to determine the target lot information from among the candidate lot information in which the plurality of result data are different.
According to an embodiment of the present disclosure, the first result data sequence includes first result data of S batches; the second result data sequence includes second result data of S batches, and the query unit includes a first execution subunit, a second execution subunit and a determination subunit. The first execution subunit is used for executing data comparison operation on the first result data of the s-th batch and the second result data of the s-th batch; a second execution subunit, configured to decrement s and return to execute the data comparison operation when it is determined that there is a difference between the first result data of the s-th lot and the second result data of the s-th lot; a determination subunit configured to determine the (s+1) th lot as target lot information if it is determined that there is no difference between the first result data of the(s) th lot and the second result data of the(s) th lot.
According to an embodiment of the present disclosure, the first determination module includes a comparison unit and an obtaining unit. The comparison unit is used for obtaining a target batch with difference of result data by comparing the first result data sequence with the second result data sequence; and the obtaining unit is used for obtaining the first target result data packet from the first result data sequence and obtaining the second target result data packet from the second result data sequence according to the target batch.
According to an embodiment of the present disclosure, the first target result data packet includes a first hash value of an N-layer branch node, the second target result data packet includes a second hash value of the N-layer branch node, and the second determining module includes a first executing unit, a second executing unit, and a second determining unit. The first execution unit is used for executing data comparison operation on the first hash value of the nth layer branch node and the second hash value of the nth layer branch node; the second execution unit is used for increasing n and returning to execute the data comparison operation under the condition that the first hash value of the nth layer branch node is determined to be the same as the second hash value of the nth layer branch node; and a second determining unit configured to determine, when it is determined that the first hash value of the n-th layer branch node is the same as the second hash value of the n-th layer branch node, a service flow corresponding to the n-th layer branch node as the target service flow, and a test scenario corresponding to the n-th layer branch node as the target test scenario.
According to an embodiment of the present disclosure, the second determining module further includes a third acquiring unit, a fourth acquiring unit, and a third determining unit. A third obtaining unit, configured to obtain a first hash value of an N-layer branch node from the first target result data packet, and obtain a second hash value of an N-layer branch node from the second target result data packet; a fourth obtaining unit, configured to obtain a target hash value according to the first hash value of the N-layer branch node and the second hash value of the N-layer branch node; and a third determining unit configured to determine that a test result corresponding to the second hash value of the n-th layer branch node exists in the first target result packet, in a case where it is determined that the target hash value is the same as the first hash value from the root node in the first target result packet.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the data processing method, the device, the equipment, the medium and the program product provided by the disclosure, a plurality of batches of test operations are executed in different test environments by using test data, so that a plurality of batches of first test results and a plurality of batches of second test results are obtained; based on the hash function, obtaining a first result data sequence and a second result data sequence of a plurality of batches according to the dependency relationship between the test script and the business process and the association relationship between the business process; comparing the first result data sequence with the second result data sequence to obtain a target batch with a difference in result, and a first target result data packet and a second target result data packet corresponding to the target batch; and comparing and analyzing the first target result data packet and the second target result data packet to obtain a target business process with difference results and a target test script with a dependency relationship with the target business process. The first result data sequence and the second result data sequence are obtained according to the dependence relationship between the test script and the business process and the association relationship between the business process, so that the association between the test result and the business process is realized, the problem that the interface abnormal output of the system layer can only be detected generally in the related technology is at least partially solved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a data processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a data processing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a hierarchical example diagram of test scripts for a data processing method according to an embodiment of the present disclosure;
FIG. 4 schematically shows a flow chart for obtaining a first result data sequence;
FIG. 5 schematically illustrates a hash binary tree timing diagram of test data according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of a data processing apparatus according to an embodiment of the present disclosure; and
fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a data processing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
In the automatic test process, the analysis of the existing comparison test result is generally based on an assertion mechanism, and only the interface abnormal output of the system layer can be obtained. However, in the process of cluster migration and performance optimization, optimization updating is not performed on the service processing logic generally, so that after cluster migration or performance optimization is performed on the data processing platform of the distributed architecture, the conventional test result analysis method cannot determine whether the cluster migration or performance optimization has an influence on the service flow process.
The embodiment of the disclosure provides a data processing method, which comprises the following steps: executing test operations of a plurality of batches in different test environments by using the test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, wherein the test operations of the plurality of batches are used for simulating business processes in different business scenes; based on the hash function, according to the dependency relationship between the test script and the business process and the association relationship between the business process, a first result data sequence of a plurality of batches is obtained by processing the first test result of each batch, and a second result data sequence of a plurality of batches is obtained by processing the second test result of each batch; obtaining a target batch with a difference in result and a first target result data packet and a second target result data packet corresponding to the target batch by comparing the first result data sequence with the second result data sequence; and comparing the first target result data packet with the second target result data packet to obtain a target business process with a difference result and a target test script with a dependency relationship with the target business process.
Fig. 1 schematically illustrates an application scenario diagram of a data processing method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the data processing method provided in the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The data processing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the data processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The data processing method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 5 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a data processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the data processing method of this embodiment includes operations S210 to S240.
In operation S210, a plurality of batches of test operations are performed in different test environments using the test data to obtain a plurality of batches of first test results and a plurality of batches of second test results, where the plurality of batches of test operations are used to simulate business processes in different business scenarios.
According to the embodiment of the disclosure, when financial business is processed, business scenes are numerous, business types are numerous, and business processing flow is complex. In the testing process, testing data are utilized to execute testing operations of a plurality of batches in different testing environments, and the testing operations of the plurality of batches simulate business processes in different business scenes, so that a first testing result of the plurality of batches and a second testing result of the plurality of batches are obtained.
According to the embodiment of the disclosure, in the process that test data execute test operations of a plurality of batches in different test environments, key information fields can be marked in the test data, the key information fields comprise states, error codes, message codes and the like, and a system and service error reporting information of an operation result can be marked. And the automatic testing tool packages the output result marked with the key information field into a result data segment, so that a testing result is obtained.
According to embodiments of the present disclosure, the basic data of different test environments, such as various parameters, price data, account data, customer information data, etc., are synchronized to the same value to ensure the rationality of the result data comparison.
According to an embodiment of the present disclosure, the test results include a first test result of a plurality of lots and a second test result of a plurality of lots. The first test result is a test execution result, and the second test result is a comparison verification result.
In operation S220, based on the hash function, according to the dependency relationship between the test script and the business process and the association relationship between the business process, the first result data sequences of the plurality of batches are obtained by processing the first test result of each batch, and the second result data sequences of the plurality of batches are obtained by processing the second test result of each batch.
According to an embodiment of the present disclosure, before testing, a test script is layered according to a dependency relationship between the test script and a business process and an association relationship between the business process, and the layered relationship is stored in a cache in a data structure form of a tree to construct a hash binary tree.
FIG. 3 schematically illustrates a hierarchical example diagram of test scripts for a data processing method according to an embodiment of the present disclosure.
Specifically, as shown in fig. 3, layer 0 represents what batch of all test scripts run in a certain test environment, where the test scripts include multiple service systems, different service types of a certain service system, different service stages under a certain service type, and automatic test step scripts under a certain service stage; layers 1-4 represent a hierarchical type of service a; the nth layer represents other hierarchical types of other traffic.
Wherein, the layer 1 is a plurality of service systems; the layer 2 is a plurality of service types respectively corresponding to the systems; the layer 3 is a plurality of business stages corresponding to a plurality of business types in the layer 2, the layer 4 is a plurality of business processes corresponding to a plurality of business stages in the layer 3, and the data segment is a data result a, b, c, d, e corresponding to each business process of the layer 4.
According to the embodiment of the disclosure, the data segment corresponding hierarchy is flexibly adjusted according to the dependency relationship between the test script and the business process and the association relationship between the business processes.
According to the embodiment of the disclosure, a hash binary tree constructed according to the dependency relationship between the test script and the business process and the association relationship between the business process is used for obtaining a first result data sequence of a plurality of batches by processing the first test result of each batch based on a hash function, and obtaining a second result data sequence of a plurality of batches by processing the second test result of each batch.
For example: the hash value of the 1 st batch operation is transmitted to the 2 nd batch for carrying out hash to obtain a hash value 2, then the hash value of the 2 nd batch and the hash value 2 are transmitted to the 3 rd batch for carrying out hash to obtain a hash value 3, and the hash values are sequentially transmitted.
In operation S230, a target lot having a difference in result and a first target result packet and a second target result packet corresponding to the target lot are obtained by comparing the first result data sequence and the second result data sequence.
According to an embodiment of the present disclosure, a target lot having a difference in results is obtained by comparing a first result data sequence and a second result data sequence, thereby determining a target lot having an abnormality, so as to analyze a first target result data packet and a second target result data packet of the target lot having the abnormality.
In operation S240, the target business process with the difference in result and the target test script with the dependency relationship with the target business process are obtained by comparing the first target result data packet with the second target result data packet.
According to the embodiment of the disclosure, testing data are utilized to execute testing operations of a plurality of batches in different testing environments, and a first testing result of the plurality of batches and a second testing result of the plurality of batches are obtained; based on the hash function, obtaining a first result data sequence and a second result data sequence of a plurality of batches according to the dependency relationship between the test script and the business process and the association relationship between the business process; comparing the first result data sequence with the second result data sequence to obtain a target batch with a difference in result, and a first target result data packet and a second target result data packet corresponding to the target batch; and comparing and analyzing the first target result data packet and the second target result data packet to obtain a target business process with difference results and a target test script with a dependency relationship with the target business process. The first result data sequence and the second result data sequence are obtained according to the dependence relationship between the test script and the business process and the association relationship between the business process, so that the association between the test result and the business process is realized, the problem that only the abnormal output of the interface of the system layer can be detected is at least partially solved, the abnormal target batch can be detected, the target business process in the abnormal target batch and the target test script with the dependence relationship with the target business process can be detected, the abnormal output of the interface of the system layer can not be detected, and the efficiency and the accuracy of the test result are improved.
Fig. 4 schematically shows a flow chart for obtaining a first resulting data sequence.
As shown in fig. 4, the method for obtaining the first result data sequence in this embodiment includes: s410 to S430.
In operation S410, a tree is constructed according to the dependency relationship between the test script and the business process and the association relationship between the business processes; in the tree, the tree comprises N layers, the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes, wherein N is an integer which is more than 1 and less than or equal to N, and N is an integer which is more than 1;
according to the embodiment of the disclosure, the tree is constructed according to the dependency relationship between the test script and the business process and the association relationship between the business process, and the binary tree is constructed in a binary manner in principle, and can also be a partial multi-fork tree. The aim of allowing part of the multi-way tree to exist is to embody the relevance of the script and to locate the problems of the business level and the test division level.
According to an embodiment of the present disclosure, the binary tree is constructed in one-to-one correspondence with the hierarchical structure of the test script. In the tree, the tree comprises N layers, the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, and the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes.
In operation S420, for each batch of test results, based on the hash function, from the nth layer of the tree, hash values of the nth-1 layer branch nodes are sequentially obtained according to test results of the test scripts corresponding to the nth layer branch nodes until the root node hash values are obtained.
Fig. 5 schematically illustrates a hash binary tree timing diagram of test data according to an embodiment of the present disclosure.
According to the embodiment of the disclosure, as shown in fig. 5, N is 4, and for each batch of test results a, b, c, d and e, test result hash values a, b, c, d and e of test scripts corresponding to the 4 th layer of branch nodes are obtained respectively; the binary tree is upward layer by layer, hash values of two branch nodes of a layer 3 are obtained, the hash values are a hash value abc and a hash value de respectively, and the layer 3 is a service stage layer of a service A; the binary tree is upward layer by layer to obtain a hash value abcde of a branch node of a layer 2, the layer 2 is a service type layer of a service A, and the service type hash value abcde of the service A and the service type hash value of the service B form a service system hash value of the service A in the layer 1; in layer 1, the service system hash value of service a and the service system hash value of service C constitute a root node hash value.
In operation S430, the hash values of the root nodes corresponding to each batch are sorted according to the batch order, and a first result data sequence is obtained.
According to an embodiment of the present disclosure, an nth layer of branch nodes includes a plurality of branch nodes, and for each batch of test results, based on a hash function, from an nth layer of a tree, hash values of the nth-1 layer of branch nodes are sequentially obtained according to test results of a test script corresponding to the nth layer of branch nodes until a root node hash value is obtained, including:
for the N-layer branch nodes, selecting a target branch node from a plurality of branch nodes according to the association degree of each branch node on the service flow, wherein the target branch node comprises at least two branch nodes with association degrees meeting a preset threshold;
combining the test results corresponding to the target branch nodes to obtain combined result data;
processing the combined result data based on the hash function to obtain a hash value of the combined result; processing other branch nodes of the N layer respectively to obtain hash values of a plurality of discrete results;
and generating the hash value of the N-1 layer branch node according to the hash value of the merging result and the hash values of the plurality of discrete results.
According to the embodiment of the disclosure, the result b and the result c correspond to the hash value b and the hash value c under the same root respectively, and bifurcation under the same root in two ways is basically a test step script with a large association degree on the business process. The two branch nodes with the association degree meeting the preset threshold value comprise a hash value b and a hash value c, the result b and the result c corresponding to the branch nodes are obtained to be combined with the result b, the combined result data is processed to obtain the hash value of the combined result, and the convenience of layering and constructing the binary tree can be improved.
According to an embodiment of the present disclosure, obtaining target lot information having a difference in result data by comparing a first result data sequence and a second result data sequence, includes:
performing backtracking query processing on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with differences of a plurality of result data;
target lot information is determined from the candidate lot information in which the plurality of result data differ.
According to an embodiment of the present disclosure, the first result data sequence comprises s batches of first result data; the second result data sequence includes second result data of s batches, backtracking query processing is performed on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches, so as to obtain candidate batch information with differences of a plurality of result data, including:
Performing a data comparison operation with respect to the first result data of the s-th lot and the second result data of the s-th lot;
according to an embodiment of the present disclosure, the first result data of the s-th lot includes a root node hash value and a hash value s of the s-th lot; and (3) hashing the first result data packet of the s-th batch again to obtain a hash value s+1 of the s+1st batch, wherein the hash value s+1 and a root node hash value of the s+1st batch form first result data of the s+1st batch, and obtaining a first result data sequence according to the arrangement sequence of the batches.
Specifically, the hash value of the root node running in the 1 st batch and the hash value 1 are hashed again to obtain a hash value 2 and transmitted to the 2 nd batch, then the hash value 3 is obtained by the root node hash value of the 2 nd batch and the hash value 2, and transmitted to the 3 rd batch, and the first result data sequence is obtained according to the arrangement sequence of the batches.
Decrementing s and returning to perform a data comparison operation if it is determined that there is a difference between the first result data of the s-th lot and the second result data of the s-th lot;
in the case where it is determined that there is no difference between the first result data of the s-th lot and the second result data of the s-th lot, the s+1th lot is determined as the target lot information.
According to the embodiment of the disclosure, comparing the first result data sequence with the second result data sequence according to the arrangement sequence of the batches, and comparing the last operation batch, if the operation batches are consistent, the batch is normal; if not, the query is traced back along the batch. In the case where it is determined that there is no difference between the first result data of the s-th lot and the second result data of the s-th lot, the s+1th lot is determined as the target lot information.
According to the embodiment of the disclosure, in the s+1st batch, if the first hash value s+1 is consistent with the second hash value s+1, the root node hash value of the s+1st batch is different, the backtracking inquiry is stopped, the abnormal target batch can be detected, the problem that the abnormal output of the interface of the system layer can only be detected is solved, and the technical effects of improving the efficiency and the accuracy of the test result are realized.
According to an embodiment of the present disclosure, a target lot having a difference in result data, and a first target result data packet and a second target result data packet corresponding to the target lot are obtained by comparing a first result data sequence and a second result data sequence, including:
obtaining a target batch with difference of result data by comparing the first result data sequence with the second result data sequence;
And according to the target batch, obtaining a first target result data packet from the first result data sequence, and obtaining a second target result data packet from the second result data sequence.
According to an embodiment of the present disclosure, a first target result data packet includes a first hash value of an N-layer branch node, a second target result data packet includes a second hash value of the N-layer branch node, and a target business process with a difference in result data and a target test script with a dependency relationship with the target business process are obtained by comparing the first target result data packet and the second target result data packet, including:
performing data comparison operation on the first hash value of the nth layer branch node and the second hash value of the nth layer branch node;
under the condition that the first hash value of the n-layer branch node and the second hash value of the n-layer branch node are the same, increasing n, and returning to execute the data comparison operation;
and under the condition that the first hash value of the n-layer branch node and the second hash value of the n-layer branch node are the same, determining the business flow corresponding to the n-layer branch node as a target business flow, and determining the test script corresponding to the n-layer branch node as a target test script.
According to the embodiment of the disclosure, as shown in fig. 5, if the result C is different from the corresponding result of the verification comparison environment, searching downwards from the root node hash value of the target batch, and if the first service system hash value of the service C is not different from the second service system hash value of the service C, then the service system hash value of the service a is different and searching downwards is continued; if the first service type hash value of the service B and the second service type hash value of the service B are not different, the service type hash value abcde of the service A is different and is continuously searched downwards; if the first hash value de and the second hash value de have no difference, the hash value abc has a difference and continues to search downwards, and the first hash value c and the second hash value c have a difference, so that a test script corresponding to the hash value c of the 5 th layer branch node is determined to be a target test script, and the technical effects of improving the efficiency and the accuracy of a test result are achieved.
According to an embodiment of the present disclosure, a method for obtaining a target business process with a difference in result data and a target test script with a dependency relationship with the target business process, further includes:
acquiring a first hash value of an N-layer branch node from a first target result data packet, and acquiring a second hash value of an N-layer branch node from a second target result data packet;
Obtaining a target hash value according to the first hash value of the N-layer branch node and the second hash value of the N-layer branch node;
in the case where it is determined that the target hash value is the same as the first hash value from the root node in the first target result packet, it is determined that there is a test result corresponding to the second hash value of the n-th layer branch node in the first target result packet.
According to the embodiment of the disclosure, if a result C in a data segment of a first test environment is kept secret, in the first test environment, hash values a and B, a hash value de, a service type hash value of a service B and a service system hash value of a service C in a first target result data packet are extracted; and in the first test environment, extracting a second hash value c of the 4 th layer branch node in the second target result data packet, and calculating the second hash value c layer by layer to obtain a target hash value. The target hash value is the target root node hash value.
According to an embodiment of the present disclosure, in a case where it is determined that the target hash value is the same as the first hash value from the root node in the first target result packet, it is determined that a test result corresponding to the second hash value c of the layer 5 branching node exists in the first target result packet.
Based on the data processing method, the disclosure also provides a data processing device. The device will be described in detail below in connection with fig. 6.
Fig. 6 schematically shows a block diagram of a data processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the data processing apparatus 800 of this embodiment includes an acquisition module 610, a processing module 620, a first determination module 630, and a second determination module 640.
The obtaining module 610 is configured to perform a plurality of batch test operations in different test environments by using the test data, to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, where the plurality of batch test operations are used to simulate business processes in different business scenarios. In an embodiment, the obtaining module 610 may be configured to perform the operation S210 described above, which is not described herein.
The processing module 620 is configured to obtain a first result data sequence of multiple batches by processing a first test result of each batch according to the dependency relationship between the test script and the business process and the association relationship between the business process based on the hash function, and obtain a second result data sequence of multiple batches by performing the above processing on a second test result of each batch. In an embodiment, the processing module 620 may be configured to perform the operation S220 described above, which is not described herein.
The first determining module 630 is configured to obtain a target batch with a difference in results, and a first target result data packet and a second target result data packet corresponding to the target batch by comparing the first result data sequence and the second result data sequence. In an embodiment, the first determining module 630 may be configured to perform the operation S230 described above, which is not described herein.
The second determining module 640 is configured to obtain a target business process with a difference in result and a target test script with a dependency relationship with the target business process by comparing the first target result data packet and the second target result data packet. In an embodiment, the second determining module 640 may be configured to perform the operation S240 described above, which is not described herein.
According to an embodiment of the present disclosure, a processing module includes a building unit, a first acquisition unit, and a second acquisition unit. The building unit is used for building a tree according to the dependency relationship between the test script and the business process and the association relationship between the business processes; the tree comprises N layers, the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes, wherein N is an integer greater than 1 and less than or equal to N, and N is an integer greater than 1. The first obtaining unit is configured to obtain, for each batch of test results, hash values of the N-1 th layer branch nodes sequentially from the nth layer of the tree based on the hash function according to test results of the test scripts corresponding to the nth layer branch nodes until a root node hash value is obtained. And the second acquisition unit is used for sequencing the hash values of the root nodes corresponding to each batch according to the batch sequence to obtain the first result data sequence.
According to an embodiment of the present disclosure, the N-th layer branch node includes a plurality of branch nodes, and the first acquisition unit includes a filtering subunit, a first processing subunit, a second processing subunit, and a generating subunit. The screening subunit is configured to select, for an nth layer of branch nodes, a target branch node from the plurality of branch nodes according to a relevance of each branch node on a service flow, where the target branch node includes at least two branch nodes whose relevance meets a predetermined threshold. And the first processing subunit is used for carrying out combination processing on the test results corresponding to the target branch nodes to obtain combination result data. The second processing subunit is used for processing the combined result data based on a hash function to obtain a hash value of the combined result; and processing the other branch nodes of the N layer respectively to obtain hash values of a plurality of discrete results. And the generation subunit is used for generating the hash value of the N-1 layer branch node according to the hash value of the merging result and the hash values of the plurality of discrete results.
According to an embodiment of the disclosure, the first determination module comprises a query unit and a first determination unit. And the query unit is used for performing backtracking query processing on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with difference of a plurality of result data. A first determination unit configured to determine the target lot information from among the candidate lot information in which the plurality of result data are different.
According to an embodiment of the present disclosure, the first result data sequence includes first result data of S batches; the second result data sequence includes second result data of S batches, and the query unit includes a first execution subunit, a second execution subunit and a determination subunit. The first execution subunit is used for executing data comparison operation on the first result data of the s-th batch and the second result data of the s-th batch; a second execution subunit, configured to decrement s and return to execute the data comparison operation when it is determined that there is a difference between the first result data of the s-th lot and the second result data of the s-th lot; a determination subunit configured to determine the (s+1) th lot as target lot information if it is determined that there is no difference between the first result data of the(s) th lot and the second result data of the(s) th lot.
According to an embodiment of the present disclosure, the first determination module includes a comparison unit and an obtaining unit. The comparison unit is used for obtaining a target batch with difference of result data by comparing the first result data sequence with the second result data sequence; and the obtaining unit is used for obtaining the first target result data packet from the first result data sequence and obtaining the second target result data packet from the second result data sequence according to the target batch.
According to an embodiment of the present disclosure, the first target result data packet includes a first hash value of an N-layer branch node, the second target result data packet includes a second hash value of the N-layer branch node, and the second determining module includes a first executing unit, a second executing unit, and a second determining unit. The first execution unit is used for executing data comparison operation on the first hash value of the nth layer branch node and the second hash value of the nth layer branch node; the second execution unit is used for increasing n and returning to execute the data comparison operation under the condition that the first hash value of the nth layer branch node is determined to be the same as the second hash value of the nth layer branch node; and a second determining unit configured to determine, when it is determined that the first hash value of the n-th layer branch node is the same as the second hash value of the n-th layer branch node, a service flow corresponding to the n-th layer branch node as the target service flow, and a test scenario corresponding to the n-th layer branch node as the target test scenario.
According to an embodiment of the present disclosure, the second determining module further includes a third acquiring unit, a fourth acquiring unit, and a third determining unit. A third obtaining unit, configured to obtain a first hash value of an N-layer branch node from the first target result data packet, and obtain a second hash value of an N-layer branch node from the second target result data packet; a fourth obtaining unit, configured to obtain a target hash value according to the first hash value of the N-layer branch node and the second hash value of the N-layer branch node; and a third determining unit configured to determine that a test result corresponding to the second hash value of the n-th layer branch node exists in the first target result packet, in a case where it is determined that the target hash value is the same as the first hash value from the root node in the first target result packet.
Any of the acquisition module 610, the processing module 620, the first determination module 630, and the second determination module 640 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules, according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the acquisition module 610, the processing module 620, the first determination module 630, and the second determination module 640 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the acquisition module 610, the processing module 620, the first determination module 630 and the second determination module 640 may be at least partially implemented as computer program modules, which when executed, may perform the respective functions.
Fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a data processing method according to an embodiment of the disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. Note that the program may be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 700 may further include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 702 and/or RAM 703 and/or one or more memories other than ROM 702 and RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the item recommendation method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 707, and/or installed from the removable medium 711. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A data processing method, comprising:
executing test operations of a plurality of batches in different test environments by using the test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, wherein the test operations of the plurality of batches are used for simulating business processes in different business scenes;
Based on the hash function, according to the dependency relationship between the test script and the business process and the association relationship between the business process, a first result data sequence of a plurality of batches is obtained by processing the first test result of each batch, and a second result data sequence of a plurality of batches is obtained by processing the second test result of each batch;
obtaining a target batch with a difference in result and a first target result data packet and a second target result data packet corresponding to the target batch by comparing the first result data sequence with the second result data sequence;
and comparing the first target result data packet with the second target result data packet to obtain a target business process with a difference result and a target test script with a dependency relationship with the target business process.
2. The method of claim 1, wherein the obtaining the first result data sequence by processing the first test result of each batch based on the hash function according to the dependency relationship between the test script and the business process and the association relationship between the business process includes:
constructing a tree according to the dependency relationship between the test script and the business process and the association relationship between the business process; the tree comprises N layers, the node of the N-1 layer is connected with a plurality of branch nodes of the N layer, the node of the N-1 layer represents a business process processing stage, the branch nodes of the N layer represent a plurality of business processes in the business process processing stage and test scripts with dependency relations with the business processes, wherein N is an integer greater than 1 and less than or equal to N, and N is an integer greater than 1;
For the test result of each batch, based on a hash function, starting from the nth layer of the tree, sequentially obtaining hash values of the branch nodes of the N-1 th layer according to the test result of the test script corresponding to the branch nodes of the nth layer until obtaining hash values of the root node;
and sequencing the hash values of the root nodes corresponding to each batch according to the batch sequence to obtain the first result data sequence.
3. The method of claim 2, wherein the nth layer of branch nodes includes a plurality of branch nodes, the obtaining hash values of the nth-1 layer of branch nodes based on the hash function from the nth layer of the tree in turn according to test results of the test script corresponding to the nth layer of branch nodes until a root node hash value is obtained includes:
selecting a target branch node from the plurality of branch nodes according to the association degree of each branch node on the business process aiming at the N-layer branch node, wherein the target branch node comprises at least two branch nodes of which the association degree meets a preset threshold value;
combining the test results corresponding to the target branch nodes to obtain combined result data;
Processing the combined result data based on a hash function to obtain a hash value of a combined result; processing other branch nodes of the N layer respectively to obtain hash values of a plurality of discrete results;
and generating the hash value of the N-1 layer branch node according to the hash value of the merging result and the hash values of the plurality of discrete results.
4. The method of claim 1, wherein the obtaining the target lot information with the difference in the result data by comparing the first result data sequence and the second result data sequence comprises:
performing backtracking query processing on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches to obtain candidate batch information with differences of a plurality of result data;
the target lot information is determined from the candidate lot information in which the plurality of result data differ.
5. The method of claim 4, wherein the first sequence of result data comprises first result data of S batches; the second result data sequence includes second result data of S batches, and backtracking query processing is performed on the first result data sequence and the second result data sequence according to the arrangement sequence of the batches, so as to obtain candidate batch information with differences in a plurality of result data, including:
Performing a data comparison operation with respect to the first result data of the s-th lot and the second result data of the s-th lot;
decrementing s and returning to perform the data comparison operation if it is determined that there is a difference between the first result data for the s-th lot and the second result data for the s-th lot;
and determining the (s+1) th batch as target batch information in the case that it is determined that there is no difference between the first result data of the(s) th batch and the second result data of the(s) th batch.
6. The method of claim 1, wherein obtaining a target lot having a difference in result data and a first target result data packet and a second target result data packet corresponding to the target lot by comparing the first result data sequence and the second result data sequence, comprises:
obtaining a target batch with difference of result data by comparing the first result data sequence with the second result data sequence;
and according to the target batch, obtaining the first target result data packet from the first result data sequence, and obtaining the second target result data packet from the second result data sequence.
7. The method of claim 1, wherein the first target result data packet includes a first hash value of an N-layer branch node, the second target result data packet includes a second hash value of an N-layer branch node, and the comparing the first target result data packet with the second target result data packet obtains a target business process with a difference in result data and a target test script with a dependency relationship with the target business process, which includes:
Performing data comparison operation on the first hash value of the nth layer branch node and the second hash value of the nth layer branch node;
under the condition that the first hash value of the n-layer branch node and the second hash value of the n-layer branch node are the same, increasing n, and returning to execute the data comparison operation;
and under the condition that the first hash value of the nth layer branch node and the second hash value of the nth layer branch node are the same, determining the business flow corresponding to the nth layer branch node as the target business flow, and determining the test script corresponding to the nth layer branch node as the target test script.
8. The method of claim 7, further comprising:
acquiring a first hash value of an N-layer branch node from the first target result data packet, and acquiring a second hash value of an N-layer branch node from the second target result data packet;
obtaining a target hash value according to the first hash value of the N-layer branch node and the second hash value of the N-layer branch node;
and determining that a test result corresponding to the second hash value of the n-th layer branch node exists in the first target result data packet under the condition that the target hash value is determined to be the same as the first hash value of the root node in the first target result data packet.
9. A data processing apparatus comprising:
the system comprises an acquisition module, a test module and a control module, wherein the acquisition module is used for executing test operations of a plurality of batches in different test environments by using test data to obtain a first test result of the plurality of batches and a second test result of the plurality of batches, and the test operations of the plurality of batches are used for simulating business processes in different business scenes;
the processing module is used for processing the first test result of each batch based on the hash function according to the dependency relationship between the test script and the business process and the association relationship between the business process to obtain a first result data sequence of a plurality of batches, and processing the second test result of each batch to obtain a second result data sequence of a plurality of batches;
the first determining module is used for obtaining a target batch with difference in results and a first target result data packet and a second target result data packet corresponding to the target batch by comparing the first result data sequence with the second result data sequence; and
and the second determining module is used for obtaining a target business process with a difference result and a target test script with a dependency relationship with the target business process by comparing the first target result data packet with the second target result data packet.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
CN202310213329.5A 2023-03-07 2023-03-07 Data processing method, device, equipment and storage medium Pending CN116737532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310213329.5A CN116737532A (en) 2023-03-07 2023-03-07 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310213329.5A CN116737532A (en) 2023-03-07 2023-03-07 Data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737532A true CN116737532A (en) 2023-09-12

Family

ID=87901855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310213329.5A Pending CN116737532A (en) 2023-03-07 2023-03-07 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737532A (en)

Similar Documents

Publication Publication Date Title
US10552390B2 (en) Root cause analysis of performance problems
US11263207B2 (en) Performing root cause analysis for information technology incident management using cognitive computing
US10318595B2 (en) Analytics based on pipes programming model
CN109933514B (en) Data testing method and device
CN109901987B (en) Method and device for generating test data
US20230078134A1 (en) Classification of erroneous cell data
US20150142786A1 (en) Modification of cloud application service levels based upon document consumption
CN110795331A (en) Software testing method and device
CN116560661A (en) Code optimization method, device, equipment and storage medium
CN111026629A (en) Method and device for automatically generating test script
CN115827122A (en) Operation guiding method and device, electronic equipment and storage medium
CN116737532A (en) Data processing method, device, equipment and storage medium
CN112799797A (en) Task management method and device
CN115190008B (en) Fault processing method, fault processing device, electronic equipment and storage medium
CN116401319B (en) Data synchronization method and device, electronic equipment and computer readable storage medium
CN114996557B (en) Service stability determination method, device, equipment and storage medium
CN114710397B (en) Service link fault root cause positioning method and device, electronic equipment and medium
CN116452208B (en) Method, device, equipment and medium for determining change transaction code
CN113032256B (en) Automated testing method, apparatus, computer system, and readable storage medium
CN116680184A (en) Code scanning method, device, electronic equipment and medium
CN117785205A (en) Data evaluation method, device, electronic equipment and computer readable medium
CN113032256A (en) Automatic test method, device, computer system and readable storage medium
CN117113963A (en) Document difference output method, device, apparatus, medium and program product
CN116975033A (en) Data processing method, device, equipment and storage medium
CN114036936A (en) Address error correction method, apparatus, electronic device, medium, and computer program product

Legal Events

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