Task retrieval method, electronic equipment and medium

By receiving user input information, using preset search models and task knowledge bases to identify user intentions, and automatically perform task use cases or feedback search results, it solves the problem of inefficient management and search in traditional automated testing methods, and realizes efficient and accurate task use cases retrieval and execution.

CN120448531APending Publication Date: 2025-08-08CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510580354.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Traditional automated testing methods require professional scripting skills, test case management and retrieval efficiency are inefficient, difficult to meet the needs of rapid iterative development, and are susceptible to human factors, resulting in unstable and inaccurate execution results.

Method used

By receiving user input information, determining the search information based on preset action vocabulary, searching using preset search model and/or preset task knowledge base, identifying user intentions and executing object codes, generating execution reports, or feedback search results to the terminal device.

Benefits of technology

It realizes the automated execution of task use cases, improves retrieval efficiency, saves computing resources, reduces manual operation steps and time, improves automation efficiency and execution accuracy, supports multiple input methods, and adapts to the needs of different scales and complexities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448531A_ABST
    Figure CN120448531A_ABST
Patent Text Reader

Abstract

The invention provides a task retrieval method, electronic equipment and a medium, and the method comprises the steps: receiving user input information, and determining retrieval information according to the user input information and each preset action vocabulary; according to the user input information and the retrieval information, a preset retrieval large model and / or a preset task knowledge base are / is used for retrieval, and a retrieval result is determined; in response to the condition that the retrieval result is the task case in the preset task knowledge base, determining a target number corresponding to the retrieval result according to the retrieval result, determining a target code according to the target number, executing the target code, and generating an execution report corresponding to the target code; and if the retrieval result is not the task case in the preset task knowledge base, feeding back the retrieval result to a terminal device corresponding to the user input information. By means of the technical scheme, task retrieval and automatic execution are achieved, the knowledge base and a large model retrieval mode are fused, the retrieval efficiency is improved, and computing resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information retrieval technology, and in particular to a task retrieval method, electronic equipment, and medium. Background Art

[0002] With the rapid development of information technology, automation technology is increasingly being used across industries, particularly in software testing. Automated testing can significantly improve testing efficiency, reduce labor costs, and ensure software quality. However, traditional automated testing methods often require specialized scripting skills and suffer from inefficient test case management and retrieval, making them inefficient for rapid, iterative development.

[0003] Whether using an automated testing platform or executing scripts, it usually relies on manual operations by testers. Not only is the management of use cases and script codes difficult and the retrieval efficiency low, but it is also easily affected by human factors, which can easily lead to unstable and inaccurate execution results. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a task retrieval method, electronic device and medium to realize task retrieval and automated execution, integrate knowledge base and large model retrieval methods, improve retrieval efficiency and save computing resources.

[0005] This embodiment of the present application provides a task retrieval method, including: receiving user input information, and determining search information based on the user input information and each preset action vocabulary; Based on the user input information and the search information, a preset search model and / or a preset task knowledge base is used to perform a search to determine a search result; wherein the preset task knowledge base is a vector knowledge base containing field contents corresponding to each task use case and each target field; In response to the retrieval result being a task use case in the preset task knowledge base, determining a target number corresponding to the retrieval result according to the retrieval result, determining a target code according to the target number, executing the target code, and generating an execution report corresponding to the target code; In response to the retrieval result not being a task use case in the preset task knowledge base, the retrieval result is fed back to the terminal device corresponding to the user input information.

[0006] According to the technical solution provided in the embodiment of the present application, optionally, determining the search information based on the user input information and each preset action vocabulary includes: Determining whether the user input information includes at least one preset action word; In response to at least one preset action word being included, removing each preset action word included in the user input information to obtain search information; In response to not including any preset action vocabulary, the user input information is used as the search information.

