A method, device and storage medium for generating a functional knowledge base

CN122964148APending Publication Date: 2026-10-23BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510478282.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]目前,功能知识库的构建主要依赖人工方式实现,例如查阅软件产品源代码的方式等,这种方式需要投入大量的人力和时间成本,导致功能知识库的构建效率较低

Benefits of technology

[0032]本公开实施例提供的技术方案与现有技术相比具有如下优点:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964148A_ABST
    Figure CN122964148A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a function knowledge base generation method and device, equipment and a storage medium, comprising: obtaining a test case set, the test case set including a plurality of test cases for testing a function module in a target object respectively, parsing the test cases, extracting test case information including test case names, test step information and test expected results, and converting the test case information into natural language descriptions to obtain function module description information for describing the function module tested by the test cases. The function module name included in the function module description information is converted from the test case name, the function operation description information included in the function module description information is converted from the test step information and the test expected results, and a function knowledge base is constructed based on the function module description information to support function information retrieval of the target object. The present disclosure improves the construction efficiency of the function knowledge base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing, and in particular to a method, apparatus, device, and storage medium for generating a functional knowledge base. Background Technology

[0002] To help users understand the functional information of a product, a functional knowledge base needs to be built for it. Based on the functional knowledge base, users can obtain the product's functional information through information retrieval and other methods.

[0003] Typically, the functional knowledge base stores functional information for each functional module of the product. This can be implemented using a structured database management system to allow users to efficiently access and understand the current functional status of the product.

[0004] Currently, the construction of functional knowledge bases mainly relies on manual methods, such as consulting the source code of software products. This method requires a large investment of manpower and time, resulting in low efficiency in the construction of functional knowledge bases. Summary of the Invention

[0005] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a method, apparatus, device, and storage medium for generating a functional knowledge base.

[0006] In a first aspect, embodiments of this disclosure provide a method for generating a functional knowledge base, the method comprising:

[0007] Obtain a set of test cases for the target object; wherein the set of test cases includes multiple test cases for testing the functional modules in the target object respectively;

[0008] By parsing the first test case in the test case set, the test case information of the first test case is extracted; wherein, the test case information includes the test case name, test step information, and expected test result;

[0009] By converting the test case information of the first test case into a natural language description, the functional module description information corresponding to the first test case is obtained; wherein, the functional module description information is used to describe the functional module tested by the first test case, and the functional module description information includes the functional module name and functional operation description information, wherein the functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result;

[0010] A functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case; wherein, the functional knowledge base is used to support the retrieval of functional information of the target object.

[0011] In an optional implementation, after parsing the first test case in the test case set and extracting the test case information of the first test case, the method further includes:

[0012] The test case information of the first test case is stored in a data table; wherein, the test case name, test step information and expected test result in the test case information are stored in different data fields of the data table, and the test case information of the first test case and the second test case are stored in different data entries of the data table.

[0013] The step of converting the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case includes:

[0014] After reading the test case information of the first test case from the data table, the test case information is converted into a natural language description to obtain the functional module description information corresponding to the first test case.

[0015] In one optional implementation, the step of converting the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case includes:

[0016] The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case.

[0017] In one optional implementation, the step of inputting the test case information and model input prompts of the first test case into a natural language conversion model, and having the natural language conversion model convert the test case information into a natural language description based on the model input prompts, and outputting the functional module description information corresponding to the first test case, includes:

[0018] The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case according to the format template. The natural language conversion model is trained based on the format template.

[0019] In one optional implementation, the functional module description information further includes multiple sub-functional module names corresponding to the functional module name, and the functional operation description information includes functional operation description information corresponding to each of the multiple sub-functional module names, wherein the multiple sub-functional module names are extracted from the corresponding functional operation description information.

[0020] In one optional implementation, the functional knowledge base stores functional module description information according to functional module classification.

[0021] In one optional implementation, the functional knowledge base stores version information of the target object, and the functional knowledge base supports the retrieval of functional information for multiple versions of the target object.

[0022] In one optional implementation, obtaining the test case set for the target object includes:

[0023] The test cases for the target object are obtained from the test management system and stored in the test case collection; wherein the test cases are in maintenance or use status in the test management system.

[0024] Secondly, this disclosure provides an apparatus for generating a functional knowledge base, the apparatus comprising:

[0025] An acquisition module is used to acquire a set of test cases for a target object; wherein, the set of test cases includes multiple test cases for testing the functional modules in the target object respectively;

[0026] The parsing module is used to extract test case information of the first test case by parsing the first test case in the test case set; wherein, the test case information includes the test case name, test step information and expected test result;

[0027] The conversion module is used to convert the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case; wherein, the functional module description information is used to describe the functional module tested by the first test case, and the functional module description information includes the functional module name and functional operation description information, wherein the functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result;

[0028] A construction module is used to construct a functional knowledge base for the target object based on the functional module description information corresponding to the first test case; wherein, the functional knowledge base is used to support the retrieval of functional information of the target object.

[0029] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method for generating a functional knowledge base as provided in embodiments of this disclosure.

[0030] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program for executing the method for generating a functional knowledge base as provided in embodiments of this disclosure.

[0031] Fifthly, this disclosure provides a computer program product comprising a computer program / instruction that, when executed by a processor, implements the method described above.

[0032] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0033] The method for generating a functional knowledge base provided in this embodiment first obtains a test case set for the target object, which includes multiple test cases for testing functional modules within the target object. Then, the first test case in the test case set is parsed to extract its test case information, which includes the test case name, test step information, and expected test result. Next, the test case information is converted into natural language description to obtain the corresponding functional module description information. This functional module description information describes the functional module tested by the first test case and includes the functional module name and functional operation description information. The functional module name is derived from the test case name, and the functional operation description information is derived from the test step information and the expected test result. Finally, a functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case. This functional knowledge base supports the retrieval of functional information for the target object.

[0034] This disclosure embodiment constructs a functional knowledge base for the target object by parsing test cases, extracting test case information, and converting it into natural language descriptions. Therefore, this disclosure embodiment improves the efficiency of constructing the functional knowledge base. Attached Figure Description

[0035] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0036] Figure 1 A flowchart illustrating a method for generating a functional knowledge base according to an embodiment of this disclosure;

[0037] Figure 2 A flowchart illustrating another method for generating a functional knowledge base provided in this embodiment of the disclosure;

[0038] Figure 3 A schematic diagram of the structure of another functional knowledge base generation device provided in an embodiment of this disclosure;

[0039] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0040] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0041] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0042] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0043] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0044] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0045] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0046] With the continuous development of computer technology, establishing functional knowledge bases for target objects has become an important task. Currently, the construction of functional knowledge bases mainly relies on manually collecting and organizing functional information about the target objects. Because this manual approach requires a significant investment of manpower and time, and updates to the functional knowledge base also depend on manual operation, the construction efficiency of functional knowledge bases is low.

[0047] Therefore, this disclosure provides a method for generating a functional knowledge base. Specifically, firstly, a test case set for the target object is obtained, which includes multiple test cases for testing functional modules within the target object. Then, a first test case in the test case set is parsed to extract its test case information, which includes the test case name, test step information, and expected test result. Next, the test case information of the first test case is converted into a natural language description to obtain the functional module description information corresponding to the first test case. The functional module description information describes the functional module tested by the first test case and includes the functional module name and functional operation description information. The functional module name is derived from the test case name, and the functional operation description information is derived from the test step information and the expected test result. Subsequently, a functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case. This functional knowledge base supports the retrieval of functional information for the target object.

[0048] This disclosure embodiment constructs a functional knowledge base for the target object by parsing test cases, extracting test case information, and converting it into natural language descriptions. Therefore, this disclosure embodiment improves the efficiency of constructing the functional knowledge base.

[0049] For ease of understanding, embodiments of this disclosure provide a method for generating a functional knowledge base. This method can be executed by a functional knowledge base generation device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. (Reference) Figure 1 The flowchart below illustrates a method for generating a functional knowledge base according to an embodiment of this disclosure, wherein the method includes:

[0050] S101: Obtain the set of test cases for the target object.

[0051] The test case set includes multiple test cases for testing the functional modules in the target object.

[0052] The target object in this disclosure can be a product containing multiple functional modules. Specifically, the target object can be a software product, such as an application, a software system, or a single functional module; it can also be a hardware product. The target object includes one or more functional modules, and each functional module has corresponding test cases.

[0053] The test cases in this embodiment are used to automate the testing of functional modules in the target object. The test cases can be structured test files, which facilitates automated testing of the functional modules. Specifically, the test cases can be JSON files stored in JSON format, storing test information such as test case number, test case name, test operation steps, and expected test results in key-value pairs.

