Interface case generation method and system

By performing text analysis and extraction of key elements on interface documents, and combining the database full data to generate interface cases, the difficulty in writing and updating test cases caused by frequent interface changes is solved, and the efficiency and accuracy of interface case generation is improved.

CN119493731APending Publication Date: 2025-02-21AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411731349.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the agile iterative development mode, frequent interface changes lead to large workloads in writing and updating test cases, and uneven quality, which easily leads to omissions and errors, affecting the quality and efficiency of tests.

Method used

The text analysis module of the target interface document is used to determine the target text information; the key element extraction module determines the target case elements of the case to be generated based on the preset extraction method and target text information; the case generation module is used to determine the target case elements and The full amount of data in the database generates the target interface case.

Benefits of technology

The target interface case is generated accurately and conveniently without manual generation, which improves the efficiency and accuracy of interface case generation and reduces the risk of human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493731A_ABST
    Figure CN119493731A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interface case generation method and system. The method comprises the following steps: performing text analysis on a target interface document through a text analysis module, and determining target text information in the target interface document; determining a target case element corresponding to the to-be-generated case through a key element extraction module based on a preset extraction mode and the target text information; and generating a target interface case based on the target case elements and the total data in the database through a case generation module. Through the technical scheme of the embodiment of the invention, the target interface case can be accurately and conveniently generated, manual generation is not needed, and the efficiency and accuracy of interface case generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an interface case generation method and system. Background Art

[0002] With the rapid development of software technology, major companies have adopted the agile iterative development model to quickly respond to market demand and improve product competitiveness. The agile development model emphasizes rapid iteration, continuous integration, and continuous delivery, making interface updates and iterations extremely frequent. However, this fast development pace also brings unprecedented challenges to project testing.

[0003] Currently, the writing and updating of interface test cases is a key task in the testing process. However, due to frequent interface changes, testers need to frequently modify interface test cases, which not only increases the workload but also may lead to uneven quality of test cases. In addition, different testers write different interface test case specifications, which is easy to cause omissions and errors, thus affecting the quality and efficiency of the test. Summary of the invention

[0004] The embodiment of the present invention provides an interface case generation method and system to accurately and conveniently generate a target interface case without manual generation, thereby improving the efficiency and accuracy of interface case generation.

[0005] In a first aspect, an embodiment of the present invention provides an interface case generation method, comprising:

[0006] Performing text analysis on the target interface document by means of a text analysis module to determine target text information in the target interface document;

[0007] Determine, by means of a key element extraction module, a target case element corresponding to the case to be generated based on a preset extraction method and the target text information;

[0008] A target interface case is generated through a case generation module based on the target case elements and the full amount of data in the database.

[0009] Optionally, the method further includes: the target text information includes: first text information and second text information;

[0010] The first text information in the target interface document is determined by a text analysis module based on a target text recognition model and the target interface document; the second text information in the target interface document is determined by a text analysis module based on a preset table content recognition method to perform text recognition on the target interface document in a table.

[0011] Optionally, the method also includes: performing out-of-table text detection on the target interface document through a text analysis module to determine first coordinate information corresponding to the out-of-table text in the target interface document; determining the first text information in the target interface document based on a target text recognition model, the target interface document and the first coordinate information through a text analysis module.

[0012] Optionally, the method also includes: detecting text within a table in the target interface document through a text analysis module to determine second coordinate information and table structure information corresponding to the text within the table in the target interface document; merging text within cells based on the second coordinate information and the table structure information through a text analysis module to determine second text information in the target interface document.

[0013] Optionally, the method further includes: extracting target case elements corresponding to the case to be generated from the target text information based on preset regular expression rules corresponding to the case to be generated by a key element extraction module.

[0014] Optionally, the method further includes: obtaining available data conditions in the target case elements through a case generation module; determining parameter values ​​of the candidate elements from all data in the database based on the available data conditions through the case generation module, and composing the parameter values ​​of the candidate elements into a target interface case.

[0015] Optionally, the method also includes: performing case comparison based on the target interface case and the historical interface case through a version comparison module to determine the difference data to be selected between the target interface case and the historical interface case; and determining the target difference data to be highlighted based on the difference data to be selected and preset display conditions through the version comparison module.

[0016] Optionally, the method further includes: determining, by a key element extraction module, a target message element corresponding to the case to be generated based on a preset extraction method and the target text information.

[0017] Optionally, the method further includes: generating a target interface message based on target message elements and a preset message template by a case generation module.

