CN110569190B - Transaction pressure testing method and device, electronic device and readable storage medium - Google Patents

Transaction pressure testing method and device, electronic device and readable storage medium Download PDF

Info

Publication number
CN110569190B
CN110569190B CN201910799197.2A CN201910799197A CN110569190B CN 110569190 B CN110569190 B CN 110569190B CN 201910799197 A CN201910799197 A CN 201910799197A CN 110569190 B CN110569190 B CN 110569190B
Authority
CN
China
Prior art keywords
transaction
predetermined
predicted
transactions
data
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
CN201910799197.2A
Other languages
Chinese (zh)
Other versions
CN110569190A (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.)
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 CN201910799197.2A priority Critical patent/CN110569190B/en
Publication of CN110569190A publication Critical patent/CN110569190A/en
Application granted granted Critical
Publication of CN110569190B publication Critical patent/CN110569190B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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

Abstract

The present disclosure provides a transaction stress testing method, including: acquiring transacted data, wherein the transacted data comprises transaction data of a plurality of predetermined transactions; determining respective predicted transaction amounts for a plurality of predetermined transactions based on the traded data; generating a pressure test script according to the respective predicted transaction amount of the plurality of predetermined transactions; and operating the pressure test script to perform pressure test to obtain a pressure test result. The present disclosure also provides a transaction pressure testing device, an electronic apparatus, and a computer-readable storage medium.

Description