[0054] Since test cases are continuously generated during the development of the target object, and as the functions of the target object are continuously iterated and optimized, test cases need to be created for each optimized function. Therefore, the test cases in this embodiment can be directly obtained from the test management system used to store test cases, without the need for separate creation, which also improves the efficiency of building the functional knowledge base to a certain extent.

[0055] In practical applications, during the iterative optimization of the target object's functions, some functions of the target object may become offline. For the test cases of the offline functions, this embodiment of the disclosure does not need to obtain them, that is, the test case set in this embodiment of the disclosure does not include test cases of the offline functions of the target object.

[0056] In one optional implementation, a set of test cases for the target object can be obtained from a test management system. Specifically, test cases for each functional module of the target object are obtained from the test management system and stored as a test case set. The test cases in the test management system are either in a maintenance state or a usage state. Test cases in a maintenance state indicate that the current test case is in an editing, updating, or verification-completed state, and the functional module it tests is not offline. Test cases in a usage state indicate that the current test case has passed verification, and the functional module it tests is also not offline. In other words, the test cases in the test management system can cover all online functions of the target object, and the test cases in the test management system maintain a correspondence with the current functional status of the target object.

[0057] S102: Extract the test case information of the first test case by parsing the first test case in the test case set.

[0058] The test case information includes the test case name, test step information, and expected test results.

[0059] The first test case in this embodiment is any one of the test cases in the test case set of the target object.

[0060] Since the test cases in the test case set of the target object contain a large amount of information, this embodiment of the disclosure can traverse and parse the information in the test cases in the test case set to extract key information as test case information. Specifically, relevant test case parsing tools can be used to parse the test cases to extract the test case information.

[0061] The extracted test case information may include the test case name, test step information, and expected test results. The test case name is used to characterize the functional module corresponding to the target object, and the test step information and expected test results can characterize the relevant interactive operations of the functional module corresponding to the target object and the corresponding responses of the interactive operations.

[0062] Building upon the above embodiments, to improve the accuracy of the extracted test case information, this disclosure embodiment can also utilize a model to perform accuracy detection on the test case information. This model is used to evaluate the classification accuracy of the test case information, specifically determining whether the extracted test case information is correctly categorized into three categories: test case name, test step information, and expected test result. Specifically, after parsing the first test case in the test case set to extract test case information, the extracted test case information is input into the accuracy detection model. After the model performs accuracy analysis and processing, revised test case information is output to update the test case information of the first test case. This disclosure embodiment does not limit the implementation method of the accuracy detection model.

[0063] It is evident that by parsing the first test case to extract test case information, and combining this with model analysis and processing, the accuracy of test case information extraction can be further improved.

[0064] S103: By converting the test case information of the first test case into a natural language description, the functional module description information corresponding to the first test case is obtained.

[0065] The functional module description information is used to describe the functional module tested by the first test case. The functional module description information includes the functional module name and the functional operation description information. The functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result.

[0066] Since the test case information of the first test case is structured data, which has a high understanding cost for users, this embodiment of the disclosure converts the test case information of the first test case into natural language description, that is, converts the test case information into information that conforms to the way humans express themselves in everyday language, so as to facilitate users to view and understand.

[0067] The functional module description information in this embodiment is used to describe the corresponding functional modules in the target object. Specifically, the functional description information includes the functional module name and functional operation description information. The functional module name is obtained by converting the test case name in the test case information into a natural language description. For example, taking the extracted test case name as variable Y, after natural language processing, the functional module name "User Login Module" is obtained. The functional operation description information is obtained by converting the test step information and the expected test result in the test case information. The functional operation description information can describe the relevant interactive operations of the corresponding functional module in the target object and the corresponding responses of the interactive operations. Among them, the functional operation description information is obtained by combining the test step information and the expected test result. For example, taking the extracted test step information as variables Y1, Y2, and Y3, and the expected test result as variable Y4, after natural language processing, the functional operation description information "First open the login page, then enter the correct username and password, then click the login button. The expected result is successful login to the system and redirection to page A" is obtained.

