Case generation method and device

By extracting processing node data from offline data, automatically deducing and deduplication, and generating a use case pool for the target subprocessing process, the problem of high cost of manual construction of use cases is solved, and efficient and comprehensive use case generation and testing scenario coverage is achieved.

CN119322723APending Publication Date: 2025-01-17ALIPAY COM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411337645.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

In the prior art, the program development stage relies on manual construction of use cases, which consumes a lot of manpower and material costs and lacks efficient use case generation methods.

Method used

By extracting processing node data from offline data, automatically deduce alternative use cases of the target subprocessing process based on the associated key values, and perform deduplication processing to form a use case pool to achieve efficient generation of use cases.

Benefits of technology

It realizes efficient generation of use cases, maximizes the reduction of traffic data distribution in the target subprocessing process, reduces the cost of manually constructing use cases, and avoids insufficient coverage of test scenarios caused by knowledge barriers in professional fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322723A_ABST
    Figure CN119322723A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a use case generation method and device. Through the method, the node data corresponding to each processing node can be extracted from the offline data; and then, on the basis of the associated key value and the node data corresponding to each processing node, automatically deducing to obtain each alternative use case corresponding to the target sub-processing flow. Similarly, each alternative use case corresponding to each sub-processing flow can be obtained, so that a use case library corresponding to each sub-processing flow is obtained. Therefore, if the target test scene relates to multiple sub-processing flows subsequently, the target use case corresponding to the target test scene can be obtained through automatic derivation based on the use case library corresponding to each sub-processing flow related to the target test scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer technology, and in particular, to a method and device for generating a use case. Background Art

[0002] During the program development phase, it is usually necessary to test the developed program to avoid unforeseen errors or failures during actual operation. For example, use cases can be constructed using offline data, and then playback tests can be performed based on the use cases.

[0003] However, currently, use cases are mainly constructed manually, which requires a lot of manpower and material resources. Therefore, a more efficient method for constructing use cases is needed. Summary of the invention

[0004] In order to efficiently construct use cases, one or more embodiments of this specification provide a method and apparatus for generating use cases.

[0005] In a first aspect, one or more embodiments of the present specification provide a use case generation method, the method comprising: receiving a user's selection operation on at least one sub-processing flow; wherein each of the sub-processing flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case; generating a target processing flow according to the processing order of the at least one sub-processing flow; generating at least one target use case based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is respectively composed of at least one alternative use case having the same first associated key value.

[0006] In one possible implementation, generating at least one target use case based on each of the use case pools corresponding to the target processing flow includes: generating at least one target use case based on alternative use cases having the same first associated key value in each of the use case pools corresponding to the target processing flow.

[0007] In one possible implementation, generating at least one target use case based on the use case pool corresponding to the target processing flow includes: receiving the user's selection operation on the first alternative use case; and when the first alternative use case includes alternative use cases corresponding to all sub-processing flows in the target processing flow, generating at least one target use case based on each of the first alternative use cases having the same first associated key value.

[0008] In one possible implementation, the method further includes: when the first alternative use case includes alternative use cases corresponding to some sub-processing processes in the target processing process, generating at least one target use case based on the first alternative use case and the second alternative use case having the same first associated key value; wherein the second alternative use case is the alternative use case corresponding to the remaining sub-processing processes in the target processing process except the some sub-processing processes.

[0009] In a possible implementation, the use case pool is obtained by the following method: obtaining offline data corresponding to the target sub-processing flow; wherein the target sub-processing flow is any sub-processing flow in the sub-processing flow, and the target sub-processing flow includes multiple processing nodes; extracting node data corresponding to each of the processing nodes from the offline data; constructing at least one node data with the same second associated key value as an alternative use case according to the processing time sequence of each of the processing nodes; and forming a use case pool corresponding to the target sub-processing flow based on the constructed alternative use cases.

[0010] In a possible implementation, the extracting of node data corresponding to each of the processing nodes from the offline data includes: extracting node data corresponding to each of the processing nodes from the offline data based on feature identifiers corresponding to each of the processing nodes; wherein different processing nodes correspond to different feature identifiers.

[0011] In a possible implementation, according to the processing time sequence of each processing node, at least one node data with the same second associated key value is constructed as an alternative use case, including: defining the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0012] In one possible implementation, the method further includes: traversing each of the alternative use cases, and when the alternative use cases include repeated node combinations, performing a first deduplication process on the alternative use cases, so that one of the node combinations is retained in the alternative use cases after the first deduplication process, wherein the node combination includes at least two processing nodes; and when the use case pool includes the same alternative use case after the first deduplication process, performing a second deduplication process on the use case pool after the first deduplication process, so that the same alternative use case is not included in the use case pool after the second deduplication process.

[0013] In a possible implementation manner, the second association key value is the same as the first association key value.

[0014] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0015] In a second aspect, one or more embodiments of the present specification provide a use case generation method, the method comprising: obtaining offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow comprises a plurality of processing nodes; extracting node data corresponding to each of the processing nodes from the offline data; and constructing at least one node data having the same second associated key value as an alternative use case in chronological order of processing time of each of the processing nodes.

[0016] In a possible implementation, the extracting of node data corresponding to each of the processing nodes from the offline data includes: extracting node data corresponding to each of the processing nodes from the offline data based on feature identifiers corresponding to each of the processing nodes; wherein different processing nodes correspond to different feature identifiers.

[0017] In a possible implementation, according to the processing time sequence of each processing node, at least one node data with the same second associated key value is constructed as an alternative use case, including: defining the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0018] In one possible implementation, the method further includes: traversing each of the alternative use cases, and when the alternative use cases include repeated node combinations, performing a first deduplication process on the alternative use cases, so that one of the node combinations is retained in the alternative use cases after the first deduplication process, wherein the node combination includes at least two processing nodes; and when the use case pool includes the same alternative use case after the first deduplication process, performing a second deduplication process on the use case pool after the first deduplication process, so that the same alternative use case is not included in the use case pool after the second deduplication process.

[0019] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0020] In a third aspect, one or more embodiments of the present specification provide a use case generation device, the device comprising: a receiving module, used to receive a user's selection operation on at least one sub-processing flow; wherein each of the sub-processing flows is configured with its own corresponding use case pool, and the use case pool includes at least one alternative use case; a target processing flow generation module, used to generate a target processing flow according to the processing order of the at least one sub-processing flow; a first use case generation module, used to generate at least one target use case based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is respectively composed of at least one alternative use case having the same first associated key value.

[0021] In one possible implementation, the first use case generation module is used to generate at least one target use case based on the use case pools corresponding to the target processing flow; specifically: the first use case generation module is used to generate at least one target use case based on the alternative use cases having the same first associated key value in the use case pools corresponding to the target processing flow.