Transaction pressure testing method and device, electronic device and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a transaction pressure testing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
To ensure that a software system can withstand the requested pressure from real traffic, a pressure test is often required before the system comes online.
In the course of implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: in the related art, the stress test scripts employed in the mainstream stress test scheme mainly include scripts generated based on a single transaction to generate a large number of access requests or scripts generated directly based on historical transaction data. When a large number of access requests are generated based on a single transaction to generate a script, the bearing capacity of the system to the single transaction can only be tested, and the performance condition of the system when a large number of users perform mixed requests of multiple types of transactions in a real application scene is difficult to intuitively infer. When the method for generating the script directly based on the historical transaction data is adopted, the transaction data in a given period of historical time can only be completely tested, the real pressure condition of the system in a longer time range is difficult to reflect, and the test request cannot be adjusted in a targeted manner. Moreover, the mainstream pressure test scheme cannot predict the future transaction trend, and the guidance significance of the pressure test result on the system performance capacity design is limited. After the production environment performance is in a problem, if the problem is to be traced back, an analysis result is difficult to obtain by a mainstream pressure test method.
Disclosure of Invention
In view of the above, the present disclosure provides a transaction pressure testing method and apparatus capable of generating a pressure testing script according to actual conditions from historical transaction data, and an electronic device and a computer-readable storage medium.
One aspect of the present disclosure provides a transaction stress testing method, including: acquiring transacted data, wherein the transacted data comprises transaction data of a plurality of predetermined transactions; determining respective predicted transaction amounts for a plurality of predetermined transactions based on the traded data; generating a pressure test script according to the respective predicted transaction amount of the plurality of predetermined transactions; and operating the pressure test script to perform pressure test to obtain a pressure test result.
According to an embodiment of the present disclosure, the transacted data includes transacted data of a first period; the determining the predicted transaction amount for each of the plurality of predetermined transactions may include: determining transaction amounts of a plurality of first sub-periods of the plurality of predetermined transactions respectively included in each day of a plurality of days included in the first period according to transaction data of the plurality of predetermined transactions, and obtaining a plurality of transaction amount vectors of the plurality of predetermined transactions respectively corresponding to the plurality of first sub-periods; and determining a predicted transaction amount for each of the plurality of predetermined transactions during each of the first sub-periods during the second period based on the transaction amount vector for each of the plurality of predetermined transactions during each of the first sub-periods during the plurality of sub-periods.
According to an embodiment of the present disclosure, the determining the predicted transaction amount of each of the plurality of predetermined transactions in each of the first sub-periods of the second period comprises: inputting the trading volume vector for each first sub-period of the plurality of predetermined trades into the long-short term memory model, and determining to obtain the predicted trading volume of each first sub-period of the plurality of predetermined trades in the second period.
According to an embodiment of the present disclosure, the determining the predicted transaction amount of each of the plurality of predetermined transactions includes: determining a transaction proportion for each of a plurality of predetermined transactions according to the total data amount of the traded data and the data amount of the transaction data of each predetermined transaction included in the traded data; and determining a predicted transaction amount for each of the predetermined transactions based on the transaction proportion and the stress test rule for each of the predetermined transactions.
According to an embodiment of the present disclosure, the determining the predicted transaction amount for each predetermined transaction includes: determining the predicted total transaction amount of each second sub-period in the second period according to the stress test rule; and determining the predicted transaction amount of each predetermined transaction in each second sub-period according to the predicted total transaction amount of each second sub-period and the transaction proportion of each predetermined transaction.
According to an embodiment of the present disclosure, the determining the predicted transaction amount for each of the plurality of predetermined transactions further includes: determining a correlation coefficient between any two of the plurality of predetermined transactions according to transaction data of each of the predetermined transactions included in the traded data; acquiring a predicted transaction variation coefficient of at least one predetermined transaction in a plurality of predetermined transactions; and determining the predicted transaction change coefficients of other predetermined transactions except the at least one predetermined transaction in the plurality of predetermined transactions according to the correlation coefficient and the predicted transaction change coefficient of the at least one predetermined transaction. And the predicted transaction amount of each predetermined transaction in each second sub-period is determined according to the predicted transaction total amount of each second sub-period, the transaction proportion of each predetermined transaction and the transaction prediction change coefficient of each predetermined transaction.
According to an embodiment of the present disclosure, the transaction data includes transacted data for a third period of time. The determining a correlation coefficient between any two of the plurality of predetermined transactions may include: determining the transaction amount of m third sub-periods of each of the plurality of predetermined transactions in the third time period according to the transaction data of each of the predetermined transactions included in the transacted data, and obtaining the respective transaction amount sets of the plurality of predetermined transactions, wherein each transaction amount set includes m transaction amounts corresponding to the m third sub-periods respectively; determining transaction variation of each of the plurality of predetermined transactions in two adjacent third sub-periods of the m third sub-periods according to the respective transaction amount sets of the plurality of predetermined transactions, and obtaining (m-1) transaction variation for each predetermined transaction; and determining a correlation coefficient between any two of the plurality of predetermined transactions according to the (m-1) transaction variation amounts for each of the predetermined transactions. Wherein m is a natural number greater than 2.
According to the embodiment of the disclosure, the correlation coefficient is calculated by using the following formula:
Figure GDA0002226279680000031
wherein R is xy A correlation coefficient between the x-th scheduled transaction and the y-th scheduled transaction in the plurality of scheduled transactions; d xi Is the ith transaction variation of the (m-1) transaction variations for the x predetermined transactions; d yi Is the ith transaction variation of the (m-1) transaction variations for the y predetermined transactions;
Figure GDA0002226279680000032
is an average of (m-1) transaction variance values for an x-th predetermined transaction; />
Figure GDA0002226279680000033
Is the average of the (m-1) transaction variance for the y-th scheduled transaction.
Another aspect of the present disclosure provides a transaction pressure testing apparatus, including: the trading data acquisition module is used for acquiring the trading data, and the trading data comprises trading data of a plurality of kinds of predetermined trading; the predicted transaction amount determining module is used for determining the respective predicted transaction amount of the various predetermined transactions according to the transacted data; the test script generating module is used for generating a pressure test script according to the respective predicted transaction amount of the various predetermined transactions; and the test execution module is used for operating the pressure test script to carry out pressure test to obtain a pressure test result.
Another aspect of the present disclosure provides an electronic device including: one or more processors; and a storage device 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 implement the transaction stress testing method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement a transaction stress testing method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions for implementing a transaction stress testing method as described above when executed.
According to the embodiment of the disclosure, the predicted transaction amount of various transactions is determined according to the transaction data, and then the test script is generated according to the predicted transaction amount, so that the pressure test data included in the test script can better accord with the actual situation, and the transaction pressure test method executed according to the test script can truly reflect the actual pressure situation after the service is on line. Therefore, a proper server deployment scheme is convenient to determine, server resources can be effectively utilized, and operation cost is reduced.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario of a transaction pressure testing method and apparatus, and an electronic device and a computer-readable storage medium according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a transaction stress testing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart for determining a predicted transaction amount for each of a plurality of predetermined transactions, according to an exemplary embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart for determining a predicted transaction amount for each of the predetermined transactions according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart for determining a predicted transaction amount for each of a plurality of predetermined transactions, according to a second exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates a flow chart for determining a correlation coefficient between any two predetermined transactions according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow chart for determining a predicted transaction amount for each of a plurality of predetermined transactions, according to a third exemplary embodiment of the present disclosure;
FIG. 8 schematically shows a block diagram of a transaction pressure testing device according to an embodiment of the present disclosure; and
fig. 9 schematically shows a block diagram of an electronic device adapted to perform a transaction stress testing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that these descriptions are illustrative only and are 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 disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not 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 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 is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). Where a convention analogous to "at least one of A, B, or C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, or C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
An embodiment of the present disclosure provides a transaction pressure testing method, including: acquiring transacted data, wherein the transacted data comprises transaction data of a plurality of scheduled transactions; determining respective predicted transaction amounts for a plurality of predetermined transactions based on the traded data; generating a pressure test script according to the respective predicted transaction amount of the plurality of predetermined transactions; and operating the pressure test script to perform pressure test to obtain a pressure test result.
Fig. 1 schematically illustrates an application scenario 100 of a transaction pressure testing method and apparatus, and an electronic device and a readable storage medium according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, an application scenario 100 of the present disclosure may include terminal devices 101, 102, 103, a database 104, a server 105, and a network 106. The network 106 is a medium for providing communication links between any two of the terminal devices 101, 102, 103, the database 104 and the server 105. Network 106 can include various connection types, such as wired and/or wireless communication links, and so forth.
The terminal devices 101, 102, 103 may be, for example, various electronic devices with processing capabilities and display screens, including but not limited to desktop computers, laptop portable computers, tablet computers, smart phones, counter machines, ATM machines, and the like.
According to the embodiment of the present disclosure, the terminal devices 101, 102, 103 may obtain a large amount of stored transacted data from the database 104, for example, and obtain predicted transaction amounts of a plurality of predetermined transactions through processing of the transacted data. For example, a stress test script may be generated based on the predicted transaction amount to simulate an actual transaction by running the stress test script to complete access to the server 105, thereby implementing a stress test on the transaction system in the server 105.
According to an embodiment of the present disclosure, the database 104 and the server 105 may be, for example, a database and a server set by a service (e.g., a financial service, etc.). The database 104 is used for storing transaction data generated by the terminal device by accessing the server 105.
The server 105 may be a server for providing various services to the terminal devices 101, 102, 103, and may be used for providing support to a transaction service provided by the terminal devices 101, 102, 103, for example. The server 105 may also interact with the database 104, for example, via the network 106, to retrieve the transacted data from the database 104 and generate a stress test script by processing the transacted data. So that the terminal devices 101, 102, 103 implement the stress test on the server 105 by running the stress test script.
It is understood that the transaction stress testing method of the embodiment of the present disclosure may be executed by the terminal devices 101, 102, 103; or partly by the server 105 and partly by the terminal devices 101, 102, 103. Correspondingly, the transaction pressure testing device provided by the embodiment of the disclosure can be arranged in the terminal equipment 101, 102, 103; it is also possible that part of the modules are provided in the server 105 and part of the modules are provided in the terminal devices 101, 102, 103.
It should be understood that the types of terminal devices 101, 102, 103, database 104, server 105 and network 106 in fig. 1 are merely illustrative. There may be any type of terminal devices 101, 102, 103, database 104, server 105 and network 106, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a transaction stress testing method according to an embodiment of the present disclosure.
As shown in fig. 2, the transaction stress testing method of the embodiment of the present disclosure includes operations S210 to S240.
In operation S210, transacted data including transaction data for a plurality of predetermined transactions is acquired.
According to an embodiment of the present disclosure, the operation S210 may be to acquire transaction data within a predetermined period of time from the database 104. The acquired transaction data may be, for example, data in the format shown in table 1. The plurality of predetermined transactions may include, for example, transaction a: "user registration" transaction, transaction B: "user login" transaction, transaction C: "query balance" transaction, transaction D: "transfer" transactions, etc. There may be different kinds of predefined transactions depending on different application scenarios. The predetermined period of time may be, for example, 1 quarter, 1 month, half month, 1 week, etc., and may be set according to actual needs, which is not limited by the present disclosure.
TABLE 1
Figure GDA0002226279680000071
According to an embodiment of the present disclosure, the operation S210 may also perform real-time data collection in a production environment, for example, to collect real-time transaction data within a predetermined period of time. The data collection may be, for example, logging each transaction request actually occurring, taking each log record as one transacted data, and the record format of the log record may be, for example, as shown in table 1. The transaction code is the code of the plurality of predetermined transactions, each predetermined transaction has a unique code, and the codes of different predetermined transactions are different. The user ID is a user identification for performing a transaction by the terminal device 101, 102, 103. The uploaded data is data content uploaded to the server 105 by the user through the terminal devices 101, 102 and 103, and the returned data is data content returned to the terminal devices 101, 102 and 103 by the server 105. It is to be understood that the format of the transacted data acquired in fig. 1 is by way of example only to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto.
In operation S220, a predicted transaction amount for each of the plurality of predetermined transactions is determined based on the transacted data.
According to an embodiment of the present disclosure, the operation S220 may include, for example: the traded data acquired in operation S210 is classified into a plurality of trading data sets, each trading data set including a plurality of traded data having the same trading code, according to the trading code in the traded data. Then, the transaction time of a plurality of transacted data included in each transaction data set in the transaction data sets is subjected to statistical analysis to obtain a transaction rule of each scheduled transaction, and the predicted transaction amount of each scheduled transaction is obtained by conjecture according to the transaction rule of each scheduled transaction.
According to an embodiment of the present disclosure, the operation S220 may include, for example: the transaction proportion of each predetermined transaction is obtained through statistics according to the transacted data acquired in operation S210, and then the predicted transaction amount of each of the plurality of predetermined transactions is determined according to the transaction proportion of each predetermined transaction. For example, the operation S220 may be implemented by a method described in any one of the schematic diagrams in fig. 3 or fig. 5, and will not be described in detail herein.
According to an embodiment of the present disclosure, in order to improve the execution efficiency of operation S220, the operation S220 may further use a pre-trained prediction model to obtain a predicted transaction amount of each predetermined transaction. For example, the operation S220 may be implemented by the method described in fig. 7, and will not be described in detail herein.
In operation S230, a stress test script is generated according to the predicted transaction amounts of the respective predetermined transactions. In operation S240, a pressure test script is executed to perform a pressure test, and a pressure test result is obtained.
According to an embodiment of the present disclosure, the operation S230 may include, for example: and determining the ratio of the predicted transaction amount of each predetermined transaction to the total predicted transaction amount of the plurality of predetermined transactions according to the respective predicted transaction amounts of the plurality of predetermined transactions. And then generating a stress test script according to the ratio, so that the ratio of the execution times of each predetermined transaction relative to the total transaction execution times included in the stress test script is matched with the ratio of the determined transaction amount. Therefore, the generated pressure test script can better conform to a real application scene.
After the pressure test script is generated, the pressure test script can be executed by the terminal devices 101, 102, 103, and a real transaction process can be simulated to access the server 105, thereby realizing the pressure test of the server 105. The stress test results may be used to characterize whether the server 105 is able to withstand the access stress when running the stress test script. If the transaction scenario is acceptable, the server 105 may be used in the real transaction scenario without the need to expand the server 105. If the transaction cannot be endured, it is necessary to increase the configuration of the server 105 so that the real transaction can be smoothly implemented, that is, the server 105 can endure the real transaction pressure by extending the server 105. According to the embodiment of the present disclosure, when the stress test result indicates that the server 105 can bear the access pressure when running the stress test script, in order to effectively save the operation cost, the server 105 may also be appropriately scaled, so that the configuration after scaling of the server 105 can just bear the access pressure when running the stress test script.
In summary, the transaction pressure testing method according to the embodiment of the disclosure generates the pressure testing script according to the predicted transaction amount of each predetermined transaction, so that the operation of the pressure testing script is more in line with a real transaction scenario, thereby improving the accuracy of the pressure testing result and facilitating the reasonable formulation of the server deployment scheme.
Fig. 3 schematically illustrates a flow chart for determining a predicted transaction amount for each of a plurality of predetermined transactions according to an exemplary embodiment of the present disclosure.
As shown in fig. 3, operation S220 of determining the predicted transaction amounts for each of the plurality of predetermined transactions in fig. 2 may include, for example, operations S321 to S322.
In operation S321, a transaction proportion for each of the plurality of predetermined transactions is determined according to the total amount of the data of the traded data and the data amount of the transaction data for each of the predetermined transactions included in the traded data.
According to an embodiment of the present disclosure, the operation S321 may include, for example: firstly, according to the transaction code of the transaction data, the transaction data is obtainedThe traded data is classified into a plurality of trading data sets according to the trading codes, each trading data set comprises traded data with the same trading code, and different trading data sets comprise traded data with different trading codes. A data amount of the transacted data included in each transaction data set is then determined. Wherein, the plurality of transaction data sets may be n, for example, wherein the data amount of the transacted data included in the k-th transaction data set in the n transaction data sets may be represented as S k . If the transaction code of the transacted data included in the kth transaction data set is C, the transaction proportion P of the predetermined transaction with the transaction code of C is C Can be calculated by the following formula (1). The transaction proportion of each of the plurality of predetermined transactions can be calculated by using the method of the transaction proportion of the predetermined transaction with the transaction code C as described above, and finally, the transaction amount proportion table shown in table 2 can be obtained by sorting. Wherein k is a positive integer less than or equal to n.
Figure GDA0002226279680000101
Table 2 trade amount ratio table
Transaction code Transaction proportion
A P A
B P B
C P C
…… ……
N P N
In operation S322, a predicted transaction amount for each of the predetermined transactions is determined according to the transaction proportion and the stress test rule for each of the predetermined transactions.
According to an embodiment of the present disclosure, the stress test rule may be: a rule that presents an increasing function in a predetermined ensemble such that the transaction amount increases from 0 to a target transaction amount over a pressure time period. The stress test rule may include, for example, at least one of: the pressure test rule for linear increment of the transaction amount, the pressure test rule for stepwise increment of the transaction amount, and the pressure test rule for curve increment of the transaction amount may include at least one of the following: linear increasing function, stepped increasing function, curvilinear increasing function, etc. For example, the stress test rule may be: the pressure measurement target was linearly increased from 0TPS to X TPS within 10 minutes. Wherein TPS is an abbreviation for Transactions Per Second, i.e., the number of Transactions Per Second processed by the server 105. The target transaction amount may be set according to actual transaction requirements, which is not limited by this disclosure.
According to an embodiment of the present disclosure, the operation S322 may include, for example: based on the transaction proportion and the stress test rule for each of the predetermined transactions, a transaction amount for each of the transactions over a future time period is determined. The operation S322 may determine the predicted transaction amount for each predetermined transaction, for example, by the method described in fig. 4, which will not be described in detail herein.
FIG. 4 schematically illustrates a flow chart for determining a predicted transaction amount for each of the predetermined transactions according to an embodiment of the present disclosure.
As shown in fig. 4, operation S322 of determining the predicted transaction amount for each of the predetermined transactions may include operations S4221 to S4222.
In operation S4221, a predicted total amount of transactions for each second sub-period within the second period is determined according to the stress test rule.
According to an embodiment of the present disclosure, the second period may be, for example, any period not less than the stress test rule transaction amount increment period. The duration of each second sub-period may be determined according to a stress test rule and a stress test accuracy, for example. For example, if the stress test rule is a stress test rule with a linearly increasing transaction amount, the second sub-period may be 1 second, or 1min, for example. If the pressure testing accuracy requirement is higher, the second sub-period should be selected to be a smaller period.
According to an embodiment of the present disclosure, the above operation S4221 may include, for example: the lengths of the second time period and the second sub-time period are determined according to the stress test rule, and then the predicted transaction total amount of each second sub-time period is determined. For example, if the pressure test rule is to linearly increase the pressure test target from 0TPS to X TPS within 10 minutes, the duration of the second period may be a min, and the duration of the second sub-period may be b min, so that the total number of the second sub-periods is a/b. The predicted transaction total amount S of the ith second sub-period in the a/b second sub-periods can be calculated by the following formula (2) l . Wherein a is an arbitrary value which is more than or equal to 10min, the value of a/b is a positive integer, and l is an integer which is more than or equal to 1 and less than or equal to a/b.
Figure GDA0002226279680000111
In operation S4222, a predicted transaction amount for each of the predetermined transactions in each of the second sub-periods is determined according to the predicted total transaction amount for each of the second sub-periods and the transaction proportion for each of the predetermined transactions.
According to an embodiment of the present disclosure, the operation S4222 may include, for example: the predicted transaction amount of each of the predetermined transactions in each of the second sub-periods is calculated by multiplying the predicted transaction amount of each of the second sub-periods determined in operation S4221 by the transaction proportion for each of the predetermined transactions. For example, for a predetermined transaction with transaction code CPredicted transaction amount S of the first and second sub-periods lC Can be calculated by the following formula (3). After the predicted transaction amount of each predetermined transaction in each second sub-period is determined, a stress test script can be generated according to the determined predicted transaction amount, so that stress testing is performed.
S lC =S l ×P C . Formula (3)
According to the embodiment of the disclosure, in order to make the finally generated stress test script more consistent with the real transaction scenario, for example, the predicted transaction amount of each predetermined transaction may be adjusted in a targeted manner. The targeted adjustment can be performed, for example, by the result of an interaction between the terminal 101, 102, 103 and the user. For example, a predicted increase rate of at least one predetermined transaction in the future, which is input by the user through the terminal device 101, 102, 103, may be obtained, and the predicted transaction amount of the at least one predetermined transaction may be adjusted according to the predicted increase rate. Considering that the other predetermined transactions in the plurality of predetermined transactions may have an association relation with at least one predetermined transaction, the predicted transaction amount of the other predetermined transactions should be adjusted according to the association relation.
Fig. 5 schematically shows a flowchart of determining a predicted transaction amount for each of a plurality of predetermined transactions according to a second exemplary embodiment of the present disclosure.
As shown in fig. 5, operation S220 of determining the predicted transaction amounts for the respective predetermined transactions may include operations S523 to S525 in addition to operations S321 to S322.
In operation S523, a correlation coefficient between any two predetermined transactions of the plurality of predetermined transactions is determined according to the transaction data of each predetermined transaction included in the transacted data.
According to an embodiment of the present disclosure, the operation S523 may include, for example: the transaction amount of each predetermined transaction in each of a plurality of third sub-periods included in the predetermined period is counted according to the transaction data of each predetermined transaction. Then, the variation of each predetermined transaction over time is determined according to the transaction amount of each third sub-period. And finally, determining a correlation coefficient between any two kinds of preset transactions according to the variation of any two kinds of preset transactions over time.
According to an embodiment of the present disclosure, the operation S523 may determine a correlation coefficient between any two predetermined transactions through operations 6231 to S6233 described in fig. 6, for example, and will not be described in detail herein.
In operation S524, a predicted transaction variation coefficient for at least one of the plurality of predetermined transactions is obtained.
According to an embodiment of the present disclosure, the operation S524 may be, for example, obtaining a predicted transaction variation coefficient of at least one predefined transaction in response to the user operating the terminal device 101, 102, 103. The predicted transaction variation factor, which may be, for example, a predicted increase percentage of the predetermined transaction, is input by the user through the terminal device 101, 102, 103. It is to be understood that the type and the obtaining manner of the predicted transaction variation coefficient are only used as examples to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto. For example, the predicted transaction variation coefficient obtained in operation S524 may include, for example, only the predicted transaction variation coefficient T of the predetermined transaction with the transaction code C C
In operation S525, a predicted transaction variation coefficient of the reserved transactions other than the at least one reserved transaction among the plurality of reserved transactions is determined according to the correlation coefficient and the predicted transaction variation coefficient of the at least one reserved transaction.
According to an embodiment of the present disclosure, the operation S525 may include, for example: and determining the predicted transaction change coefficients of other predetermined transactions except the at least one predetermined transaction according to the correlation coefficient of the other predetermined transactions except the at least one predetermined transaction and the predicted transaction change coefficient of the at least one predetermined transaction.
For example, if the predicted transaction variation coefficient T of the predetermined transaction with the transaction code C is obtained in operation S524 C The predicted transaction variation coefficient T of the predetermined transaction with the transaction code A A Can be calculated by the following formula (4):
T A =T C ×R AC (ii) a Formula (4)
Wherein R is AC A correlation coefficient between a predetermined transaction with a transaction code a and a predetermined transaction with a transaction code C.
According to an embodiment of the present disclosure, if the predicted transaction variation coefficients acquired in operation S524 are predicted transaction variation coefficients of at least two predetermined transactions, the predicted transaction variation coefficients of other predetermined transactions may be determined by assigning weights to the predicted transaction variation coefficients of the at least two predetermined transactions. For example, if the predicted transaction variation coefficient obtained in operation S524 includes: predicted transaction variation coefficient T for predetermined transaction with transaction code C C And a predicted transaction variation coefficient T for a predetermined transaction having a transaction code D D . The transaction variation coefficient T may be the transaction variation coefficient T, respectively C And a transaction variation coefficient T D Assigning weights, e.g. if the transaction variation coefficient T C Assigned a weight p, as a transaction variation coefficient T D The assigned weight is q, the predicted transaction variation coefficient T of the predetermined transaction with the transaction code of A A Can be calculated by the following formula (5):
T A =p×T C ×R AC +q×T d ×R AD (ii) a Formula (5)
Wherein R is AD The sum of p and q is 1, which is a correlation coefficient between a reserved transaction with a transaction code a and a reserved transaction with a transaction code D.
Accordingly, in the embodiment of the present disclosure, operation S322 may be implemented by operation S522, for example. In operation S522, a predicted transaction amount of each of the reserved transactions in each of the second sub-periods is determined according to the predicted total transaction amount in each of the second sub-periods, the transaction proportion for each of the reserved transactions, and the transaction prediction variation coefficient for each of the reserved transactions. For example, for a predetermined transaction with transaction code A, its predicted transaction amount S in the l second sub-period lA Can be calculated by the following formula (6).
S lA =S l ×P A ×T A . Formula (6)
FIG. 6 schematically illustrates a flow chart for determining a correlation coefficient between any two predetermined transactions according to an embodiment of the disclosure.
As shown in fig. 6, operation S523 of determining a correlation coefficient between any two predetermined transactions may include operations S6231 to S6233. The traded data acquired in operation S210 may be, for example, traded data in a third time period. To facilitate determining the amount of change over time for each of the predetermined transactions, the third time period may be divided into a plurality of third sub-time periods. The length of the third sub-period may be, for example, 1min, or 5min, 10min, etc. The length of the third sub-period may be determined according to the length of the third period, or may be determined according to actual requirements, which is not limited in this disclosure.
In operation S6231, transaction amounts of m third sub-periods included in the third period in each of the plurality of predetermined transactions are determined according to the transaction data of each of the predetermined transactions included in the already-transacted data, and a transaction amount set of each of the plurality of predetermined transactions is obtained, where each transaction amount set includes m transaction amounts corresponding to the m third sub-periods, respectively.
According to an embodiment of the present disclosure, this operation S6231 may include, for example: the transaction amount of each predetermined transaction in each of the m third sub-periods in the transacted data acquired in operation S210 is determined first, resulting in m transaction amounts for each predetermined transaction. The m transaction amounts for each of the predetermined transactions are then aggregated to obtain a transaction amount set.
In operation S6232, transaction variation amounts of the plurality of predetermined transactions in adjacent two third sub-periods among the m third sub-periods are determined according to the respective transaction amount sets of the plurality of predetermined transactions, resulting in (m-1) transaction variation amounts for each predetermined transaction.
According to the embodiment of the disclosure, if the transaction amount set of the predetermined transaction with the transaction code of A is Q A Q of the A The included transaction amount may be, for example, S A1 、S A2 、S A3 、S A4 、……、S Am . The (m-1) transaction variation amounts for each of the predetermined transactions obtained through operation S6232 include: d A1 、d A2 、d A3 、……、d A(m-1) . Wherein d is A1 =S A2 -S A1 、d A2 =S A3 -S A2 、……、d A(m-1) =S Am -S A(m-1)
In operation S6233, a correlation coefficient between any two predetermined transactions of the plurality of predetermined transactions is determined according to the (m-1) transaction variation amounts for each of the predetermined transactions.
According to an embodiment of the present disclosure, for the x-th predetermined transaction and the y-th predetermined transaction in the plurality of predetermined transactions, a correlation coefficient between the two may be determined by, for example, the following formula (7):
Figure GDA0002226279680000151
wherein R is xy A correlation coefficient between the x-th predetermined transaction and the y-th predetermined transaction in the plurality of predetermined transactions; d xi Is the ith transaction variation of the (m-1) transaction variations for the x predetermined transactions; d yi Is the ith transaction variation of the (m-1) transaction variations for the y predetermined transactions;
Figure GDA0002226279680000152
is an average of (m-1) transaction variance values for an x-th predetermined transaction; />
Figure GDA0002226279680000153
Is the average of the (m-1) transaction variance for the y-th scheduled transaction. Wherein x, y may also be replaced by, for example, a transaction code of a predetermined transaction. For example, in calculating a correlation coefficient between a predetermined transaction having a transaction code A and a predetermined transaction having a transaction code B, R is described above xy Can be represented as R AB ,d xi Can be expressed as d Ai ,d yi Can be expressed as d Bi
According to the embodiment of the disclosure, in order to improve the processing efficiency, when the predicted transaction amount of each of the plurality of predetermined transactions is determined, for example, the predicted transaction amount may be processed by using a pre-trained prediction model. According to the embodiment of the disclosure, the prediction model can be modified periodically to improve the accuracy of predicting the transaction amount.
Fig. 7 schematically shows a flowchart of determining a predicted transaction amount for each of a plurality of predetermined transactions according to a third exemplary embodiment of the present disclosure.
As shown in fig. 7, operation S220 of determining the predicted transaction amount for each of the plurality of predetermined transactions may include, for example, operations S721 through S722. The transacted data acquired in operation S210 may be, for example, transaction data of a first time period. The first period and the aforementioned third period may be the same period. In order to facilitate the prediction of the predicted transaction amount for each of the predetermined transactions, the first period may be further divided into a plurality of first sub-periods, and the division method of the first sub-period may be the same as or similar to the aforementioned division method of the third sub-period. In order to improve the accuracy of the predicted transaction amount, the duration of the first sub-period may be shorter than the duration of the third sub-period, the first sub-period may be divided by seconds or minutes, the duration of each first sub-period may be 1s, 5s, 10s, 1min or 5min, and the like, and the duration of the first sub-period may be set according to actual requirements, which is not limited by the disclosure.
In operation S721, transaction amounts of a plurality of first sub-periods each included in a day of a plurality of days included in a first period for each of the plurality of predetermined transactions are determined according to transaction data for the plurality of predetermined transactions, resulting in a plurality of transaction amount vectors for each of the plurality of predetermined transactions for the plurality of first sub-periods.
According to an embodiment of the present disclosure, the operation S721 may include, for example: the number of days included in the first period is determined, and then each day of the number of days included in the first period is divided into a plurality of first sub-periods. And then determining the transaction amount of each scheduled transaction aiming at each first sub-period in each day according to the transaction data of a plurality of scheduled transactions. For each predetermined transaction, a summary table of transaction amounts shown in table 3 below can be obtained, and the predetermined transaction with transaction code a is illustrated in table 3. Then, the transaction amounts of the same first sub-period in the multiple days in table 3 are summarized to obtain a transaction amount vector, so as to obtain multiple transaction amount vectors of each predetermined transaction for multiple first sub-periods. The number of the transaction amount vectors is the same as the number of the first sub-period included per day for each predetermined transaction.
According to the embodiment of the present disclosure, the first period may include, for example, W days, the duration of the first sub-period may be, for example, 1s, and then the number of the first sub-periods is 1440. The number of transaction amount vectors corresponding to each of the reserved transactions obtained through operation S721 is 1440, and for the reserved transactions having a transaction code a, W transaction amounts included in each column in table 3 constitute one transaction amount vector.
TABLE 3 transaction amount summary for a reservation transaction having transaction code A
Transaction A 00:00 00:01 00:02 00:03 00:04 …… 23:59
Day 1 SA 1-0 SA 1-1 SA 1-2 SA 1-3 SA 1-4 …… SA 1-1439
Day 2 SA 2-0 SA 2-1 SA 2-2 SA 2-3 SA 2-4 …… SA 2-1439
Day 3 SA 3-0 SA 3-1 SA 3-2 SA 3-3 SA 3-4 …… SA 3-1439
…… …… …… …… …… …… …… ……
Day W SA w-0 SA w-1 SA w-2 SA w-3 SA w-4 …… SA w-1439
In operation S722, a predicted transaction amount for each of the plurality of predetermined transactions during each of the first sub-periods during the second period is determined based on the transaction amount vectors for each of the plurality of predetermined transactions during each of the first sub-periods during the plurality of sub-periods.
According to an embodiment of the present disclosure, the operation S722 may include, for example: inputting the trading volume vectors for the plurality of predetermined trades for each first sub-period into a long-short term memory model (LSTM model), and determining to obtain the predicted trading volumes of the plurality of predetermined trades for each first sub-period in the second period. The method specifically comprises the following steps: inputting the transaction amount vector of each predetermined transaction for each first sub-period into the long-short term memory model, and outputting the predicted transaction amount vector through the long-short term memory model, wherein the predicted transaction amount vector comprises the predicted transaction amount of each first sub-period in the next days. The number of the predicted transaction amounts included in the predicted transaction amount vector is determined by setting each parameter of the long-term and short-term memory network model.
The long-short term memory model can be obtained by training a large number of vector samples similar to the transaction vector, for example. The number of predicted transaction amounts included in the predicted transaction amount vector may be, for example, the same as the number of transaction amounts included in the transaction amount vector as an input. It is to be understood that the above-mentioned types of prediction models are merely examples to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto as long as the prediction models can take the temporal correlation into consideration.
According to the embodiment of the present disclosure, as daily transaction data is generated and accumulated, the aforementioned transaction amount ratio of each predetermined transaction, and the correlation coefficient between any two predetermined transactions may be updated periodically, for example. Alternatively, the LSTM model may be modified periodically and specifically based on real-time updated statistics. Therefore, the pressure test result is more in line with the actual transaction scene, so that the capacity expansion and the capacity contraction of the server can be performed in time, the operation cost of transaction is effectively saved, and the resource utilization rate is improved.
Fig. 8 schematically shows a block diagram of a transaction pressure testing device according to an embodiment of the present disclosure.
As shown in fig. 8, the transaction pressure testing apparatus 800 of the embodiment of the present disclosure includes a traded data acquisition module 810, a predicted transaction amount determination module 820, a test script generation module 830, and a test execution module 840.
The traded data acquisition module 810 is used to acquire traded data including transaction data of a plurality of predetermined transactions (operation S210).
The predicted transaction amount determining module 820 is configured to determine a predicted transaction amount for each of the plurality of predetermined transactions according to the transacted data (operation S220).
The test script generating module 830 is configured to generate a stress test script according to the predicted transaction amount of each of the plurality of predetermined transactions (operation S230).
The test execution module 840 is configured to run a stress test script to perform a stress test, and obtain a stress test result (operation S240).
According to an embodiment of the present disclosure, as shown in fig. 8, in an embodiment, the predicted transaction amount determination module 820 may include, for example, a transaction proportion determination submodule 821 and a predicted transaction amount determination submodule 822. The transaction proportion determination submodule 821 is configured to determine a transaction proportion for each of the plurality of predetermined transactions, based on the total data amount of the traded data and the data amount of the transaction data for each of the predetermined transactions included in the traded data (operation S321). The predicted transaction amount determination submodule 822 is configured to determine a predicted transaction amount for each predetermined transaction according to the transaction proportion and the stress test rule for each predetermined transaction (operation S322).
According to embodiments of the present disclosure, the predicted transaction amount determination submodule 822 may be operable to, for example: the predicted transaction amount for each second sub-period during the second time period is determined according to the stress test rule (operation S4221), and then the predicted transaction amount for each predetermined transaction during each second sub-period is determined according to the predicted transaction amount for each second sub-period and the transaction proportion for each predetermined transaction (operation S4222).
According to the embodiment of the present disclosure, as shown in fig. 8, in the embodiment, the predicted transaction amount determining module 820 may further include a correlation coefficient determining sub-module 823, a variation coefficient obtaining sub-module 824, and a variation coefficient determining sub-module 825 in addition to the transaction ratio determining sub-module 821 and the predicted transaction amount determining sub-module 822. The correlation coefficient determination sub-module 823 is configured to determine a correlation coefficient between any two predetermined transactions of the plurality of predetermined transactions according to the transaction data of each predetermined transaction included in the traded data (operation S523). The variation coefficient obtaining sub-module 824 is configured to obtain a predicted transaction variation coefficient of at least one predetermined transaction of the plurality of predetermined transactions (operation S524). The variation coefficient determining sub-module 825 is configured to determine a predicted transaction variation coefficient of the predetermined transaction other than the at least one predetermined transaction from the correlation coefficient and the predicted transaction variation coefficient of the at least one predetermined transaction (operation S525). Accordingly, the predicted transaction amount determining sub-module 822 is configured to determine the predicted transaction amount of each predetermined transaction in each second sub-period according to the predicted transaction total amount in each second sub-period, the transaction proportion for each predetermined transaction, and the transaction predicted variation coefficient of each predetermined transaction (operation S522).
According to an embodiment of the present disclosure, the transaction data includes the transacted data of the third time period, and the correlation coefficient determining sub-module 823 is specifically configured to: determining, according to transaction data of each of the predetermined transactions included in the traded data, transaction amounts of m third sub-periods included in the third period for each of the plurality of predetermined transactions, and obtaining transaction amount sets of each of the plurality of predetermined transactions (operation S6231), where each transaction amount set includes m transaction amounts corresponding to the m third sub-periods, respectively; determining transaction variation amounts of the plurality of predetermined transactions in two adjacent third sub-periods of the m third sub-periods according to the respective transaction amount sets of the plurality of predetermined transactions, resulting in (m-1) transaction variation amounts for each predetermined transaction (operation S6232); and determining a correlation coefficient between any two predetermined transactions of the plurality of predetermined transactions according to the (m-1) transaction variation amounts for each of the predetermined transactions (operation S6233). Wherein m is a natural number greater than 2.
According to an embodiment of the present disclosure, the correlation coefficient may be calculated by using the following formula:
Figure GDA0002226279680000191
/>
wherein R is xy A correlation coefficient between the x-th predetermined transaction and the y-th predetermined transaction in the plurality of predetermined transactions; d xi Is the ith transaction variation of the (m-1) transaction variations for the x predetermined transactions; d yi Is the ith transaction variation of the (m-1) transaction variations for the y predetermined transactions;
Figure GDA0002226279680000192
is an average of (m-1) transaction variance values for an x-th predetermined transaction; />
Figure GDA0002226279680000193
Is the average of the (m-1) transaction variance for the y-th scheduled transaction.
According to an embodiment of the present disclosure, as shown in fig. 8, in another embodiment, the predicted transaction amount determination module 820 may include, for example, a transaction amount determination submodule 821 'and a transaction amount prediction submodule 822'. The transaction amount determining sub-module 821' is configured to determine transaction amounts of a plurality of first sub-periods included in each of a plurality of days included in the first period for each of the plurality of predetermined transactions according to transaction data of the plurality of predetermined transactions, and obtain a plurality of transaction amount vectors for each of the plurality of predetermined transactions for the plurality of first sub-periods (operation S721). The trading volume prediction sub-module 822' is configured to determine a predicted trading volume for each of the plurality of predetermined trades in the second time period according to a trading volume vector for each of the plurality of predetermined trades in each of the plurality of sub-time periods (operation S722).
According to an embodiment of the present disclosure, the above-mentioned transaction amount prediction sub-module 822' is specifically configured to input the transaction amount vector for each of the first sub-periods for the plurality of predetermined transactions into the long-short term memory model, and determine the predicted transaction amount for each of the first sub-periods in the second period for the plurality of predetermined transactions.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, 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 any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the traded data acquisition module 810, the predicted trading volume determination module 820, the test script generation module 830, the test execution module 840, the trading proportion determination sub-module 821, the predicted trading volume determination sub-module 822, the correlation coefficient determination sub-module 823, the variation coefficient acquisition sub-module 824, the variation coefficient determination sub-module 825, the trading volume determination sub-module 821 'and the trading volume prediction sub-module 822' may be combined in one module/unit/sub-unit. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the traded data acquisition module 810, the predicted trading volume determination module 820, the test script generation module 830, the test execution module 840, the trading proportion determination submodule 821, the predicted trading volume determination submodule 822, the correlation coefficient determination submodule 823, the variation coefficient acquisition submodule 824, the variation coefficient determination submodule 825, the trading volume determination submodule 821 'and the trading volume prediction submodule 822' may be implemented at least partially as a hardware circuit, 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 by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented by any one of or a suitable combination of any of three implementations of software, hardware and firmware. Alternatively, at least one of the traded data acquisition module 810, the predicted trading volume determination module 820, the test script generation module 830, the test execution module 840, the trading proportion determination sub-module 821, the predicted trading volume determination sub-module 822, the correlation coefficient determination sub-module 823, the variation coefficient acquisition sub-module 824, the variation coefficient determination sub-module 825, the trading volume determination sub-module 821 'and the trading volume prediction sub-module 822' may be implemented at least in part as a computer program module that, when executed, may perform a corresponding function.
Fig. 9 schematically shows a block diagram of an electronic device adapted to perform a transaction stress testing method according to an embodiment of the present disclosure. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be embodied in the device/apparatus/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are 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 present 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, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
The flowchart 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.