[0007] According to the technical solution provided in the embodiment of the present application, optionally, performing a search based on the user input information and the search information using a preset search macro model and / or a preset task knowledge base to determine the search results includes: In response to the user input information being identical to the search information, searching the preset task knowledge base according to the search information to obtain a knowledge base result; In response to the knowledge base result being empty, performing a search using the preset search model according to the search information to obtain a search result; In response to the knowledge base result being not empty, taking the knowledge base result as a search result; In response to the user input information being different from the search information, the preset search model is used to perform a search based on the search information to obtain a search result.

[0008] According to the technical solution provided in the embodiment of the present application, optionally, searching the preset task knowledge base according to the search information to obtain a knowledge base result includes: Vectorizing the search information to obtain a vector to be searched; Determining a first vector similarity between the vector to be retrieved and each use case vector according to the vector to be retrieved and the use case vector corresponding to each task use case in the preset task knowledge base; In response to at least one first vector similarity being greater than or equal to a first threshold, each first vector similarity greater than the first threshold is used as a first candidate similarity, and at least one target use case is determined based on each first candidate similarity and a first preset number, and the target use case is used as a knowledge base result; In response to the similarities of each first vector being less than the first threshold, it is determined that the knowledge base result is empty.

[0009] According to the technical solution provided in the embodiment of the present application, optionally, performing a search based on the search information using the preset search model to obtain a search result includes: Vectorizing the search information to obtain a vector to be searched; According to the search information, the preset search model is used to search, to obtain initial results of each major model, and to determine the result vectors corresponding to the initial results of each major model; Determining, based on the vector to be searched and each result vector, a second vector similarity between the vector to be searched and each result vector; At least one large model target result is determined according to the similarities of the second vectors and the second preset number, and the large model target result is used as the retrieval result.

[0010] According to the technical solution provided in the embodiment of the present application, optionally, the following further comprises: Get the original use case file; For each task use case, determining the field content corresponding to each target field of the task use case according to the original use case file; For each target field, concatenate the target field with the corresponding field content to obtain first data; splicing the first data of the task use case according to a preset data structure to obtain the second data of the task use case; Using the field content of the use case number field of the task use case as the file name of the task code corresponding to the task use case; wherein the use case number field belongs to the target field; A preset task knowledge base is constructed according to the second data corresponding to each task use case in the original use case file.

[0011] According to the technical solution provided in the embodiment of the present application, optionally, determining the target number corresponding to the search result according to the search result, and determining the target code according to the target number includes: According to the search result and the preset data structure, the field content corresponding to the use case number field in the search result is used as the target number corresponding to the search result; According to the target number, the file name of each task code is searched to obtain the target code corresponding to the target number.

[0012] According to the technical solution provided in the embodiment of the present application, optionally, receiving user input information includes: Receive initial input information; In response to the initial input information being voice information, converting the initial input information into text to obtain text input information; In response to the initial input information being text information, taking the initial input information as text input information; Determining whether the text input information contains at least two search intentions; In response to containing at least two search intents, the text input information is split according to each search intent to obtain user input information corresponding to each search intent; In response to containing only one retrieval intention, the text input information is used as user input information.

[0013] An embodiment of the present application further provides an electronic device, comprising: processor and memory; The processor is configured to execute the steps of the task retrieval method as described in any embodiment by calling the program or instructions stored in the memory.

[0014] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of the task retrieval method as described in any embodiment.

[0015] In summary, the present application proposes a task retrieval method, which receives user input information, determines retrieval information based on the user input information and various preset action words, so as to identify the user's intention and identify whether it is necessary to retrieve a task use case or a general information retrieval. Then, based on the user input information and the retrieval information, a preset retrieval large model and / or a preset task knowledge base is used to perform a retrieval to determine the retrieval result. In response to the retrieval result being a task use case in the preset task knowledge base, the target number corresponding to the retrieval result is determined based on the retrieval result, the target code is determined based on the target number, and the target code is executed to generate an execution report corresponding to the target code, and the task code corresponding to the task use case is automatically executed. In response to the retrieval result not being a task use case in the preset task knowledge base, the retrieval result is fed back to the terminal device corresponding to the user input information, so that the retrieval result can be provided to the user for viewing, thereby realizing the retrieval of task use cases and the automatic execution of task codes, integrating the knowledge base and the large model retrieval method, improving the retrieval efficiency, and saving computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flowchart of a task retrieval method provided in an embodiment of the present application; Figure 2 This is a flowchart of another task retrieval method provided by an embodiment of the present application; Figure 3 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.