[0022] In one possible implementation, the target processing flow generation module is used to generate a target processing flow according to the processing order of the at least one sub-processing flow; specifically: the target processing flow generation module is used to receive the user's selection operation on the first alternative use case; when the first alternative use case includes alternative use cases corresponding to all sub-processing flows in the target processing flow, at least one target use case is generated based on each of the first alternative use cases having the same first associated key value.

[0023] In one possible implementation, the target processing flow generation module is also used to: when the first alternative use case includes alternative use cases corresponding to some sub-processing flows in the target processing flow, generate at least one target use case based on the first alternative use case and the second alternative use case having the same first associated key value; wherein the second alternative use case is the alternative use case corresponding to the remaining sub-processing flows in the target processing flow except the some sub-processing flows.

[0024] In one possible implementation, the device also includes: an acquisition module, used to acquire offline data corresponding to the target sub-processing flow; wherein the target sub-processing flow is any sub-processing flow in the sub-processing flow, and the target sub-processing flow includes multiple processing nodes; an extraction module, used to extract node data corresponding to each of the processing nodes from the offline data; a second use case generation module, used to construct at least one node data with the same second associated key value as an alternative use case according to the processing time sequence of each of the processing nodes; a use case pool generation module, used to form a use case pool corresponding to the target sub-processing flow based on the constructed alternative use cases.

[0025] In a possible implementation, the extraction module is used to extract the node data corresponding to each processing node from the offline data based on the feature identifier corresponding to each processing node; wherein different processing nodes correspond to different feature identifiers.

[0026] In one possible implementation, the second use case generation module is used to define the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0027] In one possible implementation, the device also includes: a first deduplication processing module, which is used to traverse each of the alternative use cases, and when the alternative use cases include repeated node combinations, perform a first deduplication processing on the alternative use cases, so that one of the node combinations is retained in the alternative use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes; and a second deduplication processing module, which is used to, when the use case pool includes the same alternative use case after the first deduplication processing, perform a second deduplication processing on the use case pool after the first deduplication processing, so that the same alternative use case is not included in the use case pool after the second deduplication processing.

[0028] In a possible implementation manner, the second association key value is the same as the first association key value.

[0029] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0030] In a fourth aspect, one or more embodiments of the present specification provide a use case generation device, the device comprising: an acquisition module, used to acquire offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow comprises a plurality of processing nodes; an extraction module, used to extract node data corresponding to each of the processing nodes from the offline data; and a second use case generation module, used to construct at least one node data having the same second associated key value as an alternative use case in chronological order of processing time of each of the processing nodes.

[0031] In a possible implementation, the extraction module is used to extract the node data corresponding to each processing node from the offline data based on the feature identifier corresponding to each processing node; wherein different processing nodes correspond to different feature identifiers.

[0032] In one possible implementation, the second use case generation module is used to define the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0033] In one possible implementation, the device also includes: a first deduplication processing module, used to traverse each of the alternative use cases, and when the alternative use cases include repeated node combinations, perform a first deduplication processing on the alternative use cases, so that one of the node combinations is retained in the alternative use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes; a second deduplication processing module, used to, when the use case pool includes the same alternative use case after the first deduplication processing, perform a second deduplication processing on the use case pool after the first deduplication processing, so that the same alternative use case is not included in the use case pool after the second deduplication processing.

[0034] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0035] In a fifth aspect, one or more embodiments of the present specification also provide an electronic device, comprising a memory and a processor; the memory is used to store a computer program product; the processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the use case generation method of the first aspect or the second aspect mentioned above is implemented.

[0036] In a sixth aspect, one or more embodiments of the present specification further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the use case generation method of the first aspect or the second aspect described above is implemented.

[0037] In summary, the use case generation method provided by one or more embodiments of this specification can first extract the node data corresponding to each processing node from the offline data. Afterwards, the alternative use cases corresponding to the target sub-processing flow can be automatically derived based on the second association key and the node data corresponding to each processing node. In this way, by automatically deriving the alternative use cases corresponding to the target sub-processing flow, not only can the use cases be generated efficiently, but also the traffic data distribution of each processing node in the target sub-processing flow can be restored to the greatest extent.

[0038] In addition, one or more embodiments of the present specification provide a use case generation method, and a use case pool corresponding to multiple sub-processes can be pre-built. Afterwards, the use case corresponding to the target test scenario can be automatically derived based on the use case pool corresponding to the sub-processes involved in the target test scenario. In this way, when the target test scenario involves multiple different sub-processes, the use case corresponding to the target test scenario can be automatically derived based on the alternative use cases in the use case library of each sub-process, without being restricted by the knowledge barriers of various professional fields, so that use cases that can cover various test scenarios can be constructed. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of one or more embodiments of the present specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of one or more embodiments of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A flowchart of a use case generation method provided for one or more embodiments of this specification;

[0041] Figure 2 A flowchart of another use case generation method provided for one or more embodiments of this specification;

[0042] Figure 3 A schematic flow chart of a first deduplication processing method provided in one or more embodiments of this specification;

[0043] Figure 4 A schematic flow chart of a second deduplication processing method provided in one or more embodiments of this specification;

[0044] Figure 5 A flowchart of another use case generation method provided for one or more embodiments of this specification;

[0045] Figure 6 A flowchart of another use case generation method provided for one or more embodiments of this specification;

[0046] Figure 7 A structural block diagram of a use case generation device provided for one or more embodiments of this specification;

[0047] Figure 8 A structural block diagram of another use case generation device provided for one or more embodiments of this specification;

[0048] Fig. 9A structural block diagram of an electronic device provided for one or more embodiments of this specification. DETAILED DESCRIPTION

[0049] One or more embodiments of the present invention are further described in detail below through the accompanying drawings and examples. Through these descriptions, the features and advantages of one or more embodiments of the present invention will become clearer and more specific.

[0050] The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise noted.

[0051] In addition, the technical features involved in different implementations of one or more embodiments of this specification described below can be combined with each other as long as they do not conflict with each other.

[0052] To facilitate understanding, the application scenarios of the technical solutions provided by one or more embodiments of this specification are first described below.

[0053] During the program development phase, it is usually necessary to test the development process, such as playback testing, to avoid unforeseen errors or failures during actual operation.

[0054] Playback testing is to connect the traffic data of different processing processes in series to form a use case, and then use the use case simulation to run in the test environment to test and verify the development process.

[0055] Among them, playback testing usually requires the construction of a large number of use cases to cover various scenarios in the development process as comprehensively as possible. Especially for relatively complex development processes, a large number of use cases are required.

[0056] For example, taking the development process as the payment process, the payment process may include multiple sub-processes such as placing an order, rendering the cashier, submitting payment, rendering the payment result page, splitting accounts, and refunding. Among them, each sub-process usually also includes one or more processing nodes. Taking the sub-process as submitting payment as an example, submitting payment may further include processing nodes such as payment method selection, payment information filling, payment request submission, and security verification.