[0068] In an optional implementation, the functional description information may further include multiple sub-functional module names corresponding to the functional module name. That is, the functional module corresponding to the functional module name includes multiple sub-functional modules, each with its own name. The functional operation description information also includes functional operation description information corresponding to each of the multiple sub-functional modules. The sub-functional module names can be extracted from the functional operation description information of the corresponding functional module. The sub-functional module names and their corresponding functional operation description information in the functional operation description information are obtained by converting the test step information and expected test results from the test case information using natural language description.

[0069] In one optional implementation, a natural language conversion model can be used to convert the test case information into a natural language description. This model converts structured data into text that conforms to natural language description. Specifically, model input prompts are constructed, and then the test case information of the first test case and the model input prompts are input into the natural language conversion model. The model then describes the test case information in natural language based on the model input prompts and outputs the functional module description information corresponding to the first test case.

[0070] The model input prompts are used to guide the style and structure of the content generated by the model. In other words, the model input prompts can specify the output format of the model. The construction of model input prompts can be tailored to specific requirements.

[0071] Building upon the above embodiments, to improve the consistency of content generated by the natural language conversion model and avoid illusions in the natural language conversion model, this disclosure embodiment can also train the natural language conversion model using format templates. The format templates are predefined output format rules.

[0072] Specifically, after constructing the model input prompts, the test case information and model input prompts for the first test case are input into the natural language conversion model. The natural language conversion model then converts the test case information into a natural language description based on the input prompts and outputs the functional module description information corresponding to the first test case according to a format template. It is evident that by training the natural language conversion model using a format template, the model can generate content according to the template, ensuring that the format of the functional module description information output by the model is consistent.

[0073] S104: Construct a functional knowledge base for the target object based on the functional module description information corresponding to the first test case.

[0074] The functional knowledge base is used to support the retrieval of functional information of the target object.

[0075] In this embodiment of the disclosure, after obtaining the functional module description information corresponding to the test cases of the target object, a functional knowledge base of the target object is constructed based on the functional module description information, so that users can retrieve functional information of each functional model of the target object.

[0076] In one optional implementation, the functional knowledge base can store the description information of each functional module according to its functional modules. That is, each functional module is treated as a category, and its corresponding functional module description information is stored. Therefore, storing functional module description information by functional module category facilitates the retrieval of functional description information for relevant functional modules.

[0077] In one optional implementation, the functional knowledge base can also support the retrieval of functional information for multiple versions of the target object. That is, the functional knowledge base can manage the functional description information of functional modules for different versions of the target object. The functional knowledge base supports the retrieval of functional information for each version of the target object. Specifically, the functional knowledge base stores functional information for multiple versions of the target object.

[0078] As can be seen, by storing the functional description information of different versions of the target object in the functional knowledge base, users can easily view the functional information of the target object under a certain version.

[0079] The method for generating a functional knowledge base provided in this embodiment first obtains a test case set for the target object, which includes multiple test cases for testing functional modules within the target object. Then, the first test case in the test case set is parsed to extract test case information, which includes a test case name, test step information, and expected test result. Next, the test case information is converted into natural language description to obtain functional module description information corresponding to the first test case. This functional module description information describes the functional module tested by the first test case and includes a functional module name and a functional operation description. The functional module name is derived from the test case name, and the functional operation description information is derived from the test step information and the expected test result. Finally, a functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case. This functional knowledge base supports the retrieval of functional information for the target object.

[0080] This disclosure embodiment constructs a functional knowledge base for the target object by parsing test cases, extracting test case information, and converting it into natural language descriptions. Therefore, this disclosure embodiment improves the efficiency of constructing the functional knowledge base.

[0081] In one optional implementation, after parsing each test case in the test case set of the target object and extracting the test case information of each test case, the extracted test case information can also be stored in a data table to facilitate the conversion of natural language description based on the test case information.

[0082] Specifically, assuming that after parsing and extracting the test case information of the first test case, the test case information of the first test case is stored in a data table, the test case name, test step information and expected test result in the test case information are stored in different data fields of the data table, and the test case information of the first test case and the second test case are stored in different data entries of the data table, that is, one test case forms one data entry, and the second test case is any test case other than the first test case in the test case set of the target object.

[0083] After storing the test case information of each test case in the test case set in a data table, each data entry in the data table can be traversed and read to convert the test case information in each data entry into a natural language description, thereby obtaining the functional module description information of each test case.

[0084] To facilitate understanding of the above embodiments, this disclosure will provide a flowchart illustrating another method for generating a functional knowledge base.