Claims (8)

1. A transaction stress testing method, comprising:
acquiring transacted data, wherein the transacted data comprises transaction data of a plurality of predetermined transactions;
determining a predicted transaction amount for each of the plurality of predetermined transactions based on the traded data;
generating a pressure test script according to the respective predicted transaction amount of the plurality of predetermined transactions; and
operating the pressure test script to perform pressure test to obtain a pressure test result;
wherein determining the predicted transaction amount for each of the plurality of predetermined transactions comprises: determining a transaction proportion for each predetermined transaction in the plurality of predetermined transactions according to the total data amount of the transacted data and the data amount of the transaction data of each predetermined transaction included in the transacted data; and determining a predicted transaction amount for each of the predetermined transactions according to the transaction proportion and the stress test rule for each of the predetermined transactions;
determining the predicted transaction amount for each of the predetermined transactions comprises: determining a predicted total transaction amount of each second sub-period within the second period according to the stress test rule; and determining the predicted transaction amount of each predetermined transaction in each second sub-period according to the predicted total transaction amount of each second sub-period and the transaction proportion of each predetermined transaction;
determining the predicted transaction amount for each of the plurality of predetermined transactions further comprises: determining a correlation coefficient between any two of the plurality of predetermined transactions according to transaction data of each predetermined transaction included in the traded data; acquiring a predicted transaction variation coefficient of at least one predetermined transaction in the plurality of predetermined transactions; determining a predicted transaction variation coefficient of other predetermined transactions except the at least one predetermined transaction in the plurality of predetermined transactions according to the correlation coefficient and the predicted transaction variation coefficient of the at least one predetermined transaction, wherein the predicted transaction amount of each predetermined transaction in each second sub-period is determined according to the predicted transaction total amount of each second sub-period, the transaction proportion of each predetermined transaction and the predicted transaction variation coefficient of each predetermined transaction, and the predicted transaction variation coefficient is a predicted increase percentage of the predetermined transaction;
generating a stress test script based on the predicted transaction amounts for each of the plurality of predetermined transactions includes: according to the respective predicted transaction amounts of the plurality of predetermined transactions, the ratio of the predicted transaction amount of each predetermined transaction to the total predicted transaction amount of the plurality of predetermined transactions is determined, and then a pressure test script is generated according to the ratio, so that the ratio of the execution times of each predetermined transaction relative to the execution times of the total transaction included in the pressure test script is matched with the ratio of the determined transaction amount.
2. The method of claim 1, wherein the traded data comprises traded data for a first period of time; determining the predicted transaction amount for each of the plurality of predetermined transactions comprises:
determining transaction amounts of a plurality of first sub-periods included in each day of a plurality of days included in the first period of time for each of the plurality of predetermined transactions according to transaction data of the plurality of predetermined transactions, and obtaining a plurality of transaction amount vectors of each of the plurality of predetermined transactions for the plurality of first sub-periods; and
determining a predicted transaction amount for each of the plurality of predetermined transactions during each of the second time periods based on the transaction amount vector for each of the plurality of predetermined transactions during each of the plurality of first sub-time periods.
3. The method of claim 2, wherein determining the predicted transaction amount for each of the plurality of predetermined transactions during each of the first sub-periods of the second time period comprises:
inputting the trading volume vectors of the plurality of predetermined trades for each first sub-period into a long-short term memory model, and determining to obtain the predicted trading volume of each of the plurality of predetermined trades in each first sub-period in the second period.
4. The method of claim 1, wherein the transactional data comprises transacted data for a third period of time; determining a correlation coefficient between any two of the plurality of predefined transactions comprises:
according to the transaction data of each scheduled transaction included in the transacted data, determining the transaction amount of m third sub-periods included in the third period of time for each scheduled transaction, and obtaining a transaction amount set of each scheduled transaction, wherein each transaction amount set includes m transaction amounts corresponding to the m third sub-periods respectively;
determining transaction variation amounts of the plurality of predetermined transactions in two adjacent third sub-periods of the m third sub-periods according to the respective transaction amount sets of the plurality of predetermined transactions, so as to obtain (m-1) transaction variation amounts for each predetermined transaction; and
determining a correlation coefficient between any two of the predetermined transactions of the plurality of predetermined transactions according to the (m-1) transaction variation amounts for each of the predetermined transactions,
wherein m is a natural number greater than 2.
5. The method of claim 4, wherein the correlation coefficient is calculated using the following formula:
Figure QLYQS_1
wherein R is xy Is a plurality ofA correlation coefficient between the x-th predetermined transaction and the y-th predetermined transaction in the predetermined transactions; d is a radical of xi Is the ith transaction variation of the (m-1) transaction variations for the xth predetermined transaction; d yi Is the ith transaction variation of the (m-1) transaction variations for the y predetermined transactions;
Figure QLYQS_2
is an average of (m-1) transaction variance values for the xth predetermined transaction; />
Figure QLYQS_3
Is an average of (m-1) transaction variances for the y-th predetermined transaction.
6. A transaction stress testing device comprising:
the trading data acquisition module is used for acquiring trading data, and the trading data comprises trading data of a plurality of kinds of predetermined trading;
a predicted transaction amount determining module for determining a predicted transaction amount for each of the plurality of predetermined transactions according to the traded data;
the test script generating module is used for generating a pressure test script according to the respective predicted transaction amount of the various predetermined transactions; and
the test execution module is used for operating the pressure test script to perform pressure test to obtain a pressure test result;
wherein determining the predicted transaction amount for each of the plurality of predetermined transactions comprises: determining a transaction proportion for each predetermined transaction in the plurality of predetermined transactions according to the total data amount of the transacted data and the data amount of the transaction data of each predetermined transaction included in the transacted data; and determining a predicted transaction amount for each of the predetermined transactions according to the transaction proportion and the stress test rule for each of the predetermined transactions;
determining the predicted transaction amount for each of the predetermined transactions comprises: determining a predicted total transaction amount for each second sub-period within a second period according to the stress test rule; and determining the predicted transaction amount of each predetermined transaction in each second sub-period according to the predicted total transaction amount of each second sub-period and the transaction proportion of each predetermined transaction;
determining the predicted transaction amount for each of the plurality of predetermined transactions further comprises: determining a correlation coefficient between any two of the plurality of predetermined transactions according to transaction data of each predetermined transaction included in the traded data; acquiring a predicted transaction variation coefficient of at least one predetermined transaction in the plurality of predetermined transactions; determining a predicted transaction variation coefficient of other predetermined transactions except the at least one predetermined transaction in the plurality of predetermined transactions according to the correlation coefficient and the predicted transaction variation coefficient of the at least one predetermined transaction, wherein the predicted transaction amount of each predetermined transaction in each second sub-period is determined according to the predicted transaction total amount of each second sub-period, the transaction proportion of each predetermined transaction and the predicted transaction variation coefficient of each predetermined transaction, and the predicted transaction variation coefficient is a predicted increase percentage of the predetermined transaction;
generating a stress test script based on the predicted transaction amounts for each of the plurality of predetermined transactions includes: according to the respective predicted transaction amounts of the plurality of predetermined transactions, the ratio of the predicted transaction amount of each predetermined transaction to the total predicted transaction amount of the plurality of predetermined transactions is determined, and then a pressure test script is generated according to the ratio, so that the ratio of the execution times of each predetermined transaction relative to the execution times of the total transaction included in the pressure test script is matched with the ratio of the determined transaction amount.
7. An electronic device, comprising:
one or more processors; and
a storage device to store 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 implement the method of any of claims 1-5.
8. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 5.
CN201910799197.2A 2019-08-27 2019-08-27 Transaction pressure testing method and device, electronic device and readable storage medium Active CN110569190B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910799197.2A CN110569190B (en) 2019-08-27 2019-08-27 Transaction pressure testing method and device, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910799197.2A CN110569190B (en) 2019-08-27 2019-08-27 Transaction pressure testing method and device, electronic device and readable storage medium