[0057] Among them, for each sub-process, the number of corresponding use cases is very large. If the use cases are constructed entirely manually, a large amount of manpower and material resources will be consumed. Therefore, a method for constructing use cases more efficiently needs to be provided.

[0058] In order to solve the problem that relying entirely on manual construction of use cases requires a large amount of manpower and material resources, one or more embodiments of this specification provide a use case generation method that can more efficiently construct use cases for any sub-processing flow by fully mining the correlation of offline data.

[0059] The following describes an embodiment of a use case generation method provided by one or more embodiments of this specification.

[0060] See also Figure 1 , Figure 1 The flowchart of a use case generation method provided in one or more embodiments of this specification is shown. The method can be applied to a server, a terminal device, or a test system. The following takes the application of the method to a test system as an example. Figure 1 As shown, the method may include the following steps:

[0061] Step S102, obtaining offline data corresponding to the target sub-processing flow; wherein the target sub-processing flow includes multiple processing nodes.

[0062] First of all, it should be noted that the use case generation method provided in one or more embodiments of this specification can be used to generate use cases corresponding to any sub-processing flow. One or more embodiments of this specification only use the use case corresponding to the target sub-processing flow as an example for illustrative explanation, wherein the target sub-processing flow can be any sub-processing flow in each sub-processing flow.

[0063] When generating a use case corresponding to a target sub-processing flow, offline data corresponding to the target sub-processing flow may be first obtained, wherein the offline data corresponding to the target sub-processing flow may include offline data corresponding to each processing node in the target sub-processing flow.

[0064] Offline data can also be called offline traffic data, which can be data generated in a production environment. The production environment refers to the real working environment where applications, services, or systems are actually deployed and run, that is, real data generated in response to real requests from real users. For example, offline data can include application logs generated in response to receiving various requests, etc. These data can be specifically stored in the corresponding storage location as an offline database for subsequent data analysis, mining, construction of use cases, etc.

[0065] One or more embodiments of this specification do not limit the storage method of offline data for different sub-processes in the offline database. For example, offline data for different sub-processes can be stored separately. For example, the offline database may include offline data packets corresponding to each sub-process, such as placing an order, rendering a cashier, submitting a payment, rendering a payment result page, splitting accounts, and refunding. For another example, the offline database may not distinguish between offline data of each sub-process.

[0066] That is, if the offline database includes offline data packets corresponding to each sub-process flow, the offline data packet corresponding to the target sub-process flow can be obtained. If the offline database does not distinguish between offline data of different sub-process flows, the offline data including each sub-process flow can be obtained.

[0067] Step S104: extracting node data corresponding to each processing node from the offline data.

[0068] After obtaining the offline data, the offline data may be split based on each processing node to obtain node data corresponding to each processing node.

[0069] One or more embodiments of this specification do not limit the specific implementation method of obtaining the node data corresponding to each processing node.

[0070] In a possible implementation, feature identifiers corresponding to each processing node may be predefined, and then, based on the feature identifiers corresponding to each processing node, node data corresponding to each processing node may be extracted from offline data.

[0071] The feature identifier can be used to characterize the processing node corresponding to the data, and different processing nodes correspond to different feature identifiers. Specifically, the feature identifier can be identification information of one or more dimensions of the offline data.

[0072] For example, taking the example that offline data includes log data and summary logs corresponding to each log data, the summary log usually records the main activities corresponding to the log data in a specific field, and these activities correspond to each processing node. In this way, the information corresponding to the specific field in each processing node can be defined in advance as the feature identifier corresponding to each processing node. Then, the processing node corresponding to the summary log can be determined by matching the information corresponding to the specific field in the summary log with each processing node. Furthermore, the log data corresponding to the summary log can be determined as the node data corresponding to the processing node. In this way, the node data corresponding to each processing node can be obtained according to the above method.

[0073] In a possible implementation, a development or tester may input a feature identifier corresponding to each processing node, and then extract node data corresponding to each processing node from offline data based on the received feature identifier corresponding to each processing node.

[0074] After obtaining the node data corresponding to each processing node, at least one use case (hereinafter referred to as an alternative use case) corresponding to the target sub-processing flow can be automatically derived according to the following step 106.

[0075] In order to avoid the problem of disordered expansion of derivation results and nested loops, one or more embodiments of this specification may predefine the last processing node of the target subprocessing flow. In this way, the node data corresponding to the last processing node and each processing node before the last processing node may be obtained based on the offline data corresponding to the target subprocessing flow.

[0076] For example, Figure 2 As shown, the offline data can be divided into N processing nodes based on the feature identifiers corresponding to each processing node, where N is a positive integer greater than 0. Furthermore, processing node N can be defined as the last processing node.

[0077] Step S106: According to the processing time sequence of each processing node, at least one node data having the same inter-node association key value (also referred to as a second association key value or a second association key) is constructed as an alternative use case.

[0078] It should be understood that each node data corresponding to the target sub-process may include node data corresponding to multiple operations initiated by the same user or different users. Taking the target sub-process as payment submission as an example, each node data corresponding to payment submission may include node data corresponding to different transactions.

[0079] It should also be understood that the processing nodes involved in different operations may be the same or different. Still taking the target sub-processing flow as payment submission as an example, the first transaction may involve four nodes: payment method selection, payment information filling, payment request submission, and security verification. The second transaction may involve three nodes: payment method selection, payment information filling, and payment request submission. The second transaction may involve three nodes: payment method selection, payment request submission, and security verification. They are not listed here one by one.

[0080] In one or more embodiments of this specification, after obtaining the node data corresponding to each processing node, the node data belonging to the same operation can be connected in series according to the order of the processing time of each processing node to obtain an alternative use case. Repeating such steps can obtain alternative use cases corresponding to different operations.

[0081] In a possible implementation, the node data belonging to the same second association key can be associated through the second association key, and then the associated node data can be connected in series according to the order of processing time of each processing node to obtain an alternative use case. By repeating such steps, alternative use cases corresponding to different second association keys can be obtained.

[0082] The second association key may refer to information, parameters or identifiers that can be used to associate node data belonging to the same operation (e.g., belonging to the same transaction operation). The second association key may be predefined or input by a developer or tester, and one or more embodiments of this specification do not limit this.

[0083] The second association key may be different for different target sub-processing flows. In this way, different second association keys may be matched in advance for different target sub-processing flows. In specific implementation, the test system may select a second association key that matches the target sub-processing flow according to the target sub-processing flow. Alternatively, the developer or tester may input a second association key that matches the target sub-processing flow.