[0018] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0019] As mentioned in the background technology, in response to the problems in the existing technology, this application proposes a task retrieval method that is suitable for retrieving and automating various types of tasks. The brake taillight control method provided in each embodiment of this application can be executed by an electronic device.

[0020] Figure 1 This is a flowchart of a task retrieval method provided by an embodiment of the present application. Figure 1 , the task retrieval method specifically includes: S110: Receive user input information, and determine search information based on the user input information and preset action words.

[0021] The user input information is the command information to be searched, such as opening the settings interface, etc. The preset action vocabulary is the vocabulary of various pre-set command actions. The search information is the information used in subsequent searches.

[0022] Specifically, the system receives information that the user wants to execute or retrieve as user input. It then identifies the user's intent by determining whether the user input contains pre-defined action terms. The user's intent could be to search and execute a task use case or simply retrieve and display information. The user input is then processed to exclude pre-defined action terms, resulting in the retrieved information.

[0023] Based on the above example, the following method can be used to determine the search information based on the user input information and each preset action word: Determining whether the user input information contains at least one preset action word; In response to the inclusion of at least one preset action word, each preset action word included in the user input information is removed to obtain search information; In response to not including any preset action vocabulary, the user input information is used as the search information.

[0024] Specifically, the user input is identified to determine whether it contains at least one preset action word. If so, it indicates that the user intends to perform a task. To improve retrieval results, the preset action words in the user input are removed, that is, replaced with blanks. The processed information is used as retrieval information for subsequent task retrieval. If not, it indicates that the user intends to perform information retrieval. Therefore, the user input can be directly used as retrieval information to facilitate subsequent retrieval of corresponding answer information.

[0025] For example, the preset action vocabulary can be expressed in the form of the following list: action_keywords = ["execute", "open", "run", "start"], and the list can be expanded as needed.

[0026] Based on the above example, if the user input information includes multiple instruction intentions, it can be processed in the following ways to achieve the purpose of receiving user input information: Receive initial input information; In response to the initial input information being voice information, converting the initial input information into text to obtain text input information; In response to the initial input information being text information, taking the initial input information as text input information; Determine whether the text input information contains at least two search intents; In response to containing at least two search intents, the text input information is split according to each search intent to obtain user input information corresponding to each search intent; In response to only one search intention being included, the text input information is used as user input information.

[0027] The initial input information is user input, which can be text or voice information and may include one, two, or more search intents. The text input information is the textual representation of the initial input information. The search intent is the purpose of the search as reflected in the text input information, with each purpose corresponding to one search intent.

[0028] Specifically, the initial input information received from the user can be text information entered by the user via a keyboard, or voice information entered by the user via a voice receiving device such as a microphone. If the initial input information is voice information, it can be converted to text using a speech-to-text algorithm, and the converted information is recorded as the text input information. The speech-to-text algorithm can be an ASR (Automatic Speech Recognition) algorithm. If the initial input information is text information, no further processing is required and the initial input information is directly used as the text input information. Furthermore, search intent recognition can be performed on the text input information by analyzing and determining one or more search intents of the user from the text input information through natural language processing, and further determining the portion of the text input information corresponding to each search intent. A determination is made as to whether the text input information contains at least two search intents to facilitate determining whether to conduct searches in parallel or in multiple rounds. If at least two search intents are contained, the text input information is split according to each search intent, obtaining the portion of the text input information corresponding to the search intent as the user input information corresponding to the search intent, so that subsequent searches using the at least two user inputs can be performed separately. If it only contains one search intent, the text input information can be directly used as user input information for subsequent searches.

[0029] S120: Based on the user input information and the search information, a search is performed using a preset search model and / or a preset task knowledge base to determine the search results.