Publications (2)

Publication Number Publication Date
CN110569190A CN110569190A (en) 2019-12-13
CN110569190B true CN110569190B (en) 2023-03-31

Family

ID=68776405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910799197.2A Active CN110569190B (en) 2019-08-27 2019-08-27 Transaction pressure testing method and device, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN110569190B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309594B (en) * 2020-01-17 2024-04-23 腾讯科技(深圳)有限公司 System testing method, device, equipment and storage medium
CN112381322A (en) * 2020-11-27 2021-02-19 上海九方云智能科技有限公司 Method and system for risk early warning based on option calculation fluctuation rate index
CN112799950A (en) * 2021-02-04 2021-05-14 北京中交兴路信息科技有限公司 Background service load capacity test system and method, storage medium and electronic device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7328134B1 (en) * 2004-02-26 2008-02-05 Sprint Communications Company L.P. Enterprise integration test tool
CN102184135A (en) * 2011-04-19 2011-09-14 中国工商银行股份有限公司 Instruction script based test method and system in bank system
CN102890803A (en) * 2011-07-21 2013-01-23 阿里巴巴集团控股有限公司 Method and device for determining abnormal transaction process of electronic commodity
CN106470133A (en) * 2015-08-20 2017-03-01 阿里巴巴集团控股有限公司 System pressure method of testing and device
CN108304322A (en) * 2018-01-12 2018-07-20 深圳壹账通智能科技有限公司 A kind of method for testing pressure and terminal device
CN108537544A (en) * 2018-04-04 2018-09-14 中南大学 A kind of transaction system method for real-time monitoring and its monitoring system
CN109165153A (en) * 2018-09-06 2019-01-08 华泰证券股份有限公司 A kind of performance test methods of high emulation securities business transaction class system
CN109636017A (en) * 2018-11-29 2019-04-16 深圳昆腾信息科技有限公司 A kind of financial transaction price expectation method, apparatus, medium and equipment
CN109919684A (en) * 2019-03-18 2019-06-21 上海盛付通电子支付服务有限公司 For generating method, electronic equipment and the computer readable storage medium of information prediction model
CN110009380A (en) * 2018-11-29 2019-07-12 阿里巴巴集团控股有限公司 Transaction data prediction technique, device, electronic equipment and computer storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7328134B1 (en) * 2004-02-26 2008-02-05 Sprint Communications Company L.P. Enterprise integration test tool
CN102184135A (en) * 2011-04-19 2011-09-14 中国工商银行股份有限公司 Instruction script based test method and system in bank system
CN102890803A (en) * 2011-07-21 2013-01-23 阿里巴巴集团控股有限公司 Method and device for determining abnormal transaction process of electronic commodity
CN106470133A (en) * 2015-08-20 2017-03-01 阿里巴巴集团控股有限公司 System pressure method of testing and device
CN108304322A (en) * 2018-01-12 2018-07-20 深圳壹账通智能科技有限公司 A kind of method for testing pressure and terminal device
CN108537544A (en) * 2018-04-04 2018-09-14 中南大学 A kind of transaction system method for real-time monitoring and its monitoring system
CN109165153A (en) * 2018-09-06 2019-01-08 华泰证券股份有限公司 A kind of performance test methods of high emulation securities business transaction class system
CN109636017A (en) * 2018-11-29 2019-04-16 深圳昆腾信息科技有限公司 A kind of financial transaction price expectation method, apparatus, medium and equipment
CN110009380A (en) * 2018-11-29 2019-07-12 阿里巴巴集团控股有限公司 Transaction data prediction technique, device, electronic equipment and computer storage medium
CN109919684A (en) * 2019-03-18 2019-06-21 上海盛付通电子支付服务有限公司 For generating method, electronic equipment and the computer readable storage medium of information prediction model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于大型金融系统软件的压力测试研究及实现;史亚娟等;《计算技术与自动化》;20061201;全文 *
金融软件性能测试的专业技能;孙兴建等;《中国金融电脑》;20090615(第06期);全文 *