[0084] Optionally, the associated key may be at least one of a transaction number, a contract number, and a session handle.

[0085] A transaction number is usually a unique identifier used to identify a specific transaction or transaction. For example, in a financial transaction system, an e-commerce platform, or other system that needs to track and manage transactions, the transaction number is a key identifier for tracking each individual transaction.

[0086] The contract number is usually used to identify a contract or agreement. In a contract management system, legal document management system, or other system that needs to track and manage contracts, the contract number is a number or identifier that uniquely identifies each contract.

[0087] A session handle is an identifier used to identify and manage session state in network communications or applications. It is usually used to track the interaction status between a user or client and a server to ensure a consistent context or state between multiple requests.

[0088] The use of identifiers such as transaction numbers, contract numbers, and session handles can ensure that the system can effectively track and manage the status and progress of key entities. Therefore, at least one of the transaction number, contract number, and session handle can be used as the second association key to identify node data belonging to the same operation.

[0089] In this way, Figure 2 As shown, after obtaining the node data corresponding to each processing node and determining the second association key, the alternative use cases corresponding to the target sub-processing flow can be automatically derived based on the second association key and the node data corresponding to each processing node.

[0090] Step S108: Based on the constructed candidate use cases, a use case pool corresponding to the target sub-processing flow may be formed.

[0091] According to the above steps, at least one alternative use case can be obtained. The at least one alternative use case obtained in this way can form a use case pool corresponding to the target sub-processing flow, and the use case pool includes at least one alternative use case.

[0092] One or more embodiments of this specification may also process the obtained at least one alternative use case as follows:

[0093] Traverse each alternative use case, and if the alternative use case includes a repeated node combination, perform a first deduplication process on the alternative use case, so that one node combination is retained in the alternative use case after the first deduplication process, wherein the node combination includes at least two processing nodes. If the use case pool after the first deduplication process includes the same alternative use case, perform a second deduplication process on the use case pool after the first deduplication process, so that the use case pool after the second deduplication process does not include the same alternative use case.

[0094] Exemplarily, the at least one alternative use case obtained includes alternative use case 1. Figure 3 As shown, alternative use case 1 includes sequentially arranged processing node 1, processing node 2, processing node 3, processing node 2, processing node 3, and processing node 4. Among them, there is a repeated node combination (processing node 2-processing node 3) between processing node 1 and processing node 4.

[0095] Since one node combination can already cover the processing flow corresponding to the node combination, that is, one node combination can be used to test the processing flow corresponding to the node combination. Therefore, the first deduplication process can be performed for the repeated node combinations to retain only one node combination. Correspondingly, Figure 3 As shown, after the first deduplication process of the candidate use case 1, the candidate use case 1 obtained includes a node combination (processing node 2-processing node 3).

[0096] It should be noted that repeated node combinations refer to multiple node combinations containing the same processing nodes, and the order of the included processing nodes is also the same.

[0097] After the first deduplication process, the use case pool may include the same candidate use cases. Figure 4 As shown, after the first deduplication process, candidate use case 1 is processed to include sequentially arranged processing nodes 1, 2, 3, and 4. Obviously, candidate use case 1 is the same as candidate use case 2 at this time, so that only one of candidate use case 1 and candidate use case 2 can be retained in the use case pool. In other words, after the first deduplication process, if the use case pool includes the same candidate use case, the second deduplication process is performed on the use case pool after the first deduplication process to remove duplicate candidate use cases, so that the use case pool after the second deduplication process does not include the same candidate use case.

[0098] In this way, through the above-mentioned first deduplication processing, redundant processing nodes in each candidate case can be removed, making each candidate case more streamlined, thereby improving the efficiency of the test phase. In addition, through the above-mentioned second deduplication processing, repeated candidate cases in the case pool can be removed to avoid using the same candidate case for subsequent testing, resulting in a waste of resources.

[0099] One or more embodiments of the present specification may also manually screen the at least one candidate case. Specifically, after obtaining at least one candidate case, it is possible to manually confirm whether each candidate case meets the requirements, so as to remove the candidate cases that do not meet the requirements from the case pool. Figure 2 As shown, after manual screening, the alternative use cases corresponding to processing node 1 - processing node 3 - processing node N are removed.

[0100] The use case pool obtained after the above processing can be saved as the use case pool corresponding to the target sub-process flow. In this way, the use case pool corresponding to the target sub-process flow can be used to test the target sub-process flow later, such as playback testing.

[0101] It should be noted that one or more embodiments of this specification do not limit the target sub-process flow. Specifically, the target sub-process flow can be any sub-process flow involved in the application or system to be tested. For example, the application or system to be tested can be an e-commerce platform, a video playback application, etc.

[0102] In summary, the use case generation method provided by one or more embodiments of this specification can first extract the node data corresponding to each processing node from the offline data. Afterwards, the alternative use cases corresponding to the target sub-processing flow can be automatically derived based on the second association key and the node data corresponding to each processing node. In this way, by automatically deriving the alternative use cases corresponding to the target sub-processing flow, not only can the use cases be generated efficiently, but also the traffic data distribution of each processing node in the target sub-processing flow can be restored to the greatest extent.

[0103] For the entire development process, the entire development process usually includes multiple sub-processes. If the target test scenario involves only one sub-process, the use case generation method provided in the above embodiment can be used to obtain a use case pool corresponding to the sub-process, and then the sub-process is tested based on the alternative use cases in the use case pool.

[0104] If the target test scenario involves multiple sub-processes, use cases involving the multiple sub-processes need to be generated. However, since each sub-process usually belongs to its own independent professional field, there may be barriers to professional knowledge between the sub-processes. In this way, if the use case is constructed by relying on expert experience, it may be limited by the knowledge barriers of each professional field, making it difficult to construct use cases that can cover various scenarios, and the possibility of online problems caused by the uncovered scenarios is very high.

[0105] In order to solve the problem that the construction of use cases relying on expert experience may be restricted by the knowledge barriers of various professional fields, one or more embodiments of this specification provide another use case generation method, in which a use case pool corresponding to multiple sub-processes can be pre-constructed. For example, the use case generation method provided by the above embodiment can be used to obtain a use case pool corresponding to multiple sub-processes. Afterwards, the use case corresponding to the target test scenario can be automatically derived based on the use case pool corresponding to the sub-processes involved in the target test scenario. In this way, when the target test scenario involves multiple different sub-processes, the use case corresponding to the target test scenario can be automatically derived based on the alternative use cases in the use case library of each sub-process. It is no longer necessary to rely on expert experience to construct use cases, and it will not be restricted by the knowledge barriers of various professional fields, so that use cases that can cover various test scenarios can be constructed.

[0106] The following describes another example of a method for generating a use case provided by one or more embodiments of this specification.