[0030] The preset task knowledge base is a vector knowledge base containing the field contents corresponding to each task use case and each target field. A task use case is a description of the completed task. The target field is the identifier of each field involved in the task use case, and the field content is the information contained in the task use case under the target field. The vector knowledge base can be the Faiss (Facebook AI SimilaritySearch) vector database, which is mainly used to efficiently process similarity search and clustering tasks for large-scale, high-dimensional vectors. Faiss is used as the underlying storage structure of the preset task knowledge base to store and process the vector representation of each task use case. The preset retrieval large model can be flexibly connected to various large models, such as DeepSeek and GPT (Generative Pre-trained Transformer).

[0031] Specifically, from the above steps, it can be seen that if the user input information contains preset action vocabulary, it is necessary to search for task use cases. In this case, the user input information is different from the search information, and it is necessary to use the preset task knowledge base for search. If it cannot be retrieved, it is necessary to continue to use the preset search large model for search, and use the retrieved content as the search result. In the above case, the search result may be the use case information in the preset task knowledge base, or it may be the answer information retrieved by the preset search large model. If the user input information does not contain the preset action vocabulary, it is necessary to search for the answer information. In this case, the user input information is the same as the search information, and it is necessary to use the preset search large model for search, and use the retrieved content as the search result.

[0032] Based on the above example, you can build a preset task knowledge base in the following ways: Get the original use case file; For each task use case, determine the field content corresponding to each target field based on the original use case file; For each target field, concatenate the target field with the corresponding field content to obtain first data; The first data of the task use case are spliced according to a preset data structure to obtain the second data of the task use case; Use the content of the use case number field of the task use case as the file name of the task code corresponding to the task use case; A preset task knowledge base is constructed based on the second data corresponding to each task use case in the original use case file.

[0033] The original use case file is a file used to count each task use case and can be an Excel (spreadsheet software) file, etc. The first data is the data obtained by concatenating a target field of a task use case with the corresponding field content. The preset data structure is a data structure composed of a predetermined arrangement order of each target field. The second data is the concatenation result of multiple first data corresponding to a task use case. The use case number field belongs to the target field and is a field used to record the number of the task use case. The task code is the execution code corresponding to the task use case. For example, the task code corresponding to the test case is the test script code, etc. The file name is the code file name of the task code.

[0034] Specifically, the original use case file for storing each task use case is obtained. For each task use case in the original use case file, the field content corresponding to the task use case and each target field is identified. For each target field under the task use case, the target field and the corresponding field content are spliced to obtain the first data corresponding to the target field under the task use case. The first data corresponding to each target field under the task use case are sorted and spliced according to the preset data structure to obtain the second data of the task use case. The second data corresponding to each task use case in the original use case file is written into the vector knowledge base to construct a preset task knowledge base. In addition, for each task use case, the task code corresponding to it is bound, and the file name of the task code corresponding to it is consistent with the field content in the use case number field of the task use case, so that the field content in the use case number field is used as an index. When the task use case is retrieved, the task code can be quickly searched.

[0035] For example, you can first define a knowledge base structure class, such as LibraryStructur, and declare the knowledge base structure class to process data and store each secondary data in the preset task knowledge base. Taking the Excel format as an example, as shown in Table 1, you can use the Get_row_content command to obtain the content of each Excel row; use the Save_case_library command to splice the secondary data according to the preset data structure, and then store the secondary data in the preset task knowledge base.

[0036] Table 1: Table of the original use case file

[0037] Taking the first row in Table 1 as an example, the second data obtained by splicing according to the preset data structure is: Use case number: Settings Title: Settings Precondition: Vehicle startup Execution steps: Click the Settings button to open the settings Expected result: Enter the settings interface.

[0038] It should be noted that before using the preset task knowledge base for retrieval, an effect evaluation is required, which can be performed by combining the recall rate, precision rate and F1 score. Only after the evaluation requirements are met can the preset task knowledge base and the corresponding retrieval method be put into subsequent use.

[0039] S130. In response to the retrieval result being a task use case in a preset task knowledge base, a target number corresponding to the retrieval result is determined based on the retrieval result, a target code is determined based on the target number, and the target code is executed to generate an execution report corresponding to the target code.