[0085] For example, a set of test cases for the target object is obtained from the test management system. This set of test cases includes test cases corresponding to each functional module of the target object. Taking test case 201 as an example, test case parsing tool is used to parse test case 201 to obtain test case information. Then, this test case information is stored in data table 202. The test case name Y, test step information Y1, Y2, Y3, and expected test result Y4 in the test case information are stored in different data fields of the data table, and this test case information constitutes a data entry in the data table.

[0086] Then, model input prompt 203 is constructed, and model input prompt 203 and data table 202 are input together into natural language conversion model. Natural language conversion model converts the test case information stored in data table into functional module description information 204 in natural language according to model input prompt 203. Functional module description information 204 corresponds to test case 201.

[0087] As can be seen, by parsing the test cases of the target object, extracting the test case information, and converting it into natural language descriptions, a functional knowledge base for the target object is constructed. Therefore, the embodiments of this disclosure improve the efficiency of constructing the functional knowledge base.

[0088] To implement the above embodiments, this disclosure also proposes a functional knowledge base generation apparatus. Figure 3 This is a schematic diagram of a functional knowledge base generation device provided in an embodiment of this disclosure. The device can be implemented by software and / or hardware, and is generally integrated into an electronic device. Figure 3 As shown, the device includes:

[0089] The acquisition module 301 is used to acquire a set of test cases for the target object; wherein, the set of test cases includes multiple test cases for testing the functional modules in the target object respectively;

[0090] The parsing module 302 is used to extract test case information of the first test case by parsing the first test case in the test case set; wherein, the test case information includes test case name, test step information and expected test result;

[0091] The conversion module 303 is used to convert the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case; wherein, the functional module description information is used to describe the functional module tested by the first test case, and the functional module description information includes the functional module name and functional operation description information, wherein the functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result;

[0092] The construction module 304 is used to construct a functional knowledge base of the target object based on the functional module description information corresponding to the first test case; wherein, the functional knowledge base is used to support the retrieval of functional information of the target object.

[0093] In one optional embodiment, the apparatus further includes:

[0094] The storage module is used to store the test case information of the first test case in a data table; wherein, the test case name, test step information and expected test result in the test case information are stored in different data fields of the data table, and the test case information of the first test case and the second test case are stored in different data entries of the data table.

[0095] The conversion module specifically includes:

[0096] After reading the test case information of the first test case from the data table, the test case information is converted into a natural language description to obtain the functional module description information corresponding to the first test case.

[0097] In one optional implementation, the conversion module is specifically used for:

[0098] The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case.

[0099] In one optional implementation, the conversion module is specifically used for:

[0100] The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case according to the format template. The natural language conversion model is trained based on the format template.

[0101] In one optional implementation, the functional module description information further includes multiple sub-functional module names corresponding to the functional module name, and the functional operation description information includes functional operation description information corresponding to each of the multiple sub-functional module names, wherein the multiple sub-functional module names are extracted from the corresponding functional operation description information.

[0102] In one optional implementation, the functional knowledge base stores functional module description information according to functional module classification.

[0103] In one optional implementation, the functional knowledge base stores version information of the target object, and the functional knowledge base supports the retrieval of functional information for multiple versions of the target object.

[0104] In one optional implementation, the acquisition module is specifically used for:

[0105] The test cases for the target object are obtained from the test management system and stored in the test case collection; wherein the test cases are in maintenance or use status in the test management system.

[0106] In the functional knowledge base generation apparatus provided in this embodiment, firstly, a test case set for the target object is obtained. This test case set includes multiple test cases used to test functional modules within the target object. Then, a first test case in the test case set is parsed to extract its test case information. This test case information includes a test case name, test step information, and expected test result. Furthermore, by converting the test case information of the first test case into a natural language description, functional module description information corresponding to the first test case is obtained. The functional module description information describes the functional module tested by the first test case. This description includes a functional module name and a functional operation description. The functional module name is derived from the test case name, and the functional operation description is derived from the test step information and the expected test result. Subsequently, a functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case. This functional knowledge base supports the retrieval of functional information for the target object.

[0107] This disclosure embodiment constructs a functional knowledge base for the target object by parsing test cases, extracting test case information, and converting it into natural language descriptions. Therefore, this disclosure embodiment improves the efficiency of constructing the functional knowledge base.