[0018] In a second aspect, an embodiment of the present invention further provides an interface case generation system, a text analysis module, a key element extraction module and a case generation module;

[0019] Wherein, the text analysis module is used to perform text analysis on the target interface document to determine the target text information in the target interface document;

[0020] A key element extraction module, used to determine the target case elements corresponding to the case to be generated based on a preset extraction method and the target text information;

[0021] The case generation module is used to generate a target interface case based on the target case elements and the full amount of data in the database.

[0022] The technical solution of the embodiment of the present invention is to perform text analysis on the target interface document through a text analysis module to determine the target text information in the target interface document; determine the target case elements corresponding to the case to be generated based on a preset extraction method and the target text information through a key element extraction module; generate the target interface case based on the target case elements and the full amount of data in the database through a case generation module, thereby accurately and conveniently generating the target interface case without manual generation, thereby improving the efficiency and accuracy of interface case generation.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 is a flow chart of an interface case generation method provided by Embodiment 1 of the present invention;

[0026] Figure 2 This is an example diagram of a difference annotation involved in the first embodiment of the present invention;

[0027] Figure 3 is a flow chart of a method for generating an interface case provided by Embodiment 2 of the present invention;

[0028] Figure 4 is an example diagram of a target interface document involved in the second embodiment of the present invention;

[0029] Figure 5 It is a structural diagram of an interface case generation system provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Embodiment 1

[0033] Figure 1 A flowchart of an interface case generation method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of automatic generation of interface cases. The method can be executed by an interface case generation system, which can be implemented in the form of hardware and / or software. Figure 1 As shown, the method includes:

[0034] S110. Perform text analysis on the target interface document through a text analysis module to determine target text information in the target interface document.

[0035] Among them, the text analysis module can be used to extract text information from the target interface document. The target interface document can refer to a document composed of interface information related to the interface to be tested. The target interface document can be a document in PDF or WORD format. For example, an interface document can refer to a document used to describe the interface of a software system, which records in detail the interaction mode, data format and other detailed information between various modules or components in the system. The interface document plays a vital role in the software development process, providing developers, testers and other relevant personnel with clear and unified interface descriptions and call basis. The interface to be tested can refer to an interface that needs to be tested when the interface information changes. The target text information can refer to information containing only text content. For example, the target text information can be but is not limited to text information displayed in a two-dimensional matrix. The attributes in the two-dimensional matrix correspond one to one to the attribute values. For example, the target text information can be expressed as: ["system", "module", "interface name", "whether high-frequency trading", "new or optimized", "interface function description"], ["financial service platform", "remittance", "single remittance query", "yes", "new", "query remittance transaction data"].

[0036] Specifically, the text analysis module in the interface case generation system obtains the target interface document, performs text analysis on the target interface document, filters non-text information in the target interface document, extracts text information in the target interface document, and determines the text information as the target text information in the target interface document.

[0037] S120. Determine, by means of a key element extraction module, target case elements corresponding to the case to be generated based on a preset extraction method and target text information.

[0038] The preset extraction method may refer to a preset case element extraction method. For example, the preset extraction method may be to extract attributes required for generating a case.

[0039] Specifically, the key element extraction module in the interface case generation system cleans the target text information and removes redundant data, such as line breaks, to obtain the cleaned target text information. The key element extraction module screens the cleaned target text information based on a preset extraction method, and uses the attributes required to form the case as the target case elements corresponding to the case to be generated. For example, the system name, interface name, input parameter, type, whether it is required, and length are extracted from the target text information and used as the target case elements.

[0040] On the basis of the above technical solution, "determining the target case elements corresponding to the case to be generated through the key element extraction module based on the preset extraction method and target text information" may include: extracting the target case elements corresponding to the case to be generated from the target text information through the key element extraction module based on the preset regular expression rules corresponding to the case to be generated.

[0041] Specifically, the key element extraction module traverses each two-dimensional matrix, and uses the preset regular expression rules corresponding to the case to be generated to extract the target case elements corresponding to the case to be generated from each two-dimensional matrix.

[0042] S130. Generate a target interface case based on target case elements and all data in the database through a case generation module.

[0043] The full amount of data in the database may refer to all available data in the database. The target interface case may refer to a valid case for testing the interface to be tested.

[0044] Specifically, the case generation module fills in the values ​​of the attributes in the target case elements in the full amount of data in the database under the corresponding attributes to generate a target interface case.