[0040] The target number is the use case number of the task case found in the search results. The target code is the task code corresponding to the target number. The execution report is the task report generated during and after executing the target code. For example, if the task code is a test script, the execution report can be the corresponding test report.

[0041] Specifically, if the search result is a task use case in the preset task knowledge base, it means that not only does the user intend to perform a certain task, but the corresponding task use case has also been retrieved. Therefore, this task can be performed. Specifically, the search results can be analyzed, that is, the retrieved task use case is analyzed to obtain the use case number in the task use case as the target number. Then, a code search is performed according to the target number to obtain the target code corresponding to the target number. The target code is executed and an execution report corresponding to the target code is generated. The execution report can be stored or displayed on the terminal device corresponding to the user input information for the user to view.

[0042] Based on the above example, since the use case number of any task use case is also the file name of the task code corresponding to the task use case, the following method can be used to determine the target number corresponding to the search result based on the search result, and determine the target code based on the target number: According to the search results and the preset data structure, the field content corresponding to the use case number field in the search results is used as the target number corresponding to the search results; According to the target number, search the file name of each task code to obtain the target code corresponding to the target number.

[0043] Specifically, the search results are analyzed according to a preset data structure to determine the field content corresponding to the use case number field in the search results. This field content is used as the target number corresponding to the search results. Since the file name of the task code is the use case number of the task use case corresponding to the task code, the target number can be used as an index to search the file name of each task code. The searched task code is used as the target code corresponding to the target number, which is the task code to be executed later.

[0044] S140: In response to the retrieval result not being a task use case in the preset task knowledge base, feeding back the retrieval result to a terminal device corresponding to the user input information.

[0045] The terminal device is used to receive user input information and provide feedback on search results.

[0046] Specifically, if the retrieval result is not a task use case in the preset task knowledge base, it means that the user may intend to perform a certain task, but the corresponding task use case has not been retrieved, and only relevant information can be provided. It may also be that the user intends to retrieve information. Therefore, the retrieval result is the content that needs to be fed back to the user. The retrieval result can be directly fed back to the terminal device corresponding to the user input information for the user to view.

[0047] The task retrieval method provided in the embodiment of the present application receives user input information, determines retrieval information based on the user input information and various preset action words, so as to identify the user's intention and identify whether it is necessary to retrieve a task use case or a general information retrieval. Then, based on the user input information and the retrieval information, a preset retrieval large model and / or a preset task knowledge base is used to perform a retrieval to determine the retrieval result. In response to the retrieval result being a task use case in the preset task knowledge base, a target number corresponding to the retrieval result is determined based on the retrieval result, a target code is determined based on the target number, and the target code is executed to generate an execution report corresponding to the target code, and the task code corresponding to the task use case is automatically executed. In response to the retrieval result not being a task use case in the preset task knowledge base, the retrieval result is fed back to the terminal device corresponding to the user input information, so that the retrieval result is provided to the user for viewing, thereby realizing the retrieval of task use cases and the automatic execution of task codes, integrating the knowledge base and large model retrieval methods, improving retrieval efficiency, and saving computing resources.

[0048] Figure 2 This is a flowchart of another task retrieval method provided by an embodiment of the present application. Based on the above embodiments, the situation and process of using a preset retrieval model for retrieval and the situation and process of using a preset task knowledge base for retrieval are exemplarily described. Figure 2 , the task retrieval method specifically includes: S210: Receive user input information, and determine search information based on the user input information and preset action words.

[0049] S220: Determine whether the user input information is the same as the search information. If they are the same, execute S230; if they are different, execute S260.

[0050] S230. Search the preset task knowledge base according to the search information to obtain a knowledge base result, and determine whether the knowledge base result is empty. If it is empty, execute S240; if not, execute S250.