[0107] See also Figure 5 , Figure 5 A flowchart of another use case generation method provided in one or more embodiments of this specification is provided. The method can be applied to a server, a terminal device, or a test system. The following takes the application of the method to a test system as an example. Figure 5 As shown, the method may include the following steps:

[0108] Step S202: receiving a user's selection operation on at least one sub-process flow.

[0109] For example, Figure 6 As shown, the test system can be configured with multiple subdomain component options such as subdomain component A, subdomain component B, subdomain component C, subdomain component D and subdomain component E, and each subdomain component corresponds to a different subprocess flow. Among them, the test system can be pre-configured with use case pools corresponding to each subprocess flow, and each use case pool can include at least one alternative use case. For example, subdomain component A is configured with use case pool A, subdomain component B is configured with use case pool B, subdomain component C is configured with use case pool C, subdomain component D is configured with use case pool D, and subdomain component E is configured with use case pool E.

[0110] The method for constructing the use case pool corresponding to the configuration of each sub-domain component can refer to the description of the use case generation method provided in the above embodiment, which will not be repeated here.

[0111] Optionally, the display interface of the test system may display multiple subdomain component options, so that the user can select one or more of the multiple subdomain component options. In response to receiving the user's selection operation on one or more subdomain component options, the test system may call the use case pool corresponding to the selected subdomain component option.

[0112] The user may be a person who can operate the test system, for example, the user may be a tester.

[0113] It should be noted that if the target test scenario includes one sub-process flow, the user can select the sub-domain component option corresponding to the one sub-process flow. If the target test scenario includes multiple sub-process flows, the user can select the sub-domain component options corresponding to the multiple sub-process flows respectively.

[0114] Step S204: Generate a target processing flow according to the processing sequence of at least one sub-processing flow.

[0115] It should be understood that if a user selects a sub-process flow, the sub-process flow can be used as the target process flow. If a user selects multiple sub-process flows, the multiple sub-process flows can be sorted and then connected in series to generate the target process flow.

[0116] In a possible implementation, the multiple sub-processing flows are sorted to generate a target processing flow, which can be implemented in the following manner: each sub-domain component can be configured in advance according to the processing order of each sub-processing flow. In this way, after the user selects each sub-domain component, the selected sub-domain components can be automatically sorted based on the processing order of each sub-processing flow, thereby generating a target processing flow.

[0117] For example, Figure 6 As shown, the pre-configured subdomain components include subdomain component A, subdomain component B, subdomain component C, subdomain component D, and subdomain component E. In response to receiving the user's selection operation on subdomain component A, subdomain component C, subdomain component D, and subdomain component E, the order of each sub-processing flow in the generated target processing flow is as follows: subdomain component A-subdomain component C-subdomain component D-subdomain component E.

[0118] In a possible implementation, the multiple sub-processing flows are sorted to generate a target processing flow, which can also be implemented in the following manner: the processing relationship between the sub-domain components in the global component can be pre-configured. Then, based on the sub-domain components selected by the user and the processing relationship between the sub-domain components in the global component, the processing relationship between the sub-domain components selected by the user is determined, thereby obtaining the corresponding target processing flow. Among them, the global component can include all sub-domain components. The processing relationship can include the processing order between the sub-domain components.

[0119] In one possible implementation, the multiple sub-processing flows are sorted to generate a target processing flow. This can also be implemented by receiving a user confirmation operation on the processing order of the selected multiple sub-domain components, and generating the target processing flow according to the confirmed processing order.

[0120] That is, after the user selects multiple sub-domain components, the processing order of the multiple sub-domain components can be adjusted, and after the processing order is adjusted, a confirmation operation can be performed. In this way, in response to receiving the user's confirmation operation on the processing order of the selected multiple sub-domain components, the test system can generate a target processing flow according to the confirmed processing order.

[0121] Step S206: Generate at least one target use case based on each use case pool corresponding to the target processing flow.

[0122] The target processing flow includes one or more sub-processing flows, and each sub-processing flow corresponds to its own use case pool. In this way, the target use case corresponding to the target processing flow can be constructed based on the use case pools corresponding to the sub-processing flows in the target processing flow.

[0123] In one possible implementation, at least one target use case is generated based on the use case pools corresponding to the target processing flow. This can be implemented in the following way: at least one target use case can be generated based on the alternative use cases having the same component association key value (also referred to as the first association key value or the first association key) in the use case pools corresponding to the target processing flow.

[0124] The first association key may refer to information, parameters or identifiers that can be used to associate alternative use cases of each sub-process flow belonging to the same operation (for example, belonging to the same transaction operation). The first association key may be pre-defined or input by a developer or tester, and one or more embodiments of this specification do not limit this.

[0125] Similar to step S106, after obtaining the use case pools and the first associated key corresponding to each sub-process flow, at least one target use case corresponding to the target process flow can be automatically derived. This implementation is particularly suitable for situations where the tester is not very familiar with the different sub-process flows in the target process flow, that is, there are technical barriers between different sub-domains.

[0126] It should be noted that the information, parameters or identifiers used by the first association key and the second association key may be the same or different, and one or more embodiments of this specification do not limit this. The first association key can refer to the above description of the second association key, which will not be repeated here.

[0127] It should also be noted that the method of generating at least one target use case based on the alternative use cases having the same first associated key can refer to the description of step S106, which will not be repeated here.

[0128] In one possible implementation, at least one target use case is generated based on the pool of use cases corresponding to the target processing flow, and the implementation can also be carried out in the following manner: receiving a user's selection operation on a first alternative use case. In the case where the first alternative use case includes alternative use cases corresponding to all sub-processing flows in the target processing flow, at least one target use case is generated based on each first alternative use case with the same first association key. In the case where the first alternative use case includes alternative use cases corresponding to some sub-processing flows in the target processing flow, at least one target use case is generated based on the first alternative use case and the second alternative use case with the same first association key; wherein the second alternative use case is an alternative use case corresponding to the remaining sub-processing flows except some sub-processing flows in the target processing flow.

[0129] This implementation is particularly suitable for situations where the tester is familiar with part or all of the word processing flow in the target processing flow.

[0130] For example, for a sub-process flow that the tester is familiar with, the tester can select one or more alternative use cases (which can be called first alternative use cases) from the use case library corresponding to the sub-process flow to participate in generating the target use case. For a sub-process flow that the tester is not familiar with, the tester does not need to select one or more alternative use cases from the corresponding use case library, but uses all the alternative use cases in the use case library of the unfamiliar sub-process flow as second alternative use cases to participate in generating the target use case.

[0131] In this way, if the first candidate use case includes the candidate use cases corresponding to all the sub-processes in the target process flow, for example, if the tester is familiar with all the sub-processes in the target process flow, the tester can select one or more candidate use cases from the use case library corresponding to all the sub-processes in the target process flow. In this case, at least one target use case can be generated based on the first candidate use case with the same first association key.