[0108] The functional knowledge base generation apparatus provided in this disclosure can execute the functional knowledge base generation method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0109] In addition to the methods and apparatus described above, this disclosure also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to implement the method for generating the functional knowledge base described in this disclosure.

[0110] This disclosure also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, it implements the method for generating a functional knowledge base as described in this disclosure.

[0111] In addition, this disclosure also provides an electronic device, see [link to relevant documentation]. Figure 4 As shown, it may include:

[0112] The electronic device includes a processor 401, a memory 402, an input device 403, and an output device 404. The number of processors 401 in the electronic device can be one or more. Figure 4 Taking a processor as an example. In some embodiments of this disclosure, the processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means, wherein, Figure 4 Taking the example of a connection between China and Israel via a bus.

[0113] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The input device 403 can be used to receive input digital or character information, and to generate signal inputs related to user settings and function control of the electronic device.

[0114] Specifically in this embodiment, the processor 401 loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize the various functions of the above-mentioned electronic device.

[0115] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0116] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a functional knowledge base, characterized in that, include: Obtain a set of test cases for the target object; wherein the set of test cases includes multiple test cases for testing the functional modules in the target object respectively; By parsing the first test case in the test case set, the test case information of the first test case is extracted; wherein, the test case information includes the test case name, test step information, and expected test result; By converting the test case information of the first test case into a natural language description, the functional module description information corresponding to the first test case is obtained; wherein, the functional module description information is used to describe the functional module tested by the first test case, and the functional module description information includes the functional module name and functional operation description information, wherein the functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result; A functional knowledge base for the target object is constructed based on the functional module description information corresponding to the first test case; wherein, the functional knowledge base is used to support the retrieval of functional information of the target object.

2. The method according to claim 1, characterized in that, After parsing the first test case in the test case set and extracting the test case information of the first test case, the method further includes: The test case information of the first test case is stored in a data table; wherein, the test case name, test step information and expected test result in the test case information are stored in different data fields of the data table, and the test case information of the first test case and the second test case are stored in different data entries of the data table. The step of converting the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case includes: After reading the test case information of the first test case from the data table, the test case information is converted into a natural language description to obtain the functional module description information corresponding to the first test case.

3. The method according to claim 1, characterized in that, The step of converting the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case includes: The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case.

4. The method according to claim 3, characterized in that, The step involves inputting the test case information and model input prompts of the first test case into a natural language conversion model. The natural language conversion model then converts the test case information into a natural language description based on the model input prompts, and outputs the functional module description information corresponding to the first test case, including: The test case information and model input prompts of the first test case are input into the natural language conversion model. The natural language conversion model converts the test case information into a natural language description based on the model input prompts and outputs the functional module description information corresponding to the first test case according to the format template. The natural language conversion model is trained based on the format template.

5. The method according to claim 1, characterized in that, The functional module description information also includes multiple sub-functional module names corresponding to the functional module name. The functional operation description information includes functional operation description information corresponding to each of the multiple sub-functional module names. The multiple sub-functional module names are extracted from the corresponding functional operation description information.

6. The method according to claim 1, characterized in that, The functional knowledge base stores descriptions of functional modules according to their categories.

7. The method according to claim 1, characterized in that, The functional knowledge base stores version information of the target object, and the functional knowledge base supports the retrieval of functional information for multiple versions of the target object.

8. The method according to claim 1, characterized in that, The set of test cases for obtaining the target object includes: The test cases for the target object are obtained from the test management system and stored in the test case collection; wherein the test cases are in maintenance or use status in the test management system.

9. A device for generating a functional knowledge base, characterized in that, The device includes: An acquisition module is used to acquire a set of test cases for a target object; wherein, the set of test cases includes multiple test cases for testing the functional modules in the target object respectively; The parsing module is used to extract test case information of the first test case by parsing the first test case in the test case set; wherein, the test case information includes the test case name, test step information and expected test result; The conversion module is used to convert the test case information of the first test case into a natural language description to obtain the functional module description information corresponding to the first test case; wherein, the functional module description information is used to describe the functional module tested by the first test case, and the functional module description information includes the functional module name and functional operation description information, wherein the functional module name is converted from the test case name, and the functional operation description information is converted from the test step information and the expected test result; A construction module is used to construct a functional knowledge base for the target object based on the functional module description information corresponding to the first test case; wherein, the functional knowledge base is used to support the retrieval of functional information of the target object.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-8.