[0051] Based on the above example, you can search the preset task knowledge base based on the search information in the following ways to obtain the knowledge base results: Vectorize the search information to obtain the vector to be searched; Determine the similarity between the first vector of the vector to be retrieved and each use case vector according to the vector to be retrieved and the use case vector corresponding to each task use case in the preset task knowledge base; In response to at least one first vector similarity being greater than or equal to a first threshold, each first vector similarity greater than the first threshold is used as a first candidate similarity, and at least one target use case is determined based on each first candidate similarity and a first preset number, and the target use case is used as a knowledge base result; In response to the similarities of the first vectors being less than the first threshold, it is determined that the knowledge base result is empty.

[0052] Among them, the vector to be retrieved is the result of vectorized representation of the retrieval information. The use case vector is the result of vectorized representation of the task use case in the preset task knowledge base. The first vector similarity is the similarity between the vector to be retrieved and the use case vector. The first threshold is the basic threshold when searching using the preset task knowledge base, which is used to determine whether there is a knowledge base result. The first selected similarity is the similarity of each first vector that is greater than the first threshold. The first preset number is the upper limit of the number of target use cases in the preset knowledge base results. The target use case is a task use case that meets both the first threshold and the first preset number limit.

[0053] Specifically, when constructing a preset task knowledge base, each task use case can be vectorized to obtain a use case vector corresponding to each task use case. The retrieval information is vectorized to obtain a vector to be retrieved. The similarity between the vector to be retrieved and the use case vector corresponding to each task use case is calculated. For example, the cosine similarity calculation method is used to obtain the first vector similarity between the vector to be retrieved and each use case vector. Determine whether there is at least one first vector similarity greater than or equal to the first threshold. If so, each first vector similarity greater than or equal to the first threshold is used as the first candidate similarity, and then, each first candidate similarity is sorted from large to small, and the task use cases corresponding to each first candidate similarity that is within the first preset number are used as target use cases, and each determined target use case is used as the knowledge base result. If it does not exist, it means that each task use case in the preset task knowledge base does not match the retrieval information and cannot be used as the corresponding result. Therefore, it is determined that the knowledge base result is empty.

[0054] S240. Perform a search using a preset search model based on the search information to obtain search results, and execute S280.

[0055] Specifically, since the knowledge base result is empty, it means that the use case result corresponding to the search information cannot be found through the preset task knowledge base. Therefore, the search strategy is changed to answer information retrieval, that is, the search information is retrieved using the preset search model, and the output result of the preset search model is used as the search result.

[0056] Based on the above example, you can use the following methods to search based on the search information and use the preset search model to obtain search results: Vectorize the search information to obtain the vector to be searched; According to the search information, use the preset search model to search, obtain the initial results of each model, and determine the result vector corresponding to the initial results of each model; Determining, based on the vector to be searched and each result vector, a second vector similarity between the vector to be searched and each result vector; At least one large model target result is determined according to the similarities of the second vectors and the second preset number, and the large model target result is used as the retrieval result.

[0057] The initial results of the large model are the multiple results obtained by searching the search information using the preset large search model. The result vector is the vectorized representation of the initial results of each large model. The second vector similarity is the similarity between the search vector and the result vector. The second preset number is the preset upper limit of the number of results returned using the preset large search model.

[0058] Specifically, the search information is vectorized to obtain a vector to be searched. By retrieving the search information through a preset search large model, a plurality of matching large model initial results can be obtained, and each large model initial result is vectorized to obtain a corresponding result vector. The similarity between the vector to be searched and the result vector corresponding to each large model initial result is calculated. For example, the cosine similarity calculation method is used to obtain the second vector similarity between the vector to be searched and each large model initial result. The second vector similarities are sorted from large to small, and the large model initial results corresponding to the second vector similarities that are within the second preset number are used as large model target results, and each large model target result is used as the search result.

[0059] S250: Use the knowledge base result as the search result, and execute S270.

[0060] S260. According to the search information, use the preset search model to search, obtain the search results, and execute S280.

[0061] Specifically, if the user input information is different from the search information, it means that the user input information does not contain any preset action vocabulary. It can be considered that the user's intention is to retrieve information. Therefore, the preset search model is directly used to search the search information, and the output result of the preset search model is used as the search result. The specific search process is similar to S240 and will not be repeated here.