[0132] If the first candidate use case includes the candidate use cases corresponding to some sub-processes in the target process flow. For example, if the tester is familiar with some sub-processes in the target process flow, the tester can select one or more candidate use cases from the use case library corresponding to the sub-processes. And, all the candidate use cases in the use case library corresponding to the remaining sub-processes in the target process flow are used as the second candidate use cases. In this case, at least one target use case can be generated based on the first candidate use case and the second candidate use case having the same first association key.

[0133] For example, taking the target processing flow as subdomain component A-subdomain component C-subdomain component D-subdomain component E as an example, the following can be generated: Figure 6 Multiple target use cases are shown. Each target use case may include alternative use cases in subdomain component A, subdomain component C, subdomain component D, and subdomain component E. In this way, the target processing flow can be tested using each generated target use case.

[0134] Among them, the node A-1 in the target use case represents the node 1 in the use case pool A, that is, A represents the use case pool corresponding to the node, and 1 represents the node to which the node belongs in the use case pool. Similarly, the node C-1 represents the node 1 in the use case pool C, which will not be explained one by one here.

[0135] In one or more embodiments of the present specification, after obtaining the target use cases corresponding to the target processing flow, the obtained target use cases can be further manually screened to remove the target use cases that do not meet the requirements. Afterwards, the target processing flow can be tested based on the manually screened target use cases.

[0136] In summary, the use case generation method provided in one or more embodiments of the present specification can pre-construct a use case pool corresponding to each sub-process flow. Afterwards, based on the target test scenario, the sub-process flow involved in the target test scenario can be selected to form a target processing flow. Furthermore, based on each alternative use case in each use case pool corresponding to the target processing flow, at least one target use case corresponding to the target processing flow can be generated. In this way, since the use case pool corresponding to each sub-process flow is pre-constructed, when faced with a situation where the target test scenario involves multiple different sub-process flows, it is no longer necessary to rely on expert experience to construct use cases, and it will not be limited by the knowledge barriers of various professional fields, and use cases that can cover various test scenarios can be constructed.

[0137] It can be understood that the above embodiments are only examples and can be modified in actual implementation. Those skilled in the art can understand that the modification methods of the above embodiments without creative labor fall within the protection scope of one or more embodiments of this specification and will not be repeated in the embodiments.

[0138] Based on the same inventive concept, one or more embodiments of the present specification also provide a use case generation device. Since the principle of solving the problem by the use case generation device is similar to that of the aforementioned use case generation method, the implementation of the use case generation device can refer to the implementation of the aforementioned use case generation method, and the repeated parts will not be repeated.

[0139] See also Figure 7 , Figure 7 This is a structural block diagram of a use case generation device provided in one or more embodiments of this specification. Figure 7 As shown, the use case generation device 300 may include: a receiving module 301, a target processing flow generation module 302, and a first use case generation module 303.

[0140] The receiving module 301 can be used to receive a user's selection operation on at least one sub-process flow; wherein each of the sub-process flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case.

[0141] The target processing flow generation module 302 may be configured to generate a target processing flow according to the processing sequence of the at least one sub-processing flow.

[0142] The first use case generation module 303 can be used to generate at least one target use case based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is composed of at least one alternative use case having the same first associated key value.

[0143] In one possible implementation, the first use case generation module 303 is used to generate at least one target use case based on the use case pools corresponding to the target processing flow; specifically: the first use case generation module 303 is used to generate at least one target use case based on the alternative use cases having the same first associated key value in the use case pools corresponding to the target processing flow.

[0144] In one possible implementation, the target processing flow generation module 302 is used to generate the target processing flow 302 according to the processing order of the at least one sub-processing flow; specifically: the target processing flow generation module is used to receive the user's selection operation on the first alternative use case; when the first alternative use case includes alternative use cases corresponding to all sub-processing flows in the target processing flow, at least one target use case is generated based on each of the first alternative use cases having the same first associated key value.

[0145] In one possible implementation, the target processing flow generation module 302 is further used to: when the first alternative use case includes alternative use cases corresponding to some sub-processing flows in the target processing flow, generate at least one target use case based on the first alternative use case and the second alternative use case having the same first associated key value; wherein the second alternative use case is the alternative use case corresponding to the remaining sub-processing flows in the target processing flow except the some sub-processing flows.

[0146] In one possible implementation, the device also includes: an acquisition module, used to acquire offline data corresponding to the target sub-processing flow; wherein the target sub-processing flow is any sub-processing flow in the sub-processing flow, and the target sub-processing flow includes multiple processing nodes; an extraction module, used to extract node data corresponding to each of the processing nodes from the offline data; a second use case generation module, used to construct at least one node data with the same second associated key value as an alternative use case according to the processing time sequence of each of the processing nodes; a use case pool generation module, used to form a use case pool corresponding to the target sub-processing flow based on the constructed alternative use cases.

[0147] In a possible implementation, the extraction module is used to extract the node data corresponding to each processing node from the offline data based on the feature identifier corresponding to each processing node; wherein different processing nodes correspond to different feature identifiers.

[0148] In one possible implementation, the second use case generation module is used to define the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0149] In one possible implementation, the device also includes: a first deduplication processing module, which is used to traverse each of the alternative use cases, and when the alternative use cases include repeated node combinations, perform a first deduplication processing on the alternative use cases, so that one of the node combinations is retained in the alternative use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes; and a second deduplication processing module, which is used to, when the use case pool includes the same alternative use case after the first deduplication processing, perform a second deduplication processing on the use case pool after the first deduplication processing, so that the same alternative use case is not included in the use case pool after the second deduplication processing.

[0150] In a possible implementation manner, the second association key value is the same as the first association key value.

[0151] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0152] See also Figure 8 , Figure 8 A structural block diagram of another use case generation device provided in one or more embodiments of this specification. Figure 8 As shown, the use case generation device 400 may include: an acquisition module 401, an extraction module 402, and a second use case generation module 403.

[0153] The acquisition module 401 may be used to acquire offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow includes a plurality of processing nodes.

[0154] The extraction module 402 may be used to extract node data corresponding to each of the processing nodes from the offline data.

[0155] The second use case generation module 403 can be used to construct at least one node data having the same second associated key value as an alternative use case according to the processing time sequence of each processing node.

[0156] In a possible implementation, the extraction module 402 is used to extract the node data corresponding to each processing node from the offline data based on the feature identifier corresponding to each processing node; wherein different processing nodes correspond to different feature identifiers.

[0157] In one possible implementation, the second use case generation module 403 is used to define the last processing node of the target sub-processing flow; based on the processing time sequence of each processing node and the last processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0158] In a possible implementation, the device further includes:

[0159] A first deduplication processing module is used to traverse each of the candidate use cases, and when the candidate use cases include repeated node combinations, perform a first deduplication processing on the candidate use cases, so that one of the node combinations is retained in the candidate use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes;

[0160] The second deduplication processing module is used to perform a second deduplication processing on the use case pool after the first deduplication processing, if the use case pool includes the same alternative use cases after the first deduplication processing, so that the use case pool after the second deduplication processing does not include the same alternative use cases.

[0161] In a possible implementation, the second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

[0162] See also Figure 8 , Figure 8 This is a structural block diagram of an electronic device provided in one or more embodiments of this specification. Figure 8 As shown, the electronic device 500 may include a processor 501 and a memory 502; the memory 502 may be coupled to the processor 501. It is worth noting that the Figure 8 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0163] In a possible implementation, the functions of the use case generation apparatus 300 or the use case generation apparatus 400 may be integrated into the processor 501. The processor 501 may be configured to perform the following operations:

[0164] Receive a user's selection operation on at least one sub-process flow; wherein each of the sub-process flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case;

[0165] generating a target processing flow according to the processing order of the at least one sub-processing flow;

[0166] At least one target use case is generated based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is respectively composed of at least one alternative use case having the same first associated key value.

[0167] Alternatively, the processor 501 may be configured to perform the following operations:

[0168] Obtain offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow includes a plurality of processing nodes;

[0169] Extracting node data corresponding to each of the processing nodes from the offline data;

[0170] According to the processing time sequence of each processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0171] In another possible implementation, the use case generation device 300 or the use case generation device 400 may be configured separately from the processor 501. Taking the use case generation device 400 as an example, the use case generation device 400 may be configured as a chip connected to the processor 501, and the use case generation is implemented through the control of the processor 501.

[0172] In addition, in some optional implementations, the electronic device 500 may also include: a communication module, an input unit, an audio processor, a display, a power supply, etc. It is worth noting that the electronic device 500 does not necessarily have to include Figure 8 In addition, the electronic device 500 may also include Figure 5 For components not shown, reference may be made to the prior art.

[0173] In some optional implementations, the processor 501 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 500.

[0174] The memory 502 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The memory 502 may store the information related to the use case generation device 300 or the use case generation device 400, and may also store a program for executing the related information. The processor 501 may execute the program stored in the memory 502 to implement information storage or processing.

[0175] The input unit can provide input to the processor 501. The input unit is, for example, a key or a touch input device. The power supply can be used to provide power to the electronic device 500. The display can be used to display display objects such as images and text. The display can be, for example, an LCD display, but is not limited thereto.

[0176] The memory 502 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 502 may also be some other type of device. The memory 502 includes a buffer memory (sometimes referred to as a buffer). The memory 502 may include an application / function storage unit for storing application programs and function programs or processes for executing the operation of the electronic device 500 through the processor 501.

[0177] The memory 502 may also include a data storage unit for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit of the memory 502 may include various drivers for the communication function of the computer device and / or for executing other functions of the computer device (such as a messaging application, a contact book application, etc.).

[0178] The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor 501 to provide input signals and receive output signals, which may be the same as in a conventional mobile communication terminal.

[0179] Based on different communication technologies, multiple communication modules may be provided in the same computer device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to the processor 501, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0180] One or more embodiments of the present specification also provide a computer-readable storage medium capable of implementing all the steps in the use case generation method in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps in the use case generation method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0181] Receive a user's selection operation on at least one sub-process flow; wherein each of the sub-process flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case;

[0182] generating a target processing flow according to the processing order of the at least one sub-processing flow;

[0183] At least one target use case is generated based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is respectively composed of at least one alternative use case having the same first associated key value.

[0184] Alternatively, the processor implements the following steps when executing the computer program:

[0185] Obtain offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow includes a plurality of processing nodes;

[0186] Extracting node data corresponding to each of the processing nodes from the offline data;

[0187] According to the processing time sequence of each processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

[0188] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).

[0189] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, devices (systems) or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0190] One or more embodiments of the present specification are described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of the present specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0193] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0194] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meaning of the above terms in one or more embodiments of this specification can be understood according to the specific circumstances.

[0195] It should be noted that, in the absence of conflict, one or more embodiments of this specification and the features in the embodiments may be combined with each other. One or more embodiments of this specification are not limited to any single aspect, nor to any single embodiment, nor to any combination and / or replacement of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of one or more embodiments of this specification may be used alone or in combination with one or more other aspects and / or embodiments thereof.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of one or more embodiments of this specification, rather than to limit them. Although one or more embodiments of this specification have been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of one or more embodiments of this specification, and they should all be included in the scope of the claims and the specification of one or more embodiments of this specification.

[0197] One or more embodiments of this specification are described above in conjunction with optional implementation methods, but these implementation methods are only exemplary and serve only as an illustration. On this basis, multiple replacements and improvements can be made to one or more embodiments of this specification, all of which fall within the scope of protection of one or more embodiments of this specification.

Claims

1. A use case generation method, characterized in that: The method comprises: Receive a user's selection operation on at least one sub-process flow; wherein each of the sub-process flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case; generating a target processing flow according to the processing order of the at least one sub-processing flow; At least one target use case is generated based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is respectively composed of at least one alternative use case having the same first associated key value.

2. The method according to claim 1, characterized in that The generating at least one target use case based on each of the use case pools corresponding to the target processing flow comprises: At least one target use case is generated based on the candidate use cases having the same first associated key value in the use case pools corresponding to the target processing flow.

3. The method according to claim 1, characterized in that The generating at least one target use case based on each of the use case pools corresponding to the target processing flow comprises: Receiving a selection operation of the user on a first alternative use case; In the case where the first candidate use cases include the candidate use cases corresponding to all the sub-process flows in the target process flow, at least one target use case is generated based on the first candidate use cases having the same first associated key value.

4. The method according to claim 3, characterized in that The method further comprises: In the case where the first alternative use case includes alternative use cases corresponding to some sub-processing flows in the target processing flow, at least one target use case is generated based on the first alternative use case and the second alternative use case having the same first associated key value; wherein the second alternative use case is the alternative use case corresponding to the remaining sub-processing flows in the target processing flow except the some sub-processing flows.

5. The method according to claim 1, characterized in that The use case pool is obtained by the following method: Obtain offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow is any sub-processing flow in the sub-processing flow, and the target sub-processing flow includes multiple processing nodes; Extracting node data corresponding to each of the processing nodes from the offline data; According to the processing time sequence of each processing node, at least one node data having the same second associated key value is respectively constructed as an alternative use case; Based on the constructed alternative use cases, a use case pool corresponding to the target sub-processing flow is formed.