[0045] On the basis of the above technical solution, "generating a target interface case based on the target case elements and the full data in the database through a case generation module" may include: obtaining the available data conditions in the target case elements through the case generation module; determining the parameter values ​​of the candidate elements from the full data in the database based on the available data conditions through the case generation module, and composing the parameter values ​​of the candidate elements into a target interface case.

[0046] The available data condition may refer to the screening condition of the attribute value under the attribute in the target case element. The parameter value of the element to be selected may refer to the parameter value of the element to be filled in the corresponding attribute that meets the available data condition.

[0047] Specifically, the case generation module obtains interface input parameter characteristics (equivalent to available data conditions) from the target text information based on the target case elements, such as whether it is required, value length and value type, etc., and generates basic test cases that meet the template specifications based on the obtained interface input parameter characteristics, such as parameter is empty, wrong data type value is input, length exceeds the range, etc. For example, the case generation module determines the parameter value of the candidate element from the full amount of data in the database based on the basic test case, and maps the parameter value of the candidate element in the database to the corresponding attribute in the target case element to generate the target interface case.

[0048] The technical solution of the embodiment of the present invention performs text analysis on the target interface document through a text analysis module to determine the target text information in the target interface document; determines the target case elements corresponding to the case to be generated based on a preset extraction method and the target text information through a key element extraction module; generates the target interface case based on the target case elements and the full amount of data in the database through a case generation module, thereby accurately and conveniently generating the target interface case without manual generation, thereby improving the efficiency and accuracy of interface case generation.

[0049] Based on the above technical solution, the method also includes: performing case comparison based on the target interface case and the historical interface case through a version comparison module to determine the candidate difference data between the target interface case and the historical interface case; determining the target difference data for highlighting display based on the candidate difference data and preset display conditions through a version comparison module.

[0050] Among them, the version comparison module can be used to compare and display the differences between the target interface case and the historical interface case. The historical interface case may refer to the interface case before the target interface case. The selected difference data may refer to all the difference data between the target interface case and the historical interface case. The preset display condition may refer to the pre-set condition for displaying the attribute value difference under a specific attribute. The target difference data may refer to the specific difference data between the target interface case and the historical interface case.

[0051] Specifically, Figure 2 Give an example of a difference annotation. Figure 2 The version comparison module can display the comparison results. After each update and iteration of the interface document, in order to allow testers to intuitively see the scope of this document update, the version comparison module can be used to compare the generated latest version of the interface case with the previous version case, mark the difference data, and facilitate testers to further test the newly added optimization cases. It includes two parts: input: generate the latest version of the case, that is, the target interface case. The version comparison module has a built-in storage module to store the most recent version of the test case, that is, the historical interface case. Output: case file with difference annotations. Its key implementation methods include: reading case files, content comparison, and difference annotation.

[0052] Among them, in the process of reading the case file, the version comparison module first reads the input case file, parses its content into a processable data structure, defines the first function to first clear all formats in the Excel file, and loads the Excel file through the loading function. Traverse each cell and reset the font, alignment, border, fill color and other formats to the default. In the process of content comparison, the preset comparison algorithm is used to compare the content of the case file item by item. Before the comparison, the case file has been preprocessed to clear the original format to reduce the noise effect during the comparison. In the process of difference annotation, the difference part found during content comparison, that is, the selected difference data, is recorded and annotated in a specific format in the output file. The second function is defined to highlight the unique values ​​in a specific column in the Excel table. First, the Excel function is read as a DataFrame type, and then the Excel table is loaded through the loading function. According to the provided column name and unique value set, the value of the column is traversed. If the value is in the unique value set, the corresponding cell fill color is the specified color, and finally the modified table is saved and returned to the file path. The embodiment of the present invention can also mark the differences between the latest version of the interface case and the previous version case by version comparison, so that the tester can further test the newly added optimization case.

[0053] On the basis of the above technical solution, the method further includes: determining the target message elements corresponding to the case to be generated through a key element extraction module based on a preset extraction method and target text information.

