CN106803202B - Method and device for extracting transaction records to be tested - Google Patents

Method and device for extracting transaction records to be tested Download PDF

Info

Publication number
CN106803202B
CN106803202B CN201611199162.8A CN201611199162A CN106803202B CN 106803202 B CN106803202 B CN 106803202B CN 201611199162 A CN201611199162 A CN 201611199162A CN 106803202 B CN106803202 B CN 106803202B
Authority
CN
China
Prior art keywords
transaction
record
records
information corresponding
transaction record
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.)
Active
Application number
CN201611199162.8A
Other languages
Chinese (zh)
Other versions
CN106803202A (en
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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201611199162.8A priority Critical patent/CN106803202B/en
Publication of CN106803202A publication Critical patent/CN106803202A/en
Application granted granted Critical
Publication of CN106803202B publication Critical patent/CN106803202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1748De-duplication implemented within the file system, e.g. based on file segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention relates to the field of communication, in particular to a method and a device for extracting a transaction record to be tested, which are used for improving the testing efficiency. In the embodiment of the invention, N transaction records and transaction information in the N transaction records are obtained; n is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; k is an integer greater than or equal to 1 and less than or equal to N; and determining the K transaction records as the transaction records to be tested. Because the duplicate removal operation is carried out on the transaction records with the same service scene in the obtained N transaction records, the transaction records to be tested do not comprise the transaction records with the same service scene, and the transaction records to be tested are tested, so that the problem of repeated testing on the same service scene can be avoided, and the testing efficiency is improved.

Description

Method and device for extracting transaction records to be tested
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for extracting a transaction record to be tested.
Background
With the development of banking transaction, transaction scenes are increasing, such as: the emergence of internet services, new ones may cause the old system to fail to meet new requirements, and therefore, the system needs to be changed; or the upgrading of the hardware system and the change of the running environment of the system need to change the system; however, system changes can affect the business, and therefore, the transaction records need to be tested to facilitate checking whether the system is available.
In the prior art, for the test of transaction records, a parallel test method is used, that is: the transaction records of 1 or several transaction days are selected for playback testing. The test process is as follows: and establishing two sets of simulated new and old production environments in the test environment, playing back the transaction by adopting a tool, combining the required difference analysis result, taking the processing result as the check standard, and comparing and analyzing the processing result in a classification and summary and detail check equivalent mode to verify the correctness of the test result of the transaction in the test environment, thereby achieving the purpose of verifying the new system by using the transaction prototype. The testing method can not determine the coverage rate of the service scene, so that the testing conclusion is not accurate, and the same transaction records can be tested repeatedly, so that the testing work redundancy is high, and the testing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for extracting a transaction record to be tested, which are used for improving the testing efficiency.
The embodiment of the invention provides a method for extracting a transaction record to be tested, which comprises the following steps:
acquiring N transaction records and transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N; and determining the K transaction records as the transaction records to be tested.
Optionally, the obtaining N transaction records and the transaction information of each transaction record in the N transaction records includes: obtaining a plurality of messages corresponding to N transaction records; wherein each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to the transaction main key; matching at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in at least one message corresponding to each transaction record is the same; and aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record.
Optionally, the service scenario information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record; optionally, determining, according to transaction information of each transaction record in the N transaction records, service scenario information corresponding to the transaction record, including: for each transaction record of the N transaction records, performing: determining transaction information corresponding to the transaction key included in the transaction record according to the transaction information of the transaction record; determining the transaction information corresponding to the historical transaction main key of the transaction record under the condition that the transaction information of the transaction record comprises the transaction information corresponding to the historical transaction main key; according to the transaction information corresponding to the transaction main key of the N transaction records and the transaction information corresponding to the historical transaction main key, determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records, and the occurrence time sequence of the transaction record and each transaction record in the M transaction records; wherein M is an integer greater than or equal to zero; determining case descriptions corresponding to the transaction records and the M transaction records according to the transaction information of each transaction record in the transaction records and the transaction information of each transaction record in the M transaction records and the occurrence time sequence of each transaction record in the transaction records and the M transaction records; and distributing case serial numbers for the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
Optionally, determining, from the remaining N-1 transaction records, M transaction records having an association relationship with the transaction record according to the transaction information corresponding to the transaction key of the N transaction records and the transaction information corresponding to the historical transaction key, including: aiming at the nth transaction record in the N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing the following steps: under the condition that the transaction record does not comprise the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an incidence relation; under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record does not comprise the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record is determined to be the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an incidence relation; under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key or the transaction information corresponding to the historical transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation.
Optionally, determining a case description corresponding to the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records and the occurrence time sequence of each transaction record in the transaction record and the M transaction records, including: determining transaction information corresponding to preset transaction elements of each transaction record in the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records; and combining the transaction information corresponding to the preset transaction elements of the transaction record and each of the M transaction records according to the occurrence time sequence of the transaction record and each of the M transaction records to obtain case description corresponding to the transaction record and the M transaction records.
Optionally, performing deduplication operation on multiple transaction records with the same service scenario information in the N transaction records, including: for each transaction record of the N transaction records, performing: and deleting at least one transaction record under the condition that at least one transaction record with the same case description and case serial number as the corresponding transaction record exists.
The embodiment of the invention provides a device for extracting a transaction record to be tested, which comprises:
the acquisition unit is used for acquiring the N transaction records and the transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1; the determining unit is used for determining the business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; determining the K transaction records as transaction records to be tested; the processing unit is used for carrying out duplication elimination operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer of 1 or more and N or less.
Optionally, the obtaining unit is configured to: obtaining a plurality of messages corresponding to N transaction records; wherein each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to the transaction main key; a processing unit to: matching at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in at least one message corresponding to each transaction record is the same; a determination unit configured to: and aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record.
Optionally, the service scenario information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record; a determination unit configured to: for each transaction record of the N transaction records, performing: determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records and the occurrence time sequence of each transaction record in the transaction record and the M transaction records; wherein M is an integer greater than or equal to zero; determining case descriptions corresponding to the transaction records and the M transaction records according to the transaction information of each transaction record in the transaction records and the transaction information of each transaction record in the M transaction records and the occurrence time sequence of each transaction record in the transaction records and the M transaction records; a processing unit to: and distributing case serial numbers for the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
Optionally, the determining unit is configured to: for the nth transaction record in the N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing the following steps: under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key or the transaction information corresponding to the historical transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation.
Optionally, the determining unit is configured to: determining transaction information corresponding to preset transaction elements of each transaction record in the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records; a processing unit to: and combining the transaction information corresponding to the preset transaction elements of the transaction record and each of the M transaction records according to the occurrence time sequence of the transaction record and each of the M transaction records to obtain case description corresponding to the transaction record and the M transaction records.
Optionally, a processing unit for: for each transaction record of the N transaction records, performing: and deleting at least one transaction record under the condition that at least one transaction record with the same case description and case serial number as the corresponding transaction record exists.
In the embodiment of the invention, N transaction records and the transaction information of each transaction record in the N transaction records are obtained; wherein N is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N; determining the K transaction records as transaction records to be tested; because the duplicate removal operation is carried out on the transaction records with the same service scene in the obtained N transaction records, the obtained transaction records to be tested do not include the transaction records with the same service scene, so that the problem of repeated testing on the same service scene can be avoided when the transaction records to be tested are tested, and the testing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that are required to be used in the description of the embodiments will be briefly described below.
Fig. 1 is a schematic flow chart of a method for extracting a transaction record to be tested according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another method for extracting a transaction record to be tested according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a third-party application according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 exemplarily shows a flow chart of an extraction method of a transaction record to be tested, which is provided by an embodiment of the present invention, and as shown in fig. 1, the extraction method of the transaction record to be tested includes the following steps:
step 101, acquiring N transaction records and transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1;
102, determining service scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records;
103, performing duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N;
and step 104, determining the K transaction records as the transaction records to be tested.
In the embodiment of the invention, N transaction records and the transaction information of each transaction record in the N transaction records are obtained; wherein N is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N; determining the K transaction records as transaction records to be tested; because the duplicate removal operation is carried out on the transaction records with the same service scene in the obtained N transaction records, the obtained transaction records to be tested do not include the transaction records with the same service scene, so that the problem of repeated testing on the same service scene can be avoided when the transaction records to be tested are tested, and the testing efficiency is improved.
Optionally, in the embodiment of the present invention, the obtaining N transaction records and the transaction information of each transaction record in the N transaction records includes: obtaining a plurality of messages corresponding to N transaction records; wherein each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to the transaction main key; matching at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in at least one message corresponding to each transaction record is the same; and aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record.
Optionally, in the embodiment of the present invention, details are described by taking 9 transactions as an example.
Suppose that the 9 transactions are: transaction 1: an internet consumption transaction; transaction 2: an internet consumption transaction; transaction 3: an internet consumption transaction; transaction 4: a consumption-reversal transaction for transaction 3; transaction 5: an internet consumption transaction; transaction 6: a consumption hedge transaction for transaction 5; transaction 7: a POS consumption transaction; transaction 8: a POS consumption transaction; transaction 9: POS consumption revocation for transaction 8.
Optionally, the initially acquired transaction information is not a single transaction record, but a plurality of messages corresponding to the transaction record; optionally, each transaction record corresponds to 4 messages, and the 4 messages are respectively an acceptance request message, a card issuing request message, an acceptance response message and a card issuing response message; namely, 36 messages corresponding to 9 transactions are initially acquired; each message comprises transaction transmission time, a device tracking number, an acceptance mechanism code and other transaction information, such as a card issuing mechanism, an acceptance mechanism, a forwarding mechanism, an acceptance transaction type, a card issuing transaction type, a single-double conversion mark, a transaction channel, a transaction type, a merchant type, a transaction medium, a property, a card product, an acceptance response code, a card issuing response code, a purchased product and a product unit price; wherein the device tracking number may uniquely identify the terminal; optionally, the transaction transmission time, the device tracking number and the acceptance mechanism code are used as transaction main keys, and the transaction main keys comprise a transaction main key of the current transaction and a historical transaction main key of the current transaction.
Optionally, unpacking the compressed packets of the obtained 36 messages to obtain 36 unpacked messages; the transaction key can uniquely identify one transaction record, and the 36 messages are matched according to the transaction key; in 36 messages, a message with the same transaction key is determined as a transaction, for example, the transaction information corresponding to the transaction key of the received request message is: the transaction transmission time is 2016.12.15-10:10:10, the system tracking number is 001, and the mechanism code is accepted as 100; and the transaction information corresponding to the transaction key of the card issuing request message, the transaction information corresponding to the transaction key of the accepted response message and the transaction information corresponding to the transaction key of the card issuing response message are all as follows: the transaction transmission time is 2016.12.15-10:10:10, the system tracking number is 001, and the mechanism code is accepted as 100; it can be determined that these four messages correspond to one transaction record, and thus, 36 messages can be determined as 9 transactions.
Optionally, in order to facilitate understanding of the scheme, transaction records corresponding to 9 transactions are presented in a form of a table, and the transaction information is a transaction channel and a transaction type, for example, the transaction main keys 1 to 9 respectively represent transaction information corresponding to the transaction main keys of the transaction records with serial numbers of 1 to 9; the historical transaction main keys 1-9 respectively represent transaction information corresponding to the historical transaction main keys of the transaction records with serial numbers of 1-9; table 1 shows transaction records of 9 transactions matched according to a transaction main key, wherein a serial number represents the sequence of the transaction records stored in table 1, and can be a number or a letter; the message represents 4 messages corresponding to each transaction record, and the messages are represented by 4 messages 1-9 respectively; as shown in table 1.
Table 1 shows 9 transaction records matched according to the transaction key:
Figure BDA0001188668700000081
Figure BDA0001188668700000091
optionally, determining transaction information corresponding to the preset transaction element of each transaction record according to the transaction information of each transaction record; in the embodiment of the invention, the transaction information corresponding to the preset transaction element is taken as the transaction type and the transaction channel as an example for explanation; the more transaction elements are preset, the more accurate the test result according to the K transaction records to be tested is; the 9 transaction records in the table 1 are organized according to the preset transaction elements, and 9 transaction record tables 2 organized according to the preset transaction elements are obtained, as shown in table 2.
Taking the first row in table 1 as an example for introduction, a serial number 1 represents a serial number of the 1 st transaction, a transaction type and a transaction channel are two preset transaction elements, consumption is transaction information corresponding to the transaction type of the 1 st transaction, internet is transaction information corresponding to the transaction channel of the 1 st transaction, a transaction main key 1 is transaction information corresponding to the transaction main key of the 1 st transaction, there is no transaction information corresponding to a historical transaction main key, and 4 message 1 represents 4 message information of the 1 st transaction. And combining the transaction information corresponding to the preset elements in the table 1 to obtain a table 2.
TABLE 2 9 transaction records according to the predefined transaction element combinations
Figure BDA0001188668700000092
Figure BDA0001188668700000101
Alternatively, organizing the transaction records according to the preset transaction elements may be referred to as organizing the transaction records from a lateral dimension.
Optionally, determining, according to transaction information of each transaction record in the N transaction records, service scenario information corresponding to the transaction record, including: for each transaction record of the N transaction records, performing: determining transaction information corresponding to the transaction key included in the transaction record according to the transaction information of the transaction record; determining the transaction information corresponding to the historical transaction main key of the transaction record under the condition that the transaction information of the transaction record comprises the transaction information corresponding to the historical transaction main key; according to the transaction information corresponding to the transaction main key of the N transaction records and the transaction information corresponding to the historical transaction main key, determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records, and the occurrence time sequence of the transaction record and each transaction record in the M transaction records; wherein M is an integer greater than or equal to zero.
Optionally, the manner of determining the association relationship between the transactions may be: according to the transaction information corresponding to the transaction main key of the N transaction records and the transaction information corresponding to the historical transaction main key, M transaction records having an association relation with the transaction record are determined from the rest N-1 transaction records, and the method comprises the following steps: aiming at the nth transaction record in the N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing the following steps: under the condition that the transaction record does not comprise the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an incidence relation; under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record does not comprise the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record is determined to be the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an incidence relation; under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key or the transaction information corresponding to the historical transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation.
The 9 transaction records in table 2 are used as an example to illustrate:
the transaction transmission time, the device tracking number and the accepted institution code are used as transaction main keys, each transaction main key in the transaction main keys 1-9 is different, and the transaction records of the 1 st, the 2 nd, the 3 th, the 5 th, the 7 th and the 8 th transaction records do not comprise the transaction information corresponding to the historical transaction main keys through the table 2; the transaction records of the 4 th, the 6 th and the 9 th comprise transaction information corresponding to the historical transaction main key; and the transaction information corresponding to the historical transaction key 3 included in the 4 th transaction record is the same as the transaction information corresponding to the transaction key 3 included in the 3 rd transaction record, determining that the 3 rd transaction and the 4 th transaction have an association relation; and if the transaction information corresponding to the transaction main key 5 of the 5 th transaction record is the same as the transaction information corresponding to the historical transaction main key 5 of the 6 th transaction record, determining that the 5 th transaction and the 6 th transaction have an association relationship, and determining that the 8 th transaction and the 9 th transaction have an association relationship by the same method.
Optionally, the transactions with the association relationship are divided into a case group, the transaction records without the association relationship are independently divided into a case group, each case group is numbered, and the case groups are represented by corresponding case descriptions; the case group number can be composed of numbers or letters and is used for distinguishing from other case groups, so that the inquiry and extraction of cases are facilitated; a case group including at least one transaction record; case numbers are assigned to the cases in each case group.
Optionally, an implementation method for assigning a case number to each transaction record is as follows: and distributing case serial numbers for the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
For example, in table 2, the 3 rd transaction and the 4 th transaction are a case group, and the case number 1 is assigned to the 3 rd transaction record and the case number 2 is assigned to the 4 th transaction record according to the sequence of the cases; the 5 th transaction and the 6 th transaction are a case group, and the 5 th transaction record is assigned with a case number 1 and the 6 th transaction record is assigned with a case number 2 according to the sequence of the cases; and the 8 th transaction and the 9 th transaction are a case group, and the 8 th transaction record is assigned with a case number 1 and the 9 th transaction record is assigned with a case number 2 according to the sequence of the cases.
Optionally, other transactions without association are individually used as a case group, each group has only one transaction record, and a case number 1 is assigned to each transaction record.
Optionally, determining a case description corresponding to the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records and the occurrence time sequence of each transaction record in the transaction record and the M transaction records, including: determining transaction information corresponding to preset transaction elements of each transaction record in the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records; and combining the transaction information corresponding to the preset transaction elements of the transaction record and each of the M transaction records according to the occurrence time sequence of the transaction record and each of the M transaction records to obtain case description corresponding to the transaction record and the M transaction records.
Optionally, determining case descriptions corresponding to the transaction records and the M transaction records according to the transaction information corresponding to the preset transaction element of each of the transaction records and the M transaction records and the case serial numbers of each of the transaction records and the M transaction records; the case number may be composed of numbers or letters for distinguishing from other cases.
Optionally, the case description is in the form of "a + B", where a represents a predefined element of the last transaction record of the case group, and B represents a predefined element of the current transaction record of the group, such as: the preset element of the 3 rd transaction is internet consumption, the preset element of the 4 th transaction is internet consumption revocation, the case serial number of the 3 rd transaction is 1, the case serial number of the 4 th transaction is 2, namely, the 4 th transaction is the preset element of the last transaction of the case group; therefore, the case description of the 3 rd transaction can be internet consumption revocation + internet consumption, and the case description of the 4 th transaction can be internet consumption revocation + internet consumption revocation; in the same way, it can be determined that the case descriptions of the related transactions item 5 and 6 are: "internet consumption is rushing to be positive + internet consumption" and "internet consumption is rushing to be positive + internet consumption"; determining that the case descriptions of the related transactions item 8 and 9 are respectively: "POS consumption cancellation + POS consumption" and "POS consumption cancellation + POS consumption cancellation".
Optionally, for a transaction record without an association relationship, the case describes transaction information corresponding to the preset transaction element of the transaction record.
Taking the first row in table 1 as an example for introduction, a serial number 1 represents a serial number of the 1 st transaction, a transaction type and a transaction channel are two preset transaction elements, consumption is transaction information corresponding to the transaction type of the 1 st transaction, internet is transaction information corresponding to the transaction channel of the 1 st transaction, a transaction main key 1 is transaction information corresponding to the transaction main key of the 1 st transaction, there is no transaction information corresponding to a historical transaction main key, and 4 message 1 represents 4 message information of the 1 st transaction. And combining the transaction information corresponding to the preset elements in the table 1 to obtain a table 2.
In the embodiment of the present invention, 9 transaction records in table 2 are grouped, preset elements in table 2 are combined to obtain table 3, and table 3 exemplarily shows an indication table after 9 transactions are grouped. The description is given by taking a first behavior example in table 3, where a serial number 1 represents a serial number of a 1 st transaction, case description represents a combination of preset transaction elements of the 1 st transaction, a case group number 1 represents a case number of a first case group, the case number 1 represents a 1 st transaction record in the 1 st case group, internet is transaction information corresponding to a transaction channel of the 1 st transaction, a transaction main key 1 is transaction information corresponding to a transaction main key of the 1 st transaction, there is no transaction information corresponding to a historical transaction main key, and 4 messages 1 represent 4 message information of the 1 st transaction. And combining the transaction information corresponding to the preset elements in the table 2, increasing or decreasing the case group numbers, and allocating case serial numbers to the transaction records in each case group to obtain a table 3.
Table 3 grouping 9 transaction records
Figure BDA0001188668700000141
Optionally, performing deduplication operation on multiple transaction records with the same service scenario information in the N transaction records, including: for each transaction record of the N transaction records, performing: and deleting at least one transaction record under the condition that at least one transaction record with the same case description and case serial number as the corresponding transaction record exists.
Optionally, the service scenario information corresponding to each transaction record in the N transaction records includes: a case description and a case number for each transaction record.
Alternatively, the case description and case number are used as primary keys, and since the value of a primary key is used to uniquely identify a record in a table, there is only one primary key in a table, and if a primary key is established in other fields, the original primary key is cancelled. The business scenario corresponding to each transaction record comprises the case description and the case serial number of each transaction record, namely, the business scenario is used as a main key, and when the business scenario is used as the main key for storage, the same business scenario conflicts with the previous main key when the main key is used for storage for the second time, so that the second-time business scenario is deleted; therefore, repeated service scenes cannot be repeatedly tested, and the testing efficiency can be improved.
Optionally, taking table 3 as an example to illustrate that the service scenario of the 1 st transaction is "internet consumption and 1", and the service scenario of the 2 nd transaction is "internet consumption and 1", so that the service scenario of the 1 st transaction is the same as the service scenario of the 2 nd transaction, when the service scenario of the 2 nd transaction is stored, a primary key conflict occurs, and the service scenario of the 2 nd transaction is discarded. Therefore, the same service scene is only stored once, so that the same service scene cannot be tested repeatedly, and the testing efficiency can be improved. In table 3, except that the service scenario of the 2 nd transaction conflicts with the service scenario of the 1 st transaction, only one service scenario exists for all the other transaction scenarios, so that the service scenarios can be accumulated all the time, the coverage rate of the service scenarios can be improved, and the accuracy of the test conclusion can be further improved.
In the embodiment of the present invention, the case description and the case serial number in table 3 are used as the main key to store the obtained 8 tables of transactions to be tested, as shown in table 4.
Table 4 identifies 8 transaction records to be tested
Figure BDA0001188668700000151
Figure BDA0001188668700000161
Optionally, screening and displaying the transaction records to be tested according to at least one transaction message; displaying the transaction records to be tested according to the transaction types and the transaction channels; alternatively, all transaction records to be tested are presented.
Optionally, when testing the transaction record to be tested, the tool simulation mechanism initiates a communication connection to the test system, and may select all or part of the transaction record to be tested to initiate. Optionally, when the transaction records to be tested are selected, traversing all the selected transaction records, sending all the transaction records in each case group according to the sequence of case serial numbers from small to large, sending the sending logic of each transaction record according to the sequence of the acceptance request message, the issuance response message and the acceptance response message, and comparing whether the acceptance request message and the issuance request message of the new system are the same as the old system to determine whether the new system is available.
The points to be explained are: the above description of the extraction process for the transaction records to be tested is only exemplary and explanatory and is not intended to limit the invention.
For a clearer introduction of the above method flow, fig. 2 illustrates another method for extracting a transaction record to be tested according to an embodiment of the present invention.
When the system is changed, whether the new system is available needs to be detected, the new system is usually detected by using transaction records, K transaction records to be tested are determined, and the K transaction records to be tested can cover all the existing service scenes, so that the service scene coverage rate is improved compared with the prior art; moreover, the method can cover the minimum set of all service scenes, so that the situation of repeated testing of the same service scene is avoided, and the testing efficiency is improved. The process of the method of extraction of the transaction record to be tested is as follows.
As shown in fig. 2, the method includes:
step 201, obtaining a plurality of messages corresponding to N transaction records; wherein each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to the transaction main key;
optionally, each transaction record corresponds to four messages, which are an acceptance request message, an acceptance response message, a card issuing request message and a card issuing response message; each message comprises a transaction main key, wherein the transaction information corresponding to the transaction main key comprises transaction transmission time, a system tracking number and an accepted institution code;
optionally, the obtained multiple messages are in a compressed packet mode, and after the multiple messages are obtained, the multiple messages are unpacked first to obtain the unpacked multiple messages;
step 202, matching at least one message corresponding to each transaction record in N transaction records according to transaction information corresponding to a transaction primary key included in each message in a plurality of messages; the transaction information corresponding to the transaction key included in any four messages in at least one message corresponding to each transaction record is the same;
optionally, the transaction information corresponding to the transaction key in the four messages corresponding to the same transaction record is the same, and the message with the same transaction information corresponding to the transaction key is determined as the message of the transaction record;
step 203, determining the transaction information of each transaction record in the N transaction records according to the transaction information included in each message in at least one message corresponding to the transaction record;
step 204, acquiring N transaction records and transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1;
optionally, for ease of understanding, the N transaction records are presented in the form of a table, as shown in table 1. The transaction information of the transaction record comprises transaction information corresponding to a transaction main key, an issuer, an acceptance mechanism, a forwarding mechanism, a single-double conversion mark, a transaction channel, a transaction type, a merchant type, a transaction medium, a property, a card product, an acceptance response code, an issuing response code, a purchased product, a product unit price and other information;
step 205, according to the transaction information corresponding to the transaction key of the N transaction records and the transaction information corresponding to the historical transaction key, determining M transaction records having an association relationship with the transaction record from the rest N-1 transaction records, and the occurrence time sequence of the transaction record and each transaction record in the M transaction records; wherein M is an integer greater than or equal to zero;
optionally, in step 202, the multiple messages are matched into N transaction records according to the transaction information corresponding to the transaction main key, and meanwhile, the transaction information corresponding to the transaction main key in each transaction record and the information corresponding to the historical transaction main key can be determined; determining M transaction records related to the transaction record according to the transaction information respectively corresponding to the transaction main key and the historical transaction main key of the transaction record; the time sequence of the transaction record and the M transaction records related to the transaction record can be determined through the transaction information corresponding to the transaction key of the transaction record and the M transaction records related to the transaction record and the transaction information corresponding to the historical transaction key;
step 206, allocating case serial numbers to each transaction record in the transaction records and the M transaction records according to the occurrence time sequence of each transaction record in the transaction records and the M transaction records;
optionally, dividing the transaction record and the M transaction records having an association relationship with the transaction record into a case group, and assigning a case serial number to each transaction record in the case group according to the occurrence time sequence; case numbers can be represented numerically or by letters;
step 207, determining transaction information corresponding to the preset transaction elements of each transaction record;
optionally, the transaction information corresponding to the preset transaction element may be a transaction channel, a transaction type, a merchant type, an acceptance mechanism, an issuer, an acceptance response code, and an issuer response code;
step 208, determining transaction information corresponding to the preset transaction element of each of the transaction records and the M transaction records according to the transaction information of each of the transaction records and the M transaction records;
optionally, determining a preset transaction element of the transaction and transaction information corresponding to the preset transaction element of each transaction record in the M transaction records associated with the transaction record;
step 209, combining the transaction information corresponding to the preset transaction elements of the transaction record and each of the M transaction records according to the occurrence time sequence of the transaction record and each of the M transaction records to obtain case descriptions corresponding to the transaction record and the M transaction records;
optionally, the preset transaction elements may be combined in the following manner: the form of A + B is characterized in that A represents the transaction information corresponding to the preset element of the last transaction record of the case group, and B represents the transaction information corresponding to the preset element of the current transaction record of the case group;
step 210, determining service scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; the service scene information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record;
step 211, performing deduplication operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N;
optionally, the transaction records with the same service scene are subjected to duplicate removal operation, so that the duplicate service scene can be prevented from being tested, and the testing efficiency can be improved.
Step 212; and determining the K transaction records as the transaction records to be tested.
From the above, it can be seen that: in the embodiment of the invention, N transaction records and the transaction information of each transaction record in the N transaction records are obtained; wherein N is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N; determining the K transaction records as transaction records to be tested; because the duplicate removal operation is carried out on the transaction records with the same service scene in the obtained N transaction records, the obtained transaction records to be tested do not include the transaction records with the same service scene, so that the problem of repeated testing on the same service scene can be avoided when the transaction records to be tested are tested, and the testing efficiency is improved.
Fig. 3 schematically shows a structural diagram of an extraction device for a transaction record to be tested according to an embodiment of the present invention.
Based on the same conception, the embodiment of the invention provides an extraction device of a transaction record to be tested, as shown in fig. 3, the extraction device 300 of the transaction record to be tested comprises an acquisition unit 301, a determination unit 302 and a processing unit 303. Wherein:
the acquisition unit is used for determining the business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; determining the K transaction records as transaction records to be tested; the processing unit is used for carrying out duplication elimination operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer of 1 or more and N or less.
Optionally, the obtaining unit is configured to: obtaining a plurality of messages corresponding to N transaction records; wherein each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to the transaction main key; a processing unit to: matching at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in at least one message corresponding to each transaction record is the same; a determination unit configured to: and aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record.
Optionally, the service scenario information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record; a determination unit configured to: for each transaction record of the N transaction records, performing: determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records and the occurrence time sequence of each transaction record in the transaction record and the M transaction records; wherein M is an integer greater than or equal to zero; determining case descriptions corresponding to the transaction records and the M transaction records according to the transaction information of each transaction record in the transaction records and the transaction information of each transaction record in the M transaction records and the occurrence time sequence of each transaction record in the transaction records and the M transaction records; a processing unit to: and distributing case serial numbers for the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
Optionally, the determining unit is configured to: for the nth transaction record in the N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing the following steps: under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key or the transaction information corresponding to the historical transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation.
Optionally, the determining unit is configured to: determining transaction information corresponding to preset transaction elements of each transaction record in the transaction record and the M transaction records according to the transaction information of each transaction record in the transaction record and the M transaction records; a processing unit to: and combining the transaction information corresponding to the preset transaction elements of the transaction record and each of the M transaction records according to the occurrence time sequence of the transaction record and each of the M transaction records to obtain case description corresponding to the transaction record and the M transaction records.
Optionally, a processing unit for: for each transaction record of the N transaction records, performing: and deleting at least one transaction record under the condition that at least one transaction record with the same case description and case serial number as the corresponding transaction record exists.
From the above, it can be seen that: in the embodiment of the invention, N transaction records and the transaction information of each transaction record in the N transaction records are obtained; wherein N is an integer greater than 1; determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; carrying out duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N; determining the K transaction records as transaction records to be tested; because the duplicate removal operation is carried out on the transaction records with the same service scene in the obtained N transaction records, the obtained transaction records to be tested do not include the transaction records with the same service scene, so that the problem of repeated testing on the same service scene can be avoided when the transaction records to be tested are tested, and the testing efficiency is improved.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for extracting a transaction record to be tested is characterized by comprising the following steps:
acquiring N transaction records and transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1;
determining business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records;
performing duplicate removal operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N;
determining the K transaction records as transaction records to be tested;
the acquiring of the N transaction records and the transaction information of each transaction record of the N transaction records includes:
obtaining a plurality of messages corresponding to the N transaction records; each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to a transaction main key;
matching the at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in the at least one message corresponding to each transaction record is the same;
aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record;
the service scenario information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record;
the determining the service scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records includes:
for each transaction record of the N transaction records, performing:
determining transaction information corresponding to the transaction key included in the transaction record according to the transaction information of the transaction record; determining the transaction information corresponding to the historical transaction main key of the transaction record under the condition that the transaction information of the transaction record comprises the transaction information corresponding to the historical transaction main key;
determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records and the occurrence time sequence of the transaction record and each transaction record in the M transaction records according to the transaction information corresponding to the transaction main key of the N transaction records and the transaction information corresponding to the historical transaction main key; wherein M is an integer greater than or equal to zero;
determining case description corresponding to the transaction record and the M transaction records according to the transaction record and the transaction information of each transaction record in the M transaction records and the occurrence time sequence of each transaction record in the transaction records and the M transaction records;
and allocating case serial numbers to the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
2. The method according to claim 1, wherein determining M transaction records having an association relationship with the transaction record from the remaining N-1 transaction records according to the transaction information corresponding to the transaction key of the N transaction records and the transaction information corresponding to the historical transaction key comprises:
aiming at the nth transaction record in N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing:
under the condition that the transaction record does not comprise the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation;
under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record does not comprise the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record is determined to be the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an association relation;
under the condition that the transaction record comprises transaction information corresponding to a historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an association relation.
3. The method of claim 1, wherein the determining the case description corresponding to the transaction record and the M transaction records according to the transaction information of the transaction record and each of the M transaction records and the occurrence time sequence of the transaction record and each of the M transaction records comprises:
determining transaction information corresponding to preset transaction elements of the transaction record and each of the M transaction records according to the transaction record and the transaction information of each of the M transaction records;
and combining the transaction records with the transaction information corresponding to the preset transaction elements of each of the M transaction records according to the occurrence time sequence of the transaction records and each of the M transaction records to obtain case descriptions corresponding to the transaction records and the M transaction records.
4. The method of claim 1, wherein the performing the deduplication operation on the plurality of transaction records with the same service scenario information in the N transaction records comprises:
for each transaction record of the N transaction records, performing:
and deleting at least one transaction record corresponding to the transaction record under the condition that the at least one transaction record with the same case description and case serial number exists.
5. An apparatus for extracting transaction records to be tested, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring N transaction records and transaction information of each transaction record in the N transaction records; wherein N is an integer greater than 1;
the determining unit is used for determining the business scene information corresponding to each transaction record according to the transaction information of each transaction record in the N transaction records; determining the K transaction records as transaction records to be tested;
the processing unit is used for carrying out duplication elimination operation on a plurality of transaction records with the same service scene information in the N transaction records to obtain K transaction records; wherein K is an integer greater than or equal to 1 and less than or equal to N;
the obtaining unit is further configured to:
obtaining a plurality of messages corresponding to the N transaction records; each transaction record in the N transaction records corresponds to at least one message; each message in the at least one message comprises transaction information corresponding to a transaction main key;
the processing unit is further configured to:
matching the at least one message corresponding to each transaction record in the N transaction records according to the transaction information corresponding to the transaction key included in each message in the plurality of messages; the transaction information corresponding to the transaction key included in any four messages in the at least one message corresponding to each transaction record is the same;
the determining unit is further configured to:
aiming at each transaction record in the N transaction records, determining the transaction information of the transaction record according to the transaction information included in each message in at least one message corresponding to the transaction record;
the service scenario information corresponding to each transaction record in the N transaction records includes: case description and case sequence number for each transaction record;
the determining unit is further configured to:
for each transaction record of the N transaction records, performing: determining transaction information corresponding to the transaction key included in the transaction record according to the transaction information of the transaction record; determining the transaction information corresponding to the historical transaction main key of the transaction record under the condition that the transaction information of the transaction record comprises the transaction information corresponding to the historical transaction main key; determining M transaction records having an association relation with the transaction record from the rest N-1 transaction records and the occurrence time sequence of the transaction record and each transaction record in the M transaction records according to the transaction information corresponding to the transaction main key of the N transaction records and the transaction information corresponding to the historical transaction main key; wherein M is an integer greater than or equal to zero; determining case description corresponding to the transaction record and the M transaction records according to the transaction record and the transaction information of each transaction record in the M transaction records and the occurrence time sequence of each transaction record in the transaction records and the M transaction records;
the processing unit is further configured to:
and allocating case serial numbers to the transaction records and each transaction record in the M transaction records according to the occurrence time sequence of the transaction records and each transaction record in the M transaction records.
6. The apparatus of claim 5, wherein the determination unit is to:
aiming at the nth transaction record in N-1 transaction records except the transaction record, wherein N is an integer which is greater than or equal to 1 and less than or equal to N-1, executing: under the condition that the transaction record does not comprise the transaction information corresponding to the historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record, determining that the nth transaction record and the transaction record have an association relation; under the condition that the transaction record comprises the transaction information corresponding to the historical transaction main key, and the nth transaction record does not comprise the transaction information corresponding to the historical transaction main key: under the condition that the transaction information corresponding to the transaction main key of the nth transaction record is determined to be the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an association relation; under the condition that the transaction record comprises transaction information corresponding to a historical transaction main key, and the nth transaction record comprises the transaction information corresponding to the historical transaction main key: and under the condition that the transaction information corresponding to the transaction main key of the nth transaction record or the transaction information corresponding to the historical transaction main key is the same as the transaction information corresponding to the transaction main key included in the transaction record or the transaction information corresponding to the historical transaction main key, determining that the nth transaction record and the transaction record have an association relation.
7. The apparatus of claim 5, wherein the determination unit is to:
determining transaction information corresponding to preset transaction elements of the transaction record and each of the M transaction records according to the transaction record and the transaction information of each of the M transaction records;
the processing unit is configured to:
and combining the transaction records with the transaction information corresponding to the preset transaction elements of each of the M transaction records according to the occurrence time sequence of the transaction records and each of the M transaction records to obtain case descriptions corresponding to the transaction records and the M transaction records.
8. The apparatus of claim 5, wherein the processing unit is to:
for each transaction record of the N transaction records, performing:
and deleting at least one transaction record corresponding to the transaction record under the condition that the at least one transaction record with the same case description and case serial number exists.
CN201611199162.8A 2016-12-22 2016-12-22 Method and device for extracting transaction records to be tested Active CN106803202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611199162.8A CN106803202B (en) 2016-12-22 2016-12-22 Method and device for extracting transaction records to be tested

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611199162.8A CN106803202B (en) 2016-12-22 2016-12-22 Method and device for extracting transaction records to be tested

Publications (2)

Publication Number Publication Date
CN106803202A CN106803202A (en) 2017-06-06
CN106803202B true CN106803202B (en) 2021-02-09

Family

ID=58984828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611199162.8A Active CN106803202B (en) 2016-12-22 2016-12-22 Method and device for extracting transaction records to be tested

Country Status (1)

Country Link
CN (1) CN106803202B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110084699A (en) * 2019-04-30 2019-08-02 深圳前海微众银行股份有限公司 Polymerization, device, transaction List Table system and the storage medium of transaction record
CN110377522B (en) * 2019-07-22 2023-10-03 中国工商银行股份有限公司 Transaction scene testing method, device, computing equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10290053B2 (en) * 2009-06-12 2019-05-14 Guardian Analytics, Inc. Fraud detection and analysis
CN102053872B (en) * 2009-11-06 2013-11-20 中国银联股份有限公司 Method for testing transaction performance of terminal
CN105930259B (en) * 2015-12-23 2018-10-16 中国银联股份有限公司 A kind of method and apparatus of WEB regression tests

Also Published As

Publication number Publication date
CN106803202A (en) 2017-06-06

Similar Documents

Publication Publication Date Title
CN107807982B (en) Consistency checking method and device for heterogeneous database
US20150032759A1 (en) System and method for analyzing result of clustering massive data
CN105989059A (en) Data record checking method and device
CN108733820A (en) Data adjustment method and device
CN107633015A (en) A kind of data processing method, device and equipment
CN109934712A (en) Account checking method, account checking apparatus and electronic equipment applied to distributed system
CN109582550A (en) A kind of method, apparatus and server obtaining full dose business scenario failure collection
CN110764999A (en) Automatic testing method and device, computer device and storage medium
CN109828900A (en) Test script automatic generation method, device, electronic equipment and storage medium
CN106803202B (en) Method and device for extracting transaction records to be tested
CN109150643A (en) A kind of business processing method for detecting abnormality and device
CN104572921B (en) A kind of method of data synchronization and device across data center
CN107423140B (en) Return code identification method and device
CN110708414B (en) Telephone number sorting method and device and electronic equipment
CN109800823B (en) Clustering method and device for POS terminals
CN111581108B (en) Input data acquisition method and device based on business system transaction test
CN111078668B (en) Data generation method and device, electronic equipment and storage medium
CN110648219B (en) Method and device for standardizing input area of bank transaction system
CN110275863A (en) File moving method, device and storage medium
CN109165208A (en) It is a kind of for loading data into the method and system in database
CN108763363B (en) Method and device for checking record to be written
CN117435963B (en) Digital asset fraud group determination method, device, electronic equipment and storage medium
CN115994172B (en) Method, device, equipment and medium for determining service access relation
CN112632056B (en) Method and device for generating inspection rule
JP5384060B2 (en) Insider verification device, insider verification method and program thereof

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
GR01 Patent grant
GR01 Patent grant