6. The method according to claim 5, characterized in that The extracting node data corresponding to each of the processing nodes from the offline data includes: Based on the feature identifiers corresponding to the processing nodes, the node data corresponding to the processing nodes are extracted from the offline data; wherein different processing nodes correspond to different feature identifiers.

7. The method according to claim 6, characterized in that The step of constructing at least one node data having the same second associated key value as an alternative use case according to the processing time sequence of each processing node comprises: defining the last processing node of the target sub-processing flow; Based on the processing time sequence of each processing node and the last processing node, at least one node data having the same second associated key value is constructed as an alternative use case.

8. The method according to claim 5, characterized in that The method further comprises: Traversing each of the candidate use cases, and if the candidate use cases include repeated node combinations, performing a first deduplication process on the candidate use cases, so that one of the node combinations is retained in the candidate use cases after the first deduplication process, wherein the node combination includes at least two processing nodes; In the case where the use case pool includes the same candidate use cases after the first deduplication processing, a second deduplication processing is performed on the use case pool after the first deduplication processing, so that the use case pool after the second deduplication processing does not include the same candidate use cases.

9. The method according to claim 5, characterized in that The second association key value is the same as the first association key value; the second association key value includes at least one of the following: a transaction number, a contract number, and a session handle.

10. A use case generation method, characterized in that: The method comprises: Obtain offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow includes a plurality of processing nodes; Extracting node data corresponding to each of the processing nodes from the offline data; According to the processing time sequence of each processing node, at least one node data with the same second associated key value is constructed as an alternative use case.

11. The method according to claim 10, characterized in that The extracting node data corresponding to each of the processing nodes from the offline data includes: Based on the feature identifiers corresponding to the processing nodes, the node data corresponding to the processing nodes are extracted from the offline data; wherein different processing nodes correspond to different feature identifiers.

12. The method according to claim 10, characterized in that The step of constructing at least one node data having the same second associated key value as an alternative use case according to the processing time sequence of each processing node comprises: defining the last processing node of the target sub-processing flow; Based on the processing time sequence of each processing node and the last processing node, at least one node data having the same second associated key value is constructed as an alternative use case.

13. The method according to claim 10, characterized in that The method further comprises: Based on each of the candidate use cases, a use case pool corresponding to the target sub-processing flow is formed; Traversing each of the candidate use cases, and if the candidate use cases include repeated node combinations, performing a first deduplication process on the candidate use cases, so that one of the node combinations is retained in the candidate use cases after the first deduplication process, wherein the node combination includes at least two processing nodes; In the case where the use case pool includes the same candidate use cases after the first deduplication processing, a second deduplication processing is performed on the use case pool after the first deduplication processing, so that the use case pool after the second deduplication processing does not include the same candidate use cases.

14. The method according to claim 10, characterized in that The second associated key value includes at least one of the following: a transaction number, a contract number, and a session handle.

15. A use case generation device, characterized in that: The device comprises: A receiving module, configured to receive a user's selection operation on at least one sub-process flow; wherein each of the sub-process flows is configured with a corresponding use case pool, and the use case pool includes at least one alternative use case; A target processing flow generation module, used to generate a target processing flow according to the processing sequence of the at least one sub-processing flow; The first use case generation module is used to generate at least one target use case based on each of the use case pools corresponding to the target processing flow; wherein each of the target use cases is composed of at least one alternative use case having the same first associated key value.

16. The device according to claim 15, characterized in that The first use case generation module is used to generate at least one target use case based on each of the use case pools corresponding to the target processing flow; specifically: The first use case generation module is used to generate at least one target use case based on the alternative use cases with the same first associated key value in the use case pool corresponding to the target processing flow.

17. The device according to claim 15, characterized in that The target processing flow generation module is used to generate a target processing flow according to the processing sequence of the at least one sub-processing flow; specifically: The target processing flow generation module is used to receive the user's selection operation on the first alternative use case; when the first alternative use case includes alternative use cases corresponding to all sub-processing flows in the target processing flow, at least one target use case is generated based on each of the first alternative use cases having the same first associated key value.

18. The device according to claim 17, characterized in that The target processing flow generation module is also used to: when the first alternative use case includes alternative use cases corresponding to some sub-processing flows in the target processing flow, generate at least one target use case based on the first alternative use case and the second alternative use case having the same first associated key value; wherein the second alternative use case is the alternative use case corresponding to the remaining sub-processing flows in the target processing flow except the some sub-processing flows.

19. The device according to claim 15, characterized in that The device also includes: An acquisition module, used to acquire offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow is any sub-processing flow in the sub-processing flow, and the target sub-processing flow includes multiple processing nodes; An extraction module, used to extract node data corresponding to each of the processing nodes from the offline data; A second use case generation module, configured to construct at least one node data having the same second associated key value as an alternative use case according to the processing time sequence of each processing node; A use case pool generation module is used to form a use case pool corresponding to the target sub-process flow based on the constructed alternative use cases.

20. The device according to claim 19, characterized in that The device also includes: A first deduplication processing module is used to traverse each of the candidate use cases, and when the candidate use cases include repeated node combinations, perform a first deduplication processing on the candidate use cases, so that one of the node combinations is retained in the candidate use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes; The second deduplication processing module is used to perform a second deduplication processing on the use case pool after the first deduplication processing, if the use case pool includes the same alternative use cases after the first deduplication processing, so that the use case pool after the second deduplication processing does not include the same alternative use cases.

21. The device according to claim 19, characterized in that The second association key value is the same as the first association key value; the second association key value includes at least one of the following: a transaction number, a contract number, and a session handle.

22. A use case generation device, characterized in that: The device comprises: An acquisition module, used to acquire offline data corresponding to a target sub-processing flow; wherein the target sub-processing flow includes a plurality of processing nodes; An extraction module, used to extract node data corresponding to each of the processing nodes from the offline data; The second use case generation module is used to construct at least one node data with the same second associated key value as an alternative use case according to the processing time sequence of each processing node.

23. The device according to claim 22, characterized in that The device also includes: A first deduplication processing module is used to traverse each of the candidate use cases, and when the candidate use cases include repeated node combinations, perform a first deduplication processing on the candidate use cases, so that one of the node combinations is retained in the candidate use cases after the first deduplication processing, wherein the node combination includes at least two processing nodes; The second deduplication processing module is used to perform a second deduplication processing on the use case pool after the first deduplication processing, if the use case pool includes the same alternative use cases after the first deduplication processing, so that the use case pool after the second deduplication processing does not include the same alternative use cases.

24. An electronic device, characterized in that: The electronic device comprises: A memory for storing a computer program product; A processor, configured to execute a computer program product stored in the memory, wherein when the computer program product is executed, the method described in any one of claims 1 to 14 is implemented.

25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed, implement the method described in any one of claims 1 to 14.