Interface output data generation method and device, equipment and medium
By calculating the associated variable factors of the interface input data and filtering historical interface data, the problem that the traditional interface test mode cannot meet the rapid launch of the system in agile mode is solved, and fast and accurate interface output data generation is achieved.
Patent Information
- Application Number
- CN202411909301.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The traditional interface test mode cannot meet the timeliness requirements for the system to be launched quickly in agile mode, and cannot quickly, accurately and reliably determine the output data corresponding to the target interface input data.
By obtaining the target interface input data and multiple historical interface input data and output data, calculate the correlation variable factor, filter the historical interface input data with the highest correlation, and obtain its corresponding output data as the target interface output data.
It realizes the fast, accurate and reliable determination of the target interface output data, which is convenient to reduce the time and cost of manually writing and executing test cases, improves work efficiency, and improves the efficiency and reliability of interface output data generation.
Smart Images

Figure CN119961152A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to the field of big data technology, and in particular to a method, device, equipment, medium and program product for generating interface output data. Background Art
[0002] In enterprises including banks, as the complexity of financial industry systems increases, the number of system interfaces and their interdependence is increasing. These interfaces connect various financial applications, including account systems, payment systems, securities trading systems, etc. Since financial transactions involve large amounts of funds and sensitive information, the interfaces between systems must be efficient, reliable and secure.
[0003] In the traditional interface testing mode, it is necessary to wait until all interdependent business systems are fully deployed before testing can be carried out. If it involves calling external system interfaces, the coordination and cooperation of the test environment are more difficult. However, in the agile mode, the iteration cycle is usually very short, and system functions need to be quickly verified and fed back. The traditional interface testing mode cannot meet the timeliness requirements for rapid system launch, and cannot quickly, accurately, and reliably determine the output data corresponding to the input data of the target interface to verify whether the system functions and interactions meet expectations. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, medium and program product for generating interface output data.
[0005] According to the first aspect of the present disclosure, a method for generating interface output data is provided, the method comprising: obtaining target interface input data, sorting the target interface input data by field factors, and generating a target interface input data fields, wherein a is an integer and a is greater than or equal to 1; obtaining b first historical interface input data and c first historical interface output data, wherein a first mapping relationship exists between the b first historical interface input data and the c first historical interface output data, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1; sorting the b first historical interface input data and the c first historical interface output data by field factors, and generating d first historical interface input data fields and e first historical interface output data fields, wherein d is an integer and d is greater than or equal to b, and e is integer and e is greater than or equal to c; based on the first mapping relationship, generate a second mapping relationship between d first historical interface input data fields and e first historical interface output data fields; obtain a first historical interface input data fields with the highest correlation with each target interface input data field among the d first historical interface input data fields, and generate a third historical interface input data fields; obtain m first historical interface output data fields that have a second mapping relationship with a third historical interface input data fields from the e first historical interface output data fields, and generate m target interface output data fields, wherein m is an integer and m is greater than or equal to 1, and m is less than e; and combine the m target interface output data fields to generate f target interface output data, wherein f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
[0006] According to an embodiment of the present disclosure, the b first historical interface input data and the c first historical interface output data are sorted by field factors to generate d first historical interface input data fields and e first historical interface output data fields, including: extracting key fields from the b first historical interface input data and the c first historical interface output data to generate d second historical interface input data fields and the e second historical interface output data fields; and sorting the d second historical interface input data fields and the e second historical interface output data fields by field factors to generate d first historical interface input data fields and e first historical interface output data fields.
[0007] According to an embodiment of the present disclosure, key fields are extracted from the b first historical interface input data and the c first historical interface output data to generate d second historical interface input data fields and e second historical interface output data fields, including: fielding the b first historical interface input data and the c first historical interface output data to generate g first historical interface input data fields and h first historical interface output data fields, wherein g is an integer and g is greater than or equal to d, and h is an integer and h is greater than or equal to e; format conversion is performed on the g first historical interface input data fields and the h first historical interface output data fields to generate g first historical interface input data field key-value pairs and the h first historical interface output data field key-value pairs. ; Calculate the word frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs; Obtain the field key-value pairs that are greater than a preset threshold among the word frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs, and generate d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs; and perform inverse conversion on the d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs, and generate d second history interface input data fields and the e second history interface output data fields.
[0008] According to an embodiment of the present disclosure, the b first historical interface input data and the c first historical interface output data are fielded to generate g first historical interface input data fields and h first historical interface output data fields, including: field segmenting the b first historical interface input data and the c first historical interface output data through regular expressions to generate g first historical interface input data fields and h first historical interface output data fields.
[0009] According to an embodiment of the present disclosure, the d second history interface input data fields and the e second history interface output data fields are sorted by field factors to generate d first history interface input data fields and e first history interface output data fields, including: obtaining the term frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, calculating the mean of the term frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, and generating a field sorting factor; and based on the field sorting factor, sorting the d second history interface input data fields and the e second history interface output data fields by field factors to generate d first history interface input data fields and e first history interface output data fields.
[0010] According to an embodiment of the present disclosure, a first historical interface input data fields with the highest correlation with each target interface input data field among d first historical interface input data fields are obtained to generate a third historical interface input data fields, including: calculating the correlation variable factor between each field in the a target interface input data fields and each field in the d first historical interface input data fields through a cosine similarity analysis method; and obtaining a first historical interface input data fields with the largest correlation variable factor for each field in the a target interface input data fields to generate a third historical interface input data fields.
[0011] According to an embodiment of the present disclosure, the m target interface output data fields are combined to generate f target interface output data, including: obtaining i preset non-critical fields, where i is an integer and i is greater than or equal to 1; and combining the i preset fields with the m target interface output data fields to generate f target interface output data.
[0012] According to a second aspect of the present disclosure, an interface output data generating device is provided, the device comprising: a first generating module, used to obtain target interface input data, sort the target interface input data by field factors, and generate a target interface input data fields, wherein a is an integer and a is greater than or equal to 1; a first acquiring module, used to obtain b first historical interface input data and c first historical interface output data, wherein a first mapping relationship exists between the b first historical interface input data and the c first historical interface output data, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1; a second generating module, used to sort the b first historical interface input data and the c first historical interface output data by field factors, and generate d first historical interface input data fields and e first historical interface output data fields, wherein d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to 1. Greater than or equal to c; a third generation module, used to generate a second mapping relationship between d first historical interface input data fields and e first historical interface output data fields based on the first mapping relationship; a fourth generation module, used to obtain a first historical interface input data fields with the highest correlation with the a target interface input data fields among the d first historical interface input data fields, and generate a third historical interface input data fields; a fifth generation module, used to obtain m first historical interface output data fields that have a second mapping relationship with the a third historical interface input data fields from the e first historical interface output data fields, and generate m target interface output data fields, wherein m is an integer and m is greater than or equal to 1, and m is less than e; and a sixth generation module, used to combine the e interface input data fields to generate target interface output data, wherein f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
[0013] According to an embodiment of the present disclosure, the second generation module includes: a seventh generation module, used to extract key fields from the b first historical interface input data and the c first historical interface output data, and generate d second historical interface input data fields and the e second historical interface output data fields; and an eighth generation module, used to sort the d second historical interface input data fields and the e second historical interface output data fields by field factors, and generate d first historical interface input data fields and e first historical interface output data fields.
[0014] According to an embodiment of the present disclosure, the seventh generation module includes: a ninth generation module, which is used to field the b first history interface input data and the c first history interface output data, and generate g first history interface input data fields and h first history interface output data fields, wherein g is an integer and g is greater than or equal to d, and h is an integer and h is greater than or equal to e; a tenth generation module, which is used to format the g first history interface input data fields and the h first history interface output data fields, and generate g first history interface input data field key-value pairs and the h first history interface output data field key-value pairs; a first calculation module, which is used to calculate the word frequency of the values of the g first history interface input data field key-value pairs. The inverse document frequency and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs; the eleventh generation module, used to obtain the field key-value pairs greater than a preset threshold in the word frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs, to generate d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs; and the twelfth generation module, used to perform inverse conversion on the d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs, to generate d second history interface input data fields and the e second history interface output data fields.
[0015] According to an embodiment of the present disclosure, the eighth generation module includes: a thirteenth generation module, which is used to obtain the term frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, calculate the mean of the term frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, and generate a field sorting factor; and a fourteenth generation module, which is used to perform field factor sorting on the d second history interface input data fields and the e second history interface output data fields based on the field sorting factor, and generate d first history interface input data fields and e first history interface output data fields.
[0016] According to an embodiment of the present disclosure, the fourth generation module includes: a second calculation module, used to calculate the associated variable factor between each field in the a target interface input data fields and each field in the d first historical interface input data fields through a cosine similarity analysis method; and a fifteenth generation module, used to obtain the a first historical interface input data fields with the largest associated variable factor for each field in the a target interface input data fields, and generate a third historical interface input data fields.
[0017] According to an embodiment of the present disclosure, the sixth generation module includes: a sixteenth generation module, used to obtain i preset non-critical fields, where i is an integer and i is greater than or equal to 1; and a seventeenth generation module, used to combine the i preset fields with the m target interface output data fields to generate f target interface output data.
[0018] According to a third aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned interface output data generation method.
[0019] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions or computer programs are stored. When the instructions or computer programs are executed by a processor, the processor executes the above-mentioned interface output data generating method.
[0020] According to a fifth aspect of the present disclosure, a computer program product is also provided, including a computer program, which implements the above-mentioned interface output data generating method when executed by a processor.
[0021] This method obtains the target interface input data and multiple historical interface input data and the corresponding output data. Calculate the associated variable factors of the target interface input data and multiple historical interface input data, screen out the historical interface input data with the highest correlation, and then obtain the output data corresponding to the historical interface input data with the highest correlation as the output data corresponding to the target interface input data. This solves the technical problem that the traditional test mode cannot meet the timeliness requirements of the rapid launch of the system under the agile mode to quickly verify whether the functions and interactions of the system meet expectations. The output data corresponding to the target interface input data can be determined quickly, accurately and reliably, which is convenient for reducing the time and cost of manually writing and executing test cases, saving time and cost, improving work efficiency, and achieving the technical effect of improving the efficiency and reliability of interface output data generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0023] Figure 1 A diagram schematically shows an application scenario of the method and device for generating interface output data according to an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of a method for generating interface output data according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 3 A flowchart schematically shows the method for generating interface output data according to an embodiment of the present disclosure, which generates d first historical interface input data fields and e first historical interface output data fields based on field factor sorting;
[0026] Figure 4 A flowchart of generating d second history interface input data fields and e second history interface output data fields in the interface output data generating method according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 5 A flowchart of generating a plurality of third abnormal data in each access data according to a field sorting factor in a method for generating interface output data according to an embodiment of the present disclosure is schematically shown;
[0028] Figure 6 Schematically shows a flow chart of generating a third historical interface input data fields in the interface output data generating method according to an embodiment of the present disclosure;
[0029] Figure 7 A flowchart for generating f target interface output data in a method for generating interface output data according to an embodiment of the present disclosure is schematically shown;
[0030] Figure 8 A schematic diagram of an interface output data generation system according to an embodiment of the present disclosure is schematically shown;
[0031] Fig. 9 A schematic diagram showing a structural block diagram of an interface output data generating device according to an embodiment of the present disclosure; and
[0032] Fig.10 A block diagram of an electronic device suitable for implementing the method for generating interface output data according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0033] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0035] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0036] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0037] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some blocks or combinations thereof in the block diagrams and / or flow charts may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable control device, so that these instructions, when executed by the processor, may create a device for implementing the functions / operations described in these block diagrams and / or flow charts.
[0038] First, the technical terms that appear in this article are explained as follows:
[0039] JSON format data: a data format consisting of key-value pairs, where the key is a string and the value can be a string, number, Boolean value, array or object. It is mainly used for data transmission, storage and exchange between the front-end and back-end, and between systems, and can effectively improve network transmission efficiency.
[0040] TF-IDF: (Term Frequency-Inverse Document Frequency), is a weighted technique used in information retrieval and text mining to evaluate the criticality of a word to a document set or one of the documents in a corpus.
[0041] TF: (term frequency) term frequency, that is, the ratio of the number of times a word appears in a document to the total number of words in the document.
[0042] IDF: (inverse document frequency) inverse document frequency, that is, the inverse of the number of documents containing the word in the entire corpus.
[0043] SORT factor: It is a sorting factor, mainly used to sort data, especially in financial data analysis.
[0044] An embodiment of the present disclosure provides a method for generating interface output data, the method comprising: obtaining target interface input data, sorting the target interface input data by field factors, and generating a target interface input data fields, wherein a is an integer and a is greater than or equal to 1; obtaining b first historical interface input data and c first historical interface output data, wherein a first mapping relationship exists between the b first historical interface input data and the c first historical interface output data, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1; sorting the b first historical interface input data and the c first historical interface output data by field factors, and generating d first historical interface input data fields and e first historical interface output data fields, wherein d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to c; based on the first mapping relationship, generate a second mapping relationship between d first historical interface input data fields and e first historical interface output data fields; obtain a first historical interface input data fields with the highest correlation with each target interface input data field among the d first historical interface input data fields, and generate a third historical interface input data fields; obtain m first historical interface output data fields that have a second mapping relationship with a third historical interface input data fields from the e first historical interface output data fields, and generate m target interface output data fields, wherein m is an integer and m is greater than or equal to 1, and m is less than e; and combine the m target interface output data fields to generate f target interface output data, wherein f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
[0045] According to the disclosed embodiment, by obtaining the target interface input data and multiple historical interface input data and the corresponding output data. Calculate the associated variable factors of the target interface input data and multiple historical interface input data, screen out the historical interface input data with the highest correlation, and then obtain the output data corresponding to the historical interface input data with the highest correlation as the output data corresponding to the target interface input data. This solves the technical problem that the traditional test mode cannot meet the timeliness requirements of the system's rapid launch in the agile mode to quickly verify whether the system's functions and interactions meet expectations. The output data corresponding to the target interface input data can be determined quickly, accurately and reliably, which is convenient for reducing the time and cost of manually writing and executing test cases, saving time and cost, improving work efficiency, and achieving the technical effect of improving the efficiency and reliability of interface output data generation.
[0046] Figure 1 The following schematically shows an application scenario diagram of the interface output data generation method and device according to an embodiment of the present disclosure. It should be noted that: Figure 1 The examples shown are merely scenarios in which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0047] like Figure 1 As shown, the application scenario 100 according to this embodiment may include an application scenario of interface output data generation. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0048] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0049] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0050] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0051] It should be noted that the interface output data generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the interface output data generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The interface output data generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the interface output data generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0052] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0053] The following will be based on Figure 1 The scene described by Figure 2~Figure 8 The interface output data generation method of the disclosed embodiment is described in detail. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0054] Figure 2 The flowchart of the method for generating interface output data according to an embodiment of the present disclosure is schematically shown.
[0055] like Figure 2 As shown, the method 200 includes steps S201 to S207.
[0056] Step S201: acquiring target interface input data, sorting the target interface input data by field factors, and generating a target interface input data fields, where a is an integer and a is greater than or equal to 1.
[0057] For example, the target interface input data can be fieldized to generate n first interface input data fields, where n is an integer and n is greater than or equal to 1. The n first interface input data fields are formatted to generate n first interface input data field key-value pairs. The word frequency inverse document frequency of the values of the n first interface input data field key-value pairs is calculated, and the field key-value pairs greater than a preset threshold in the word frequency inverse document frequency of the values of the n first interface input data field key-value pairs are obtained to generate a second interface input data field key-value pairs, and the a second interface input data field key-value pairs are reverse-converted to generate a target interface input data fields, where n is an integer and n is greater than or equal to a.
[0058] Step S202, obtain b first historical interface input data and c first historical interface output data, wherein there is a first mapping relationship between the b first historical interface input data and the c first historical interface output data, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1.
[0059] For example, b first historical interface input data and c first historical interface output data of a production interface over a period of time can be collected by interface traffic recording, application log table, etc. It can be obtained that there is a first mapping relationship between the b first historical interface input data and the c first historical interface output data, and a distribution probability interval of the b first historical interface input data and the c first historical interface output data is generated.
[0060] Step S203, sort the b first historical interface input data and the c first historical interface output data by field factors to generate d first historical interface input data fields and e first historical interface output data fields, where d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to c.
[0061] Figure 3 The flowchart of generating d first historical interface input data fields and e first historical interface output data fields based on field factor sorting in the interface output data generating method according to an embodiment of the present disclosure is schematically shown.
[0062] like Figure 3 As shown, the method 300 includes steps S301-S302.
[0063] Step S301 : extract key fields from the b first history interface input data and the c first history interface output data to generate d second history interface input data fields and e second history interface output data fields.
[0064] Figure 4The flowchart of generating d second history interface input data fields and the e second history interface output data fields in the interface output data generating method according to an embodiment of the present disclosure is schematically shown.
[0065] like Figure 4 As shown, the method 400 includes steps S401 to S405.
[0066] Step S401, fielding the b first history interface input data and the c first history interface output data to generate g first history interface input data fields and h first history interface output data fields, where g is an integer and g is greater than or equal to d, and h is an integer and h is greater than or equal to e.
[0067] For example, the b first historical interface input data and the c first historical interface output data can be segmented into fields using a regular expression to generate g first historical interface input data fields and h first historical interface output data fields. The accuracy of the generated fields can be improved by segmenting the b first historical interface input data and the c first historical interface output data into fields using a regular expression to generate g first historical interface input data fields and h first historical interface output data fields.
[0068] Step S402: convert the formats of the g first history interface input data fields and the h first history interface output data fields to generate g first history interface input data field key-value pairs and the h first history interface output data field key-value pairs.
[0069] For example, the g first history interface input data fields and the h first history interface output data fields may be format converted into data representation in standard JSON format, where each field of the input and output data is represented in K:V (KEY:VALUE) format.
[0070] Step S403, calculating the term frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the term frequency inverse document frequency of the values of the h first history interface output data field key-value pairs.
[0071] For example, the term frequency inverse document frequency (ie, TF-IDF) of the values of the g first history interface input data field key-value pairs and the term frequency inverse document frequency of the values of the h first history interface output data field key-value pairs can be calculated according to the TF-IDF method.
[0072] Among them, the TF-IDF calculation method is as follows:
[0073] The term frequency (TF) calculation formula (1) is:
[0074] (1)
[0075] in: is the frequency of a certain V value in the input and output data, is the frequency of the V value appearing in the above interface input and output data, and the denominator is the sum of the frequencies of all V values appearing in the above interface input and output data.
[0076] Inverse document frequency (IDF) is a measure of the general criticality of a word. The calculation formula (2) is:
[0077] (2)
[0078] Where: the numerator is the total number of interface input and output data, and the denominator is the number of input and output data including the V value. The larger the calculation result, the more discriminative the vocabulary is.
[0079] The TF-IDF value is the product of the TF term frequency and the IDF inverse document frequency. Multiply the results of the above two formulas to get the TF-IDF value.
[0080] Step S404, obtain the field key-value pairs whose word frequency inverse document frequency of the values of g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of h first history interface output data field key-value pairs that are greater than a preset threshold, and generate d second history interface input data field key-value pairs and e second history interface output data field key-value pairs.
[0081] For example, a TF-IDF value higher than a preset threshold is a key interface field. The preset threshold can be customized according to the application scenario.
[0082] Step S405 , reversely convert the d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs to generate d second history interface input data fields and the e second history interface output data fields.
[0083] By formatting key-value pairs and calculating the word frequency inverse document frequency to filter key fields, non-key fields can be effectively filtered out, thus improving the efficiency of obtaining key fields.
[0084] Return to reference Figure 3 In step S302, the d second history interface input data fields and the e second history interface output data fields are sorted by field factors to generate d first history interface input data fields and e first history interface output data fields.
[0085] Figure 5The flowchart of generating a plurality of third abnormal data in each access data according to the field sorting factor in the interface output data generating method according to the embodiment of the present disclosure is schematically shown.
[0086] like Figure 5 As shown, the method 500 includes steps S501-S502.
[0087] Step S501, obtain the term frequency inverse document frequency of d second history interface input data field key-value pairs, calculate the average of the term frequency inverse document frequency of the d second history interface input data field key-value pairs, and generate a field ranking factor.
[0088] For example, the TF-IDF mean of all key-value pairs of each key input field can be calculated to obtain the field SORT factor (i.e., field sorting factor).
[0089] Step S502: Based on the field sorting factor, the d second history interface input data fields and the e second history interface output data fields are sorted by field factor to generate d first history interface input data fields and e first history interface output data fields.
[0090] For example, the input and output fields corresponding to the values of the key-value pairs of the key interface fields obtained above can be re-extracted, and non-key interface field data can be removed, and the fields can be re-sorted from large to small according to the field SORT factors.
[0091] Field sorting factors can be used to achieve efficient sorting, which is convenient for subsequent comparison of target input fields and historical input fields, and improves the accuracy and reliability of comparison. Data can be fielded by extracting key fields and sorting field factors. The range of input and output fields can be refined, noise fields can be cleaned, CPU utilization can be achieved, computing resources can be saved, and computing efficiency can be improved.
[0092] Return to reference Figure 2 In step S204, based on the first mapping relationship, a second mapping relationship between d first history interface input data fields and e first history interface output data fields is generated.
[0093] For example, based on the above-mentioned first mapping relationship and the distribution probability interval of b first historical interface input data and c first historical interface output data, a second mapping relationship of d first historical interface input data fields and e first historical interface output data fields and a distribution probability interval of d first historical interface input data fields and e first historical interface output data fields can be generated.
[0094] Step S205 , obtaining a first historical interface input data fields having the highest correlation with each target interface input data field among the d first historical interface input data fields, and generating a third historical interface input data fields.
[0095] Figure 6 The flowchart of generating a third historical interface input data fields in the interface output data generating method according to an embodiment of the present disclosure is schematically shown.
[0096] like Figure 6 As shown, the method 600 includes steps S601-S602.
[0097] Step S601 , calculating the associated variable factor between each field in the a target interface input data fields and each field in the d first history interface input data fields by using a cosine similarity analysis method.
[0098] For example, the cosine similarity analysis method evaluates the similarity by the cosine value of the angle between two vectors. The a target interface input data fields and the d first history interface input data fields can be vectorized to generate the word vector of the value of each field key-value pair in the a target interface input data fields and the word vector of the value of each field key-value pair in the d first history interface input data fields. The two are combined into a word segmentation list, and the calculation formulas (3) and (4) are:
[0099] F(A)={f A1 ,f A2 ,…,f Ak} (3)
[0100] F(B)={f B1 ,f B2 ,…,f Bk} (4)
[0101] Among them, f represents the frequency of the keyword appearing in the text.
[0102] Then calculate the cosine value, and the calculation formula (5) is:
[0103] (5)
[0104] The above cosine value is the associated variable factor.
[0105] Step S602, obtaining a first history interface input data fields in which each field associated variable factor is the largest among the a target interface input data fields, and generating a third history interface input data fields.
[0106] By determining the associated variable factors through the cosine similarity analysis method, the accuracy, reliability and robustness of the comparison between the target input field and the historical input field can be improved.
[0107] Return to reference Figure 2 In step S206, m first historical interface output data fields that have a second mapping relationship with a third historical interface input data fields are obtained from e first historical interface output data fields, and m target interface output data fields are generated, where m is an integer and m is greater than or equal to 1, and m is less than e;.
[0108] Step S207: Combining the m target interface output data fields to generate f target interface output data, where f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
[0109] Figure 7 The flowchart of generating f target interface output data in the interface output data generating method according to an embodiment of the present disclosure is schematically shown.
[0110] like Figure 7 As shown, the method 700 includes steps S701-S702.
[0111] Step S701: Obtain i preset non-key fields, where i is an integer and i is greater than or equal to 1.
[0112] For example, for non-key fields, if there is a preset method, the corresponding value, such as time or serial number, is returned according to the preset method; otherwise, the corresponding field value is randomly matched from the pre-prepared data.
[0113] Step S702: Combine the i preset fields with the m target interface output data fields to generate f target interface output data.
[0114] By presetting non-critical data, the target interface output data information can be further improved, thereby improving the reliability of the target interface output data.
[0115] Figure 8 A schematic diagram of an interface output data generating system according to an embodiment of the present disclosure is schematically shown.
[0116] like Figure 8 As shown, the system 800 includes: a data preparation subsystem 801, a consistency preset subsystem 802, a data analysis subsystem 803 and an output data subsystem 804.
[0117] The data preparation subsystem 801 may first collect input and output data of the production interface for a period of time by means of interface traffic recording, application log tables, and the like.
[0118] The consistency preset subsystem 802 can convert the input and output data into a data representation in a standard JSON format, and each field of the input and output data is represented in a K:V (KEY:VALUE) format to describe the structure and field information of the data.
[0119] The data analysis subsystem 803 can analyze the key interface fields according to the TF-IDF method for each key value in the input and output data. The TF-IDF value is higher than the threshold value, which is the key interface field. The threshold value can be customized. Calculate the TF-IDF mean of all input key values of each key input field to obtain the field SORT factor. Re-extract the input and output fields corresponding to the key interface field key values obtained above, and eliminate non-key interface field data. And re-sort them from large to small according to the field SORT factor. For each group of key input field key values, calculate the frequency of all key output field key values under this key input field key value to obtain the distribution probability interval of the input and output data.
[0120] The output data subsystem 804 can remove non-critical interface fields from the new input data to be simulated and sort the critical interface fields according to the field SORT factor. Use the cosine similarity analysis method to compare the new input data with each group of critical input field key values obtained by the above data analysis module to obtain the associated variable factor. The associated variable factor is obtained by calculating the cosine similarity. The key output field key value that is hit is obtained according to the distribution probability interval of the input and output data corresponding to the key input field key value hit above. For non-critical output fields, if there is a preset method, the corresponding value is returned according to the preset method, such as time, serial number; otherwise, the corresponding field value is randomly matched from the pre-prepared data. The final JSON format data is converted into output data of the corresponding format according to the interface specification.
[0121] Fig. 9 The structure block diagram of the interface output data generating device according to an embodiment of the present disclosure is schematically shown.
[0122] like Fig. 9 As shown, the device 900 includes: a first generating module 901 , a first acquiring module 902 , a second generating module 903 , a third generating module 904 , a fourth generating module 905 , a fifth generating module 906 and a sixth generating module 907 .
[0123] The first generating module 901 is used to obtain target interface input data, sort the target interface input data by field factors, and generate a target interface input data fields, where a is an integer and a is greater than or equal to 1. In one embodiment, the first generating module 901 can be used to execute step S201 described above, which will not be repeated here.
[0124] The first acquisition module 902 is used to acquire b first history interface input data and c first history interface output data, wherein the b first history interface input data and the c first history interface output data have a first mapping relationship, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1. In one embodiment, the first acquisition module 902 can be used to execute step S202 described above, which will not be repeated here.
[0125] The second generation module 903 is used to sort the b first history interface input data and the c first history interface output data by field factors to generate d first history interface input data fields and e first history interface output data fields, where d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to c. In one embodiment, the second generation module 903 can be used to execute step S203 described above.
[0126] The second generating module 903 includes: a seventh generating module and an eighth generating module.
[0127] The seventh generation module is used to extract key fields from the b first history interface input data and the c first history interface output data to generate d second history interface input data fields and e second history interface output data fields. In one embodiment, the seventh generation module can be used to execute step S301 described above.
[0128] The seventh generation module includes: a ninth generation module, a tenth generation module, a first calculation module, an eleventh generation module and a twelfth generation module.
[0129] The ninth generation module is used to field the b first history interface input data and the c first history interface output data to generate g first history interface input data fields and h first history interface output data fields, wherein g is an integer and g is greater than or equal to d, and h is an integer and h is greater than or equal to e. In one embodiment, the ninth generation module can be used to execute step S401 described above, which will not be repeated here.
[0130] The tenth generation module is used to perform format conversion on the g first history interface input data fields and the h first history interface output data fields, and generate g first history interface input data field key-value pairs and the h first history interface output data field key-value pairs. In one embodiment, the tenth generation module can be used to execute step S402 described above, which will not be repeated here.
[0131] The first calculation module is used to calculate the word frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs. In one embodiment, the first calculation module can be used to execute step S403 described above, which will not be repeated here.
[0132] The eleventh generation module is used to obtain the field key-value pairs greater than a preset threshold value from the word frequency inverse document frequency of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the h first history interface output data field key-value pairs, and generate d second history interface input data field key-value pairs and e second history interface output data field key-value pairs. In one embodiment, the eleventh generation module can be used to execute step S404 described above, which will not be repeated here.
[0133] The twelfth generation module is used to reversely convert the d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs to generate d second history interface input data fields and the e second history interface output data fields. In one embodiment, the twelfth generation module can be used to execute step S405 described above, which will not be repeated here.
[0134] The eighth generation module is used to sort the d second history interface input data fields and the e second history interface output data fields by field factors to generate d first history interface input data fields and e first history interface output data fields. In one embodiment, the eighth generation module can be used to execute step S302 described above.
[0135] The eighth generation module includes: a thirteenth generation module and a fourteenth generation module.
[0136] The thirteenth generation module is used to obtain the word frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, calculate the average of the word frequency inverse document frequency of the values of the d second history interface input data field key-value pairs, and generate a field ranking factor. In one embodiment, the thirteenth generation module can be used to execute step S501 described above, which will not be repeated here.
[0137] The fourteenth generation module is used to sort the d second history interface input data fields and the e second history interface output data fields by field factors based on the field sorting factor to generate d first history interface input data fields and e first history interface output data fields. In one embodiment, the fourteenth generation module can be used to execute step S502 described above, which will not be repeated here.
[0138] The third generation module 904 is used to generate a second mapping relationship between d first history interface input data fields and e first history interface output data fields based on the first mapping relationship. In one embodiment, the third generation module 904 can be used to execute the above-described step S204, which will not be described in detail here.
[0139] The fourth generation module 905 is used to obtain a first historical interface input data fields with the highest correlation with each target interface input data field among the d first historical interface input data fields, and generate a third historical interface input data fields. In one embodiment, the fourth generation module 905 can be used to execute step S205 described above.
[0140] The fourth generating module 905 includes: a second calculating module and a fifteenth generating module.
[0141] The second calculation module is used to calculate the associated variable factor between each field in the a target interface input data fields and each field in the d first history interface input data fields by using a cosine similarity analysis method. In one embodiment, the second calculation module can be used to execute step S601 described above, which will not be repeated here.
[0142] The fifteenth generation module is used to obtain a first history interface input data field with the largest associated variable factor for each field in the a target interface input data field, and generate a third history interface input data field. In one embodiment, the fifteenth generation module can be used to execute step S602 described above, which will not be repeated here.
[0143] The fifth generation module 906 is used to obtain m first history interface output data fields having a second mapping relationship with a third history interface input data fields from the e first history interface output data fields, and generate m target interface output data fields, wherein m is an integer and m is greater than or equal to 1, and m is less than e. In one embodiment, the fifth generation module 906 can be used to execute step S206 described above, which will not be repeated here.
[0144] The sixth generation module 907 is used to combine the m target interface output data fields to generate f target interface output data, where f is an integer and f is greater than or equal to 1, and f is less than or equal to m. In one embodiment, the sixth generation module 907 can be used to execute step S207 described above.
[0145] The sixth generation module 907 includes: a sixteenth generation module and a seventeenth generation module.
[0146] The sixteenth generation module is used to obtain i preset non-key fields, where i is an integer and i is greater than or equal to 1. In one embodiment, the sixteenth generation module can be used to execute the above-described step S701, which will not be described in detail here.
[0147] The seventeenth generating module is used to combine the i preset fields with the m target interface output data fields to generate f target interface output data. In one embodiment, the seventeenth generating module can be used to execute the above-described step S702, which will not be described in detail here.
[0148] According to an embodiment of the present disclosure, any multiple modules of the first generation module 901, the first acquisition module 902, the second generation module 903, the third generation module 904, the fourth generation module 905, the fifth generation module 906 and the sixth generation module 907 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first generation module 901, the first acquisition module 902, the second generation module 903, the third generation module 904, the fourth generation module 905, the fifth generation module 906 and the sixth generation module 907 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first generation module 901, the first acquisition module 902, the second generation module 903, the third generation module 904, the fourth generation module 905, the fifth generation module 906 and the sixth generation module 907 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be performed.
[0149] Fig.10 A block diagram of an electronic device suitable for implementing the method for generating interface output data according to an embodiment of the present disclosure is schematically shown.
[0150] like Fig.10As shown, the electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 to a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0151] In RAM1003, various programs and data required for the operation of electronic device 1000 are stored. Processor 1001, ROM 1002 and RAM1003 are connected to each other via bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM1002 and / or RAM1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0152] According to an embodiment of the present disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device 1000 may further include one or more of the following components connected to the I / O interface 1005: an input portion 1006 including a keyboard, a mouse, etc.; an output portion 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk, etc.; and a communication portion 1009 including a network interface card such as a LAN card, a modem, etc. The communication portion 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage portion 1008 as needed.
[0153] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0154] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1002 and / or the RAM 1003 described above and / or one or more memories other than the ROM 1002 and the RAM 1003.
[0155] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the interface output data generation method provided by the embodiment of the present disclosure.
[0156] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1001. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0157] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0158] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0159] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0160] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0161] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0162] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for generating interface output data, characterized in that: The method includes: Obtain target interface input data, sort the target interface input data by field factors, and generate a target interface input data fields, where a is an integer and a is greater than or equal to 1; Obtain b first history interface input data and c first history interface output data, wherein a first mapping relationship exists between the b first history interface input data and the c first history interface output data, b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1; Sorting the b first history interface input data and the c first history interface output data by field factors to generate d first history interface input data fields and e first history interface output data fields, where d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to c; Based on the first mapping relationship, generate a second mapping relationship between d first history interface input data fields and e first history interface output data fields; Obtaining a first historical interface input data fields with the highest correlation with each target interface input data field among the d first historical interface input data fields, and generating a third historical interface input data fields; Acquire m first history interface output data fields having a second mapping relationship with a third history interface input data fields from e first history interface output data fields, and generate m target interface output data fields, where m is an integer and m is greater than or equal to 1, and m is less than e; and The m target interface output data fields are combined to generate f target interface output data, where f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
2. The method according to claim 1, characterized in that The b first history interface input data and the c first history interface output data are sorted by field factors to generate d first history interface input data fields and e first history interface output data fields, including: Extracting key fields from the b first history interface input data and the c first history interface output data to generate d second history interface input data fields and the e second history interface output data fields; and The d second history interface input data fields and the e second history interface output data fields are sorted by field factors to generate d first history interface input data fields and e first history interface output data fields.
3. The method according to claim 2, characterized in that Extracting key fields from the b first history interface input data and the c first history interface output data to generate d second history interface input data fields and e second history interface output data fields, including: Fielding the b first history interface input data and the c first history interface output data to generate g first history interface input data fields and h first history interface output data fields, where g is an integer and g is greater than or equal to d, and h is an integer and h is greater than or equal to e; Performing format conversion on the g first history interface input data fields and the h first history interface output data fields to generate g first history interface input data field key-value pairs and the h first history interface output data field key-value pairs; Calculate the word frequency inverse document frequency of the values of the g first history interface input data field key-value pairs and the word frequency inverse document frequency of the values of the h first history interface output data field key-value pairs; Obtaining the field key-value pairs greater than a preset threshold value from the word frequency inverse document frequencies of the g first history interface input data field key-value pairs and the word frequency inverse document frequencies of the h first history interface output data field key-value pairs, and generating d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs; and The d second history interface input data field key-value pairs and the e second history interface output data field key-value pairs are reversely converted to generate d second history interface input data fields and the e second history interface output data fields.
4. The method according to claim 3, characterized in that Fielding the b first history interface input data and the c first history interface output data to generate g first history interface input data fields and h first history interface output data fields includes: The b first history interface input data and the c first history interface output data are segmented into fields using a regular expression to generate g first history interface input data fields and h first history interface output data fields.
5. The method according to claim 3, characterized in that: Sorting the d second history interface input data fields and the e second history interface output data fields by field factors to generate d first history interface input data fields and e first history interface output data fields, including: Obtaining the word frequency inverse document frequencies of the values of d second history interface input data field key-value pairs, calculating the average of the word frequency inverse document frequencies of the values of the d second history interface input data field key-value pairs, and generating a field ranking factor; and Based on the field sorting factor, the d second history interface input data fields and the e second history interface output data fields are sorted by the field factor to generate d first history interface input data fields and e first history interface output data fields.
6. The method according to claim 1, characterized in that Acquire a first historical interface input data fields with the highest correlation with each target interface input data field from among the d first historical interface input data fields, and generate a third historical interface input data fields, including: Calculating the associated variable factor between each field in the a target interface input data fields and each field in the d first history interface input data fields by using a cosine similarity analysis method; and A first history interface input data field with the largest associated variable factor for each field in the a target interface input data field is obtained to generate a third history interface input data field.
7. The method according to any one of claims 1 to 6, characterized in that: The m target interface output data fields are combined to generate f target interface output data, including: Get i preset non-key fields, where i is an integer and i is greater than or equal to 1; and The i preset fields are combined with the m target interface output data fields to generate f target interface output data.
8. An interface output data generating device, characterized in that: The device includes: A first generating module is used to obtain target interface input data, sort the target interface input data by field factors, and generate a target interface input data fields, where a is an integer and a is greater than or equal to 1; A first acquisition module is used to acquire b first history interface input data and c first history interface output data, wherein a first mapping relationship exists between the b first history interface input data and the c first history interface output data, wherein b is an integer and b is greater than or equal to 1, and c is an integer and c is greater than or equal to 1; A second generating module is used to sort the b first history interface input data and the c first history interface output data by field factors to generate d first history interface input data fields and e first history interface output data fields, where d is an integer and d is greater than or equal to b, and e is an integer and e is greater than or equal to c; A third generating module, configured to generate, based on the first mapping relationship, a second mapping relationship between d first history interface input data fields and e first history interface output data fields; A fourth generating module is used to obtain a first historical interface input data fields having the highest correlation with the a target interface input data fields among the d first historical interface input data fields, and generate a third historical interface input data fields; a fifth generating module, configured to obtain, from the e first historical interface output data fields, m first historical interface output data fields having a second mapping relationship with the a third historical interface input data fields, and generate m target interface output data fields, wherein m is an integer and m is greater than or equal to 1, and m is less than e; and The sixth generation module is used to combine the m interface input data fields to generate target interface output data, wherein f is an integer and f is greater than or equal to 1, and f is less than or equal to m.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Test data packet reading method, device and equipment and storage medium
CN112436980A
Test data generation method and device, electronic equipment and storage medium
CN114996150A
Test case generation method and device, electronic equipment and storage medium
CN115129590A
Data mapping verification system, method and device
CN117332286A
Software test data and test case intelligent generation method and system
CN118939560A