Also Published As

Publication number Publication date
CN110569190A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN110569190B (en) Transaction pressure testing method and device, electronic device and readable storage medium
CN109272348B (en) Method and device for determining number of active users, storage medium and electronic equipment
CN110753920A (en) System and method for optimizing and simulating web page ranking and traffic
CN112598472B (en) Product recommendation method, device, system, medium and program product
CN113034171B (en) Business data processing method and device, computer and readable storage medium
CN111415199A (en) Customer prediction updating method and device based on big data and storage medium
CN110245684B (en) Data processing method, electronic device, and medium
CN111681112A (en) Method and device for managing release strategy and electronic equipment
CN111897706A (en) Server performance prediction method, device, computer system and medium
US11037183B2 (en) System and method for blending promotion effects based on statistical relevance
US10956920B1 (en) Methods and systems for implementing automated bidding models
CN112950250A (en) House value evaluation method and device, storage medium and intelligent terminal
CN114520773B (en) Service request response method, device, server and storage medium
WO2022156589A1 (en) Method and device for determining live broadcast click rate
CN113592263A (en) Resource return increment prediction method and device based on dynamic resource return increase ratio
CN113672834A (en) Data processing method and device, electronic equipment and computer readable medium
US20210065231A1 (en) Methods and apparatus to estimate census level impressions and unique audience sizes across demographics
US8881155B2 (en) Apportioning summarized metrics based on unsummarized metrics in a computing system
WO2019227415A1 (en) Scorecard model adjustment method, device, server and storage medium
CN117349546A (en) Method, device and system for generating information
US11973576B2 (en) Methods, systems and apparatus to determine panel attrition
US20220058664A1 (en) Methods and apparatus for audience measurement analysis
US20230208540A1 (en) Methods, systems and apparatus to determine panel attrition
CN115689152A (en) Enterprise yield prediction method, enterprise yield prediction device, electronic equipment and medium
US20230385858A1 (en) Methods and apparatus to adjust for non-response using big data

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