[0062] S270. Determine the target number corresponding to the search result according to the search result, determine the target code according to the target number, execute the target code, and generate an execution report corresponding to the target code.

[0063] S280: Feedback the search results to the terminal device corresponding to the user input information.

[0064] This approach combines knowledge base technology with natural language processing, enabling users to execute specific tasks, such as use case codes, simply by inputting information. This significantly reduces manual steps and time, significantly improving automation efficiency. Furthermore, leveraging the efficient search capabilities of the Faiss vector database, relevant task use cases can be quickly located, significantly improving speed compared to traditional search methods, effectively reducing preparation time and increasing use case retrieval speed. By storing task use case content in a vector database (pre-set task knowledge base) and using the task use case's use case number as the corresponding task code file name, the process of associating use cases with code is simplified, reducing configuration and management complexity. This reduction in manual work and simplified use case-code association reduces maintenance costs and the need for additional repair work caused by human error. Before executing task code, the pre-set task knowledge base is searched to ensure that only matching task code is executed, effectively avoiding invalid execution and the resulting errors, and improving execution accuracy and reliability. If no corresponding task use case can be found in the pre-set task knowledge base, the pre-set search model is used as a default search. This strategy optimizes the search process, reduces unnecessary computation of the model, and conserves computing resources. Furthermore, it supports multiple input methods for entering initial input information. Combined with an efficient retrieval mechanism, it is easy to integrate and expand, adapting to needs of varying scale and complexity, and improving flexibility and scalability. Retrieval and execution of task use cases can be completed through simple text input, making the operation easy and intuitive, greatly improving the user experience. Taking automated testing as an example, the above solution can also be tightly integrated with continuous integration and continuous deployment processes to support the continuous operation of automated testing, helping to accelerate software development iterations and improve software quality. The efficient use case retrieval and execution mechanism enables testers to more easily execute more test cases, thereby increasing test coverage and ensuring an overall improvement in software quality.

[0065] The task retrieval method provided in the embodiment of the present application determines whether the user input information is the same as the retrieval information. If they are the same, a search is performed in the preset task knowledge base based on the retrieval information to obtain the knowledge base result. It is determined whether the knowledge base result is empty. If it is empty, a search is performed using the preset retrieval large model based on the retrieval information to obtain the retrieval result. If it is not empty, the knowledge base result is used as the retrieval result. If they are different, a search is performed using the preset retrieval large model based on the retrieval information to obtain the retrieval result. This method realizes the judgment of the user's retrieval intention by comparing the user input information with the retrieval information. When the retrieval intention is use case and code retrieval, the knowledge base and large model retrieval are integrated. When the retrieval intention is general information retrieval, the large model retrieval is used, which effectively optimizes the retrieval process and improves the retrieval efficiency.

[0066] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 300 includes one or more processors 301 and a memory 302 .

[0067] The processor 301 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 300 to perform desired functions.

[0068] The memory 302 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may execute the program instructions to implement the task retrieval method of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters and thresholds may also be stored in the computer-readable storage medium.

[0069] In one example, electronic device 300 may further include an input device 303 and an output device 304, which are interconnected via a bus system and / or other connection mechanisms (not shown). Input device 303 may include, for example, a keyboard, a mouse, etc. Output device 304 may output various information to the outside, including warning information, braking force, etc. Output device 304 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.

[0070] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 300 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device 300 may further include any other appropriate components according to specific application scenarios.

[0071] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to perform the steps of the task retrieval method provided by any embodiment of the present application.

[0072] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0073] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the task retrieval method provided by any embodiment of the present application.

[0074] The computer-readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0075] It should be noted that the terms used in this application are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.