[0054] Among them, the key element extraction module is also used to extract the elements for generating interface messages in the target text information. The target message elements can be elements for generating messages corresponding to the interface to be tested. For example, the target message elements can include, but are not limited to, interface name: remittance; request method: POST; resource locator (Uniform Resource Locator, URL): http: / / www.example.com / path / to / file.html; header field parameter message: [{"key":"Content-Type"value":""}, {"key":"Oebfspsession", "value":""}]; input parameter message: {"data":"custid":"","usreid":""}.

[0055] Specifically, the key element extraction module selects target message elements corresponding to the case to be generated from the target text information based on a pre-set message element extraction method, such as a regular expression.

[0056] On the basis of the above technical solution, the method further includes: generating a target interface message based on target message elements and a preset message template through a case generation module.

[0057] The case generation module is also used to automatically generate a target interface message corresponding to the interface to be tested. The preset message template may refer to a message template with replaceable key elements that is preset.

[0058] Specifically, a json script that can be directly imported into the interface testing tool is pre-constructed, and by analyzing the collection file exported by the interface testing tool, the key parameter composition required for constructing the message is obtained. These parameter values ​​can be replaced by assigning values ​​to the json message template by parsing the interface key elements of the target message elements, and finally the target interface message is generated. While automatically generating interface test cases, that is, interface cases, it can also automatically generate interface messages that are compatible with the interface test execution tool, reducing the investment costs of testers in test preparation and test execution and improving test efficiency.

[0059] It should be noted that the interface to be tested can be tested using the target interface case and the target interface message. Interface testing is a test of the interface between system components. It is mainly used to detect the interaction points between external systems and systems and between internal subsystems. The focus of the test is to check the data exchange, transmission and control management process, as well as the mutual logical dependencies between systems. In addition, interface testing also checks the correctness of interface parameter transmission, the correctness of interface function implementation, the correctness of output results, and the integrity and rationality of fault-tolerant processing of various abnormal situations.

[0060] Embodiment 2

[0061] Figure 3 This is a flowchart of a method for generating an interface case provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment describes in detail the process of determining the target text information. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 3 As shown, the method includes:

[0062] S310: Determine first text information in the target interface document based on a target text recognition model and a target interface document through a text analysis module.

[0063] The target text information includes: first text information and second text information. The first text information may refer to text information outside a table. The second text information may refer to text information within a table. The target text recognition model may be used for text detection and recognition. The target text recognition model may be a model including an optical character recognition (OCR) detection and recognition algorithm. For example, the target text recognition model may be, but is not limited to, a Neuro-Linguistic Programming (NLP) model.

[0064] Specifically, the text analysis module inputs the non-table text in the target interface document into the target text recognition model for text recognition to determine the first text information in the target interface document.

[0065] On the basis of the above technical solution, "determining the first text information in the target interface document through a text analysis module based on the target text recognition model and the target interface document" may include: performing out-of-table text detection on the target interface document through a text analysis module to determine the first coordinate information corresponding to the out-of-table text in the target interface document; determining the first text information in the target interface document through a text analysis module based on the target text recognition model, the target interface document and the first coordinate information.

[0066] The first coordinate information may refer to the four-point coordinates of the text outside the table, including the upper left corner coordinates and lower left corner coordinates of the first character in each line of text and the upper right corner coordinates and lower right corner coordinates of the last character in each line of text.

[0067] Specifically, Figure 4 An example diagram of a target interface document is given. Figure 4 The text analysis module detects the out-of-table text in the target interface document and determines the position information corresponding to the out-of-table text in the target interface document, that is, the first coordinate information. The text analysis module inputs the target interface document and the first coordinate information into the target text recognition model so that the target text recognition model can perform text recognition on the out-of-table text and determine the first text information in the target interface document.

[0068] S320: Using a text analysis module, perform text recognition on the target interface document in the table based on a preset table content recognition method to determine second text information in the target interface document.

[0069] The preset table content recognition method may refer to a preset recognition method for text in a table, especially for multi-line text.

[0070] Specifically, the text analysis module performs table recognition on the target interface document to determine the vertex position information of each cell in the target interface document. The text analysis module performs text detection on the target interface document to determine the position information of each text in the target interface document. The text analysis module determines the text located in the table based on the vertex position information of the cell and the position information of the text, and performs text recognition on the text in the table to determine the second text information in the target interface document.

[0071] On the basis of the above technical solution, "using a text analysis module to identify text within a table in a target interface document based on a preset table content recognition method to determine the second text information in the target interface document" may include: using a text analysis module to detect text within a table in a target interface document to determine the second coordinate information and table structure information corresponding to the text within the table in the target interface document; using a text analysis module to merge text within cells based on the second coordinate information and table structure information to determine the second text information in the target interface document.

[0072] The second coordinate information may refer to the four-point coordinates corresponding to each line of text in the table. The table structure information may refer to the information of the table structure and the text in the table. Table 1 gives an example of text in a table.

[0073] Table 1 An example of text in a table

[0074]

[0075]

[0076] The table structure information corresponding to Table 1 is expressed as follows:

[0077]

[0078]

[0079]

[0080]

[0081]

[0082]

[0083]

[0084] Content-Type Application / json lanCode Zh_CN

[0085] The second coordinate information may include: x1, y1, x2, y2.

[0086] Specifically, the table structure recognition technology is implemented by an Attention-based image description network model by inputting a table image and outputting a string of HTML characters. The structure of the table is a table marked by the structure of HTML, and the content is the table text content. Through further HTML parsing, the four-point coordinates of each text cell and the table structure information can be obtained, as shown above. The cell merging data extraction technology is to reassemble the text across rows in the cell into a string. This module merges multiple lines of text in the cell by calculating the intersect over union (IOU) and vertex distance between the text box coordinates (second coordinate information) obtained by the text detection and recognition algorithm and the cell coordinates obtained by the table structure prediction module. Among them, the text box can be connected using the second coordinate information of each line of text. IOU can be used to determine which text boxes belong to the same cell, and the vertex distance and IOU can be used to determine the arrangement order of the text boxes in the same cell. According to the existing cell text box order, the text results are spliced ​​into a string from top to bottom and from left to right. Finally, the target text information stored in the form of a two-dimensional matrix is ​​obtained according to the first text information and the second text information.

[0087] S330. Determine the target case elements corresponding to the case to be generated through the key element extraction module based on the preset extraction method and the target text information.

[0088] S340. Generate a target interface case based on the target case elements and the full amount of data in the database through the case generation module.

[0089] The technical solution of the embodiment of the present invention determines the first text information in the target interface document based on the target text recognition model and the target interface document through the text analysis module; and determines the second text information in the target interface document by performing text recognition in the table of the target interface document based on the preset table content recognition method through the text analysis module, thereby realizing targeted text recognition for text content in different forms, and then accurately extracting texts in different forms and different modalities for use in the generation of target interface cases, thereby improving the accuracy of determining the target text information and the accuracy of generating target interface cases. Furthermore, the technical solution of the embodiment of the present invention can automatically extract key elements from unstructured target interface documents such as word or PDF in combination with the nlp model, and use them to generate target interface cases, thereby greatly improving the efficiency and quality of writing test cases, i.e., target interface cases, reducing the risk of human errors, and providing a strong guarantee for testing work under the agile iterative development model.

[0090] The following is an embodiment of the interface case generation system provided in an embodiment of the present invention. The system and the interface case generation method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the interface case generation system, please refer to the embodiment of the above-mentioned interface case generation method.

[0091] Embodiment 3

[0092] Figure 5 This is a schematic diagram of the structure of an interface case generation system provided by Embodiment 3 of the present invention. Figure 5 As shown, the system includes: a text analysis module 510, a key element extraction module 520 and a case generation module 530;

[0093] Among them, the text analysis module 510 is used to perform text analysis on the target interface document to determine the target text information in the target interface document; the key element extraction module 520 is used to determine the target case elements corresponding to the case to be generated based on the preset extraction method and the target text information; the case generation module 530 is used to generate the target interface case based on the target case elements and the full amount of data in the database.

[0094] The technical solution of the embodiment of the present invention is to perform text analysis on the target interface document through the text analysis module 510 to determine the target text information in the target interface document; determine the target case elements corresponding to the case to be generated based on the preset extraction method and the target text information through the key element extraction module 520; generate the target interface case based on the target case elements and the full amount of data in the database through the case generation module 530, so as to accurately and conveniently generate the target interface case without manual generation, thereby improving the efficiency and accuracy of interface case generation.

[0095] On the basis of the above technical solution, the target text information includes: first text information and second text information;

[0096] The text analysis module 510 is further used to determine the first text information in the target interface document based on the target text recognition model and the target interface document;

[0097] The text analysis module 510 is further used to perform text recognition in the table of the target interface document based on a preset table content recognition method to determine the second text information in the target interface document.

[0098] On the basis of the above technical solution, the text analysis module 510 is further used to detect the out-of-table text in the target interface document and determine the first coordinate information corresponding to the out-of-table text in the target interface document;

[0099] The text analysis module 510 is further used to determine the first text information in the target interface document based on the target text recognition model, the target interface document and the first coordinate information.

[0100] On the basis of the above technical solution, the text analysis module 510 is further used to detect text in the table of the target interface document, and determine the second coordinate information and table structure information corresponding to the text in the table of the target interface document;

[0101] The text analysis module 510 is further used to merge text within a cell based on the second coordinate information and the table structure information to determine the second text information in the target interface document.

[0102] On the basis of the above technical solution, the key element extraction module 520 is further used to extract the target case elements corresponding to the case to be generated from the target text information based on the preset regular expression rules corresponding to the case to be generated.

[0103] On the basis of the above technical solution, the case generation module 530 is further used to obtain the available data conditions in the target case elements;

[0104] The case generation module 530 is also used to determine the parameter values ​​of the candidate elements from the full amount of data in the database based on the available data conditions, and compose the parameter values ​​of the candidate elements into a target interface case.

[0105] On the basis of the above technical solution, a version comparison module is used to compare cases based on the target interface case and the historical interface case to determine the candidate difference data between the target interface case and the historical interface case;

[0106] The version comparison module is used to determine the target difference data to be highlighted based on the difference data to be selected and the preset display conditions.

[0107] On the basis of the above technical solution, the key element extraction module 520 is also used to determine the target message element corresponding to the case to be generated based on a preset extraction method and target text information.

[0108] On the basis of the above technical solution, the case generation module 530 is also used to generate a target interface message based on the target message elements and the preset message template.

[0109] The interface case generation system provided in the embodiment of the present invention can execute the interface case generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the interface case generation method.

[0110] It is worth noting that in the embodiment of the above interface case generation, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0112] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating an interface case, characterized in that: include: Performing text analysis on the target interface document by means of a text analysis module to determine target text information in the target interface document; Determine, by means of a key element extraction module, a target case element corresponding to the case to be generated based on a preset extraction method and the target text information; A target interface case is generated through a case generation module based on the target case elements and the full amount of data in the database.

2. The method according to claim 1, characterized in that The target text information includes: first text information and second text information; The step of performing text analysis on the target interface document by using a text analysis module to determine target text information in the target interface document includes: Determine, by a text analysis module, first text information in the target interface document based on a target text recognition model and the target interface document; The text analysis module performs text recognition in the table of the target interface document based on a preset table content recognition method to determine the second text information in the target interface document.

3. The method according to claim 2, characterized in that The determining, by means of a text analysis module based on a target text recognition model and the target interface document, first text information in the target interface document comprises: Performing out-of-table text detection on the target interface document through a text analysis module to determine first coordinate information corresponding to the out-of-table text in the target interface document; The first text information in the target interface document is determined by a text analysis module based on a target text recognition model, the target interface document and the first coordinate information.

4. The method according to claim 2, characterized in that: The step of performing text recognition in a table on the target interface document based on a preset table content recognition method by using a text analysis module to determine second text information in the target interface document includes: Performing text detection in a table on the target interface document through a text analysis module to determine second coordinate information and table structure information corresponding to the text in the table in the target interface document; The text in the cell is merged based on the second coordinate information and the table structure information through a text analysis module to determine the second text information in the target interface document.

5. The method according to claim 1, characterized in that The key element extraction module determines the target case elements corresponding to the case to be generated based on the preset extraction method and the target text information, including: The target case elements corresponding to the case to be generated are extracted from the target text information through the key element extraction module based on the preset regular expression rules corresponding to the case to be generated.

6. The method according to claim 1, characterized in that The case generation module generates a target interface case based on the target case elements and the full amount of data in the database, including: Acquire available data conditions in the target case elements through a case generation module; The case generation module determines the parameter values ​​of the candidate elements from the full amount of data in the database based on the available data conditions, and composes the target interface case with the parameter values ​​of the candidate elements.

7. The method according to claim 1, characterized in that The method further comprises: By comparing the target interface case with the historical interface case through the version comparison module, the candidate difference data between the target interface case and the historical interface case are determined; The version comparison module determines the target difference data for highlighting based on the candidate difference data and the preset display conditions.

8. The method according to claim 1, characterized in that The method further comprises: The target message elements corresponding to the case to be generated are determined by the key element extraction module based on the preset extraction method and the target text information.

9. The method according to claim 8, characterized in that The method further comprises: The case generation module generates the target interface message based on the target message elements and the preset message template.

10. An interface case generation system, characterized in that: The system includes: a text analysis module, a key element extraction module and a case generation module; Wherein, the text analysis module is used to perform text analysis on the target interface document to determine the target text information in the target interface document; A key element extraction module, used to determine the target case elements corresponding to the case to be generated based on a preset extraction method and the target text information; The case generation module is used to generate a target interface case based on the target case elements and the full amount of data in the database.