[0076] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0077] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of the present invention, they can also make several improvements, modifications or changes, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A task retrieval method, characterized in that: include: receiving user input information, and determining search information based on the user input information and each preset action vocabulary; Based on the user input information and the search information, a preset search model and / or a preset task knowledge base is used to perform a search and determine a search result; wherein the preset task knowledge base is a vector knowledge base containing field contents corresponding to each task use case and each target field; In response to the retrieval result being a task use case in the preset task knowledge base, determining a target number corresponding to the retrieval result according to the retrieval result, determining a target code according to the target number, executing the target code, and generating an execution report corresponding to the target code; In response to the retrieval result not being a task use case in the preset task knowledge base, the retrieval result is fed back to the terminal device corresponding to the user input information.

2. The method according to claim 1, characterized in that The step of determining the search information based on the user input information and each preset action vocabulary includes: Determining whether the user input information includes at least one preset action word; In response to at least one preset action word being included, removing each preset action word included in the user input information to obtain search information; In response to not including any preset action vocabulary, the user input information is used as the search information.

3. The method according to claim 1, characterized in that The step of searching using a preset search model and / or a preset task knowledge base based on the user input information and the search information to determine the search results includes: In response to the user input information being identical to the search information, searching the preset task knowledge base according to the search information to obtain a knowledge base result; In response to the knowledge base result being empty, performing a search using the preset search model according to the search information to obtain a search result; In response to the knowledge base result being not empty, taking the knowledge base result as a search result; In response to the user input information being different from the search information, the preset search model is used to perform a search based on the search information to obtain a search result.

4. The method according to claim 3, characterized in that The searching in the preset task knowledge base according to the search information to obtain the knowledge base results includes: Vectorizing the search information to obtain a vector to be searched; Determining a first vector similarity between the vector to be retrieved and each use case vector according to the vector to be retrieved and the use case vector corresponding to each task use case in the preset task knowledge base; In response to at least one first vector similarity being greater than or equal to a first threshold, each first vector similarity greater than the first threshold is used as a first candidate similarity, and at least one target use case is determined based on each first candidate similarity and a first preset number, and the target use case is used as a knowledge base result; In response to the similarities of each first vector being less than the first threshold, it is determined that the knowledge base result is empty.

5. The method according to claim 3, characterized in that The method of performing a search using the preset search model according to the search information to obtain search results includes: Vectorizing the search information to obtain a vector to be searched; According to the search information, the preset search model is used to search, to obtain initial results of each major model, and to determine the result vectors corresponding to the initial results of each major model; Determining, based on the vector to be searched and each result vector, a second vector similarity between the vector to be searched and each result vector; At least one large model target result is determined according to the similarities of the second vectors and the second preset number, and the large model target result is used as the retrieval result.

6. The method according to claim 1, characterized in that Also includes: Get the original use case file; For each task use case, determining the field content corresponding to each target field of the task use case according to the original use case file; For each target field, concatenate the target field with the corresponding field content to obtain first data; splicing the first data of the task use case according to a preset data structure to obtain the second data of the task use case; Using the field content of the use case number field of the task use case as the file name of the task code corresponding to the task use case; wherein the use case number field belongs to the target field; A preset task knowledge base is constructed according to the second data corresponding to each task use case in the original use case file.

7. The method according to claim 6, characterized in that The step of determining a target number corresponding to the search result according to the search result, and determining a target code according to the target number, includes: According to the search result and the preset data structure, the field content corresponding to the use case number field in the search result is used as the target number corresponding to the search result; According to the target number, the file name of each task code is searched to obtain the target code corresponding to the target number.

8. The method according to claim 1, characterized in that The receiving user input information includes: receiving initial input information; In response to the initial input information being voice information, converting the initial input information into text to obtain text input information; In response to the initial input information being text information, taking the initial input information as text input information; Determining whether the text input information contains at least two search intentions; In response to containing at least two search intents, the text input information is split according to each search intent to obtain user input information corresponding to each search intent; In response to containing only one retrieval intention, the text input information is used as user input information.

9. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the task retrieval method according to any one of claims 1 to 8 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the task retrieval method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and system for generating unauthorized test case

    CN117806966A

  • Task processing method and device, equipment and storage medium

    CN118312529A

  • Information retrieval method and device and electronic equipment

    CN118916443A

  • Software automatic test method and system, storage medium and electronic equipment

    CN119046166A