A remote patrol system control method and system based on sound and language model
Through the remote inspection system control method based on voice and language models, the problems of cumbersome operation and untimely notification of results of the substation remote inspection system are solved, voice control and precise query are realized, the operation process is simplified and the work efficiency of the staff is improved.
Patent Information
- Application Number
- CN202410389170.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-04-02
AI Technical Summary
The existing substation remote inspection system is cumbersome to operate, error-prone in querying, and the results are not notified in a timely manner. Especially in substations where main and auxiliary systems have not been built or inspection points are not covered, the inspection process lasts long and the results cannot be reported immediately. observed.
Adopt a remote inspection system control method based on voice and language models to communicate with the system through voice input, use fine-tuned speech recognition models and remote inspection expert models to parse intent data, generate service call requests, and convert the results into voice output to simplify operation process and improve query accuracy.
The voice-controlled remote inspection system is implemented to perform tasks, simplifying the operation process, reducing the difficulty of operation, obtaining task results in a timely manner, improving query accuracy and error tolerance, and reducing operational requirements for staff.
Smart Images

Figure CN117975968B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent inspection of transformer substations, and more specifically, to a remote inspection system control method and system based on sound and language models. Background Art
[0002] The substation remote inspection system is a system planned by the State Grid Corporation of China that uses robots, drones, voiceprint devices, cameras, etc. as perception layer devices, and generates inspection results after intelligent analysis of collected data through the algorithm host. The system mainly performs inspection tasks of substation equipment by manually initiating inspections, setting periodic inspection tasks, or triggering alarm signals from main and auxiliary systems. The system carries out inspection tasks around inspection points. Inspection points refer to business checkpoints, and there are generally multiple inspection points for one device. The minimum business monitoring point is usually constructed by one or more camera, drone or robot preset positions to observe whether there are defects in the components of each inspection point. The system is designed with a retrieval module based on point attributes, which is used to query the inspection points and perform equipment monitoring and viewing, inspection task initiation, inspection equipment settings, and other operations.
[0003] However, due to the numerous business attributes of patrol points, such as substation area, substation interval, equipment name, component name, phase name, point name, point code, patrol type, importance level, recognition algorithm, perception layer equipment, etc., the query accuracy is not high during manual retrieval, resulting in cumbersome operations. When an emergency occurs, it is impossible to check the relevant conditions of the equipment in the first time, especially for substations without primary and auxiliary systems or patrol points not covered by the primary and auxiliary systems. On the other hand, since multiple patrol points are involved, the patrol process lasts a long time, and the patrol results may not be observed by on-site staff in the first time after they are generated. Summary of the invention
[0004] The purpose of this application is to provide a remote patrol system control method and system based on sound and language models, so as to solve the problems of cumbersome operation, error-prone query and untimely notification of results of existing remote patrol systems; to expand the existing substation remote patrol system, realize remote patrol system control through sound and language large models, and enable staff to communicate with the remote patrol system through voice input, guide the remote patrol system to quickly complete patrol-related work, and obtain voice feedback on patrol task results, so as to simplify the operation process of the remote patrol system, reduce the difficulty of operation, and facilitate staff to know the task results in a timely manner.
[0005] The present application first provides a remote patrol system control method based on sound and language models, including: acquiring voice data, and converting the voice data into text data according to a fine-tuned speech recognition model; parsing intent data from the text data according to a remote patrol expert model, the intent data including: an API interface and interface parameters of a service to be called, the remote patrol expert model being a SOTA large language model obtained through training; parsing the interface parameters in the intent data, and enhancing the interface parameters to obtain enhanced intent data; generating a service call request according to the enhanced intent data, and calling the remote patrol system to execute the service through the service call request to obtain a service result; inputting the service result into the remote patrol expert model to generate reply text data; and converting the reply text data into reply voice data for output.
[0006] By adopting the above technical solution, by obtaining the voice data of the staff, the service interface of the remote patrol system can be called, the remote patrol system can be controlled to perform services, and the results can be displayed by voice. The remote patrol system can be controlled to perform services by voice, and the service results are also returned by voice, which simplifies the operation process of the staff. In addition, by enhancing the intent of the interface parameters, accurate calling can be achieved, reducing the requirements for the staff.
[0007] In a possible implementation, the fine-tuned speech recognition model is obtained in the following manner: a speech recognition SOTA model is acquired, and the speech recognition SOTA model is fine-tuned according to proprietary speech text data in the electric power field to obtain a fine-tuned speech recognition model.
[0008] In a possible implementation, the remote patrol expert model is obtained in the following manner: obtaining the API interface and annotations of the remote patrol system to form an intention implementation seed library; supplementing the context and placeholder of the remote patrol system information for each API interface in the intention implementation seed library to generate a placeholder intention expression; inputting the placeholder intention expression into a general large language model for expansion to form a placeholder intention expression data set; manually reviewing the placeholder intention expression data set to filter out erroneous placeholder intention expressions; replacing the placeholders in the placeholder intention expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain an intention expression data set; training the large language model based on the intention expression data set to obtain a remote patrol expert model.
[0009] In a possible implementation, the enhanced intent data is obtained in the following manner: synchronizing the relational data and entity data in the remote patrol system to generate a document database, vectorizing the entity data in the remote patrol system through a word embedding model to generate a vector database; searching the interface parameters in the document database and the vector database respectively, and performing an intersection operation on the search results to obtain enhanced interface parameters; and combining the enhanced interface parameters and the API interface of the service to be called into enhanced intent data.
[0010] In a possible implementation, the method further includes: acquiring an alarm text of a remote patrol system, and converting the alarm text into a voice output.
[0011] The present application also provides a remote patrol system control system based on sound and language models, including: a speech recognition module, used to obtain speech data, and convert the speech data into text data according to a fine-tuned speech recognition model; a large language model module, used to parse intent data from the text data according to a remote patrol expert model, the intent data including: an API interface and interface parameters of a service to be called, the remote patrol expert model is a SOTA large language model obtained through training; a retrieval enhancement module, used to parse the interface parameters in the intent data, and enhance the interface parameters to obtain enhanced intent data; an intent call module, used to generate a service call request according to the enhanced intent data, and call the remote patrol system to execute the service through the service call request to obtain a service result; the large language model module is also used to input the service result into the remote patrol expert model to generate reply text data; a speech generation module, used to convert the reply text data into reply voice data output.
[0012] In a possible implementation, the speech recognition module is also used to obtain a speech recognition SOTA model, and fine-tune the speech recognition SOTA model according to proprietary speech text data in the power field to obtain a fine-tuned speech recognition model.
[0013] In a possible implementation, the large language model module is also used to: obtain the API interface and annotations of the remote patrol system to form an intention realization seed library; supplement the context and placeholder of the remote patrol system information for each API interface in the intention realization seed library to generate a placeholder intention expression; input the placeholder intention expression into a general large language model for expansion to form a placeholder intention expression data set; manually review the placeholder intention expression data set to screen out erroneous placeholder intention expressions; replace the placeholders in the placeholder intention expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain an intention expression data set; train the large language model based on the intention expression data set to obtain a remote patrol expert model.
[0014] In a possible implementation, the retrieval enhancement module is also used to: synchronize relational data and entity data in the remote patrol system to generate a document database, vectorize the entity data in the remote patrol system through a word embedding model to generate a vector database; retrieve the interface parameters in the document database and the vector database respectively, and perform intersection operations on the retrieval results to obtain enhanced interface parameters; and combine the enhanced interface parameters and the API interface of the service to be called into enhanced intent data.
[0015] In a possible implementation, the voice generation module is further used to obtain an alarm text of the remote patrol system and convert the alarm text into a voice output.
[0016] Compared with the prior art, the present application has the following beneficial effects: the present application collects the voice data of the staff, converts the voice data into text data through the voice recognition model, parses the intention data through the remote patrol expert model, and then calls the corresponding service of the remote patrol system through the intention data, and converts the structured service results into semantically coherent text through the remote patrol expert model, and finally outputs them through voice; the staff can control the remote patrol system to perform tasks through voice, and finally returns the task results in voice form, which simplifies the operation process of the remote patrol system and facilitates timely acquisition of task results;
[0017] This application enhances the interface parameters in the intent data, combines the document database and the vector database to retrieve the expression closest to the interface parameters, ensures accurate control, avoids control errors caused by non-standard expressions of staff, improves fault tolerance, and reduces operational requirements for staff;
[0018] This application uses API interfaces and annotations to form an intent seed library, generates placeholder intent expressions by supplementing the context and placeholders of the remote patrol system information, expands the training corpus through a general large language model, obtains an intent expression dataset by replacing placeholders with entities, and trains a remote patrol expert model through the intent expression dataset. By inputting a piece of text data, the API interface and interface parameters of the service to be called can be parsed, thereby controlling the remote patrol system to perform tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0020] Figure 1 A flowchart of a remote patrol system control method based on sound and language models;
[0021] Figure 2 A flowchart for training a remote patrol expert model;
[0022] Figure 3 Flowchart diagram enhanced for interface parameter retrieval;
[0023] Figure 4 This is a structural diagram of the control system of the remote patrol system based on sound and language models. DETAILED DESCRIPTION
[0024] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0025] See also Figure 1 As shown, Figure 1 The present invention is a flow chart of a remote patrol system control method based on sound and language models, the method comprising: S1, acquiring voice data, and converting the voice data into text data according to a fine-tuned voice recognition model; S2, parsing intent data from the text data according to a remote patrol expert model, the intent data comprising: an API interface and interface parameters of a service to be called, the remote patrol expert model being a SOTA large language model obtained through training; S3, parsing the interface parameters in the intent data, and enhancing the interface parameters to obtain enhanced intent data; S4, generating a service call request according to the enhanced intent data, and calling the remote patrol system to execute the service through the service call request to obtain a service result; S5, inputting the service result into the remote patrol expert model to generate reply text data; S6, converting the reply text data into reply voice data for output.
[0026] Specifically, the existing remote patrol system is improved by acquiring the voice data of the staff through audio acquisition equipment, converting the voice data into text data through a speech recognition model, parsing the intention data through a remote patrol expert model, retrieving the interface parameters to accurately and enhance the intention data, and then calling the remote patrol system through the intention data to execute the corresponding service task. The returned task results are converted into semantically coherent text through the remote patrol expert model and finally output through voice.
[0027] The improvement of this solution is that by obtaining the voice data of the staff, the service interface of the remote patrol system can be called, the remote patrol system can be controlled to perform services, and the results can be displayed in the form of voice, so that the voice control remote patrol system can perform services and the results can be notified in time in the form of voice, simplifying the operation process of the staff. In addition, accurate calling can be achieved by retrieving the interface parameters, reducing the requirements for the staff.
[0028] Step S1 obtains voice data, and converts the voice data into text data according to the fine-tuned voice recognition model. In order to improve the recognition ability of the voice recognition model for special vocabulary in the power field, the voice recognition model is fine-tuned using pre-recorded voice text data that is specific to the power field. For example, the whisper open sourced by OpenAI is used as a voice recognition model, and the voice recognition model is fine-tuned (Fine-Tune) in the power field through pre-recorded voice and corresponding text data that are specific to the power field, so as to improve the recognition accuracy of the voice recognition model for special vocabulary in the power industry. Furthermore, in order to reduce the computing power cost of fine-tuning training, Lora or QLora can be used for fine-tuning.
[0029] Step S2 parses the intent data from the text data according to the remote patrol expert model, and the intent data includes: the API interface and interface parameters of the service to be called. The purpose of the remote patrol expert model is to perform intent analysis on the text data generated by the speech recognition large model and simulate human natural language conversation. An open source large language model can be selected for intent recognition training to obtain a remote patrol expert model. For example, the ChatGLM3-6B model. In the traditional way, intent recognition training for a large language model requires manual writing of a large amount of corpus data. In order to reduce the labor input cost, this solution uses a general large language model to write training corpus data for intent recognition training to obtain a remote patrol expert model.
[0030] See also Figure 2 As shown, Figure 2 The figure is a flowchart for training the remote patrol expert model. The remote patrol expert model is obtained by the following method:
[0031] S21. Obtain the API interface and annotations of the remote patrol system to form an intent realization seed library. Specifically, after collecting the relevant API interface source codes that require voice interaction in the existing remote patrol system, manually supplement and adjust the parts of the source code where the annotations are missing or unclear, and remove the API interface implementation part of the source code. Each pair of API interface and annotation constitutes an API interface pair, and multiple API interface pairs constitute an intent realization seed library.
[0032] S22. Supplement the context and placeholder of the remote patrol system information to each API interface in the intent implementation seed library to generate a placeholder intent expression; S23. Input the placeholder intent expression into a general large language model for expansion to form a placeholder intent expression data set. Specifically, the placeholder intent expression is a piece of text, which indicates that the API interface needs to be called to perform an operation on the placeholder. The placeholder intent expression is input into the general large language model LLM to perform the intent expression generation task, and a placeholder intent expression data set consisting of multiple placeholder intent expressions is obtained. The general large language model here can select a commercial or open source large language model, such as ChatGPT, ChatGLM, Wenxin Yiyan, Llama 2, etc.
[0033] For example, use the ChatGPT 3.5-Turbo model to perform the intent expression generation task. The following lists a possible input and output, where the input is a placeholder intent expression and the output is multiple expanded placeholder intent expressions, which are used to form a placeholder intent expression dataset. For example:
[0034] Enter the general large language model LLM:
[0035] "The substation remote inspection system developed based on Springboot has the following interfaces (the specific implementation part is hidden)
[0036] ###
[0037] @ApiOperation(value = "Turn the device-related camera to the corresponding preset point. These video preset points are usually facing a certain component of the device")
[0038] @PostMapping(" / cameraFoucsDevice")
[0039] public WrappedResult <boolean>cameraFoucsDevice(
[0040] @ApiParam(value = "Name of substation equipment", name = "deviceName",required = true) @RequestParam("deviceName") String deviceName,
[0041] @ApiParam(value = "device component name", name = "partName",required = false) @RequestParam("partName") String partName
[0042] ){}
[0043] ###
[0044] You are a professional Chinese linguist. Please help me list the expressions you know. The intentions expressed by these sentences can be realized by calling the corresponding interfaces.
[0045] The sentences need to meet the following requirements:
[0046] 1. According to the definition of the function, the sentence needs to combine the function parameters. In the sentence you generate, strictly use the parameter name as the placeholder of the entity, such as {deviceName}
[0047] 2. Pay attention to optional parameters. If a parameter is optional, the sentence can exclude the parameter. If the parameter is excluded, there cannot be other entities referring to the parameter in the sentence. The sentence must be grammatically correct.
[0048] 3. The sentence should be expressed as the user role of the system and should conform to the human expression, such as: I need to see the monitoring video of the transformer
[0049] 4. Try to list different expressions of the same intent as much as possible, cover all parameters of the interface, and ensure that the sentences are not repeated
[0050] The return format for each sentence is:
[0051] Intent: sentence Action: name of the interface to be called Params: parameter list".
[0052] Accordingly, the general large language model LLM returns:
[0053] "Intent: I want to move the camera corresponding to the {deviceName} device to the preset position Action:cameraFoucsDevice Params: deviceName
[0054] Intent: Can you help me focus my camera on {deviceName}? Action: cameraFoucsDevice Params: deviceName
[0055] Intent: I need to focus the camera on {deviceName} device Action:cameraFoucsDevice Params: deviceName
[0056] Intent: Focus the camera on {deviceName} deviceAction: cameraFoucsDeviceParams: deviceName
[0057] Intent: Focus the camera on the part of the {deviceName} deviceAction: cameraFoucsDeviceParams: deviceName, partName
[0058] Intent: Can you help me turn the camera to focus on {partName} of {deviceName}? Action: cameraFoucsDevice Params: deviceName, partName
[0059] Intent: Can you adjust the camera to the {partName} component, which belongs to the {deviceName} device? Action: cameraFoucsDevice Params: deviceName, partName
[0060] Intent: I need to adjust the focus of the camera to the {partName} component of the {deviceName} device Action: cameraFoucsDevice Params: deviceName, partName".
[0061] S24, manually review the placeholder intention expression data set to filter out incorrect placeholder intention expressions. Specifically, the placeholder intention expression data set generated by the general large language model may contain inappropriate expressions, which staff will not use. Therefore, it is necessary to manually filter out incorrect placeholder intention expressions.
[0062] S25. Replace the placeholders in the placeholder intent expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain the intent expression data set. For example, replace the component "oil pillow" of the device "main transformer" with the placeholder in the placeholder intent expression "zoom in on the {partName} part of {deviceName}, I need to see it clearly" to generate: "zoom in on the oil pillow part of the main transformer, I need to see it clearly", and add it to the intent expression data set.
[0063] Specifically, the API Schema of the API interface in step S21 is obtained using the Swagger document, and the placeholder intent expression dataset generated in step S23 is mixed with the API Schema through a Python script to obtain an intent expression dataset that can be used for intent training and verification of a large language model (for example, the ChatGLM3-6B model). The following is an expression of the intent expression dataset:
[0064] "{
[0065] "tools": [
[0066] "cameraFoucsDevice: Move the device-related camera to the corresponding preset point. These video preset points are generally facing a certain component of the device\nParameters: {\"deviceName\": \"Required. string. The name of the substation equipment\", \"partName\": \"Optional. string. The name of the device component.\"}\nOutput: boolean[True,False]\n"
[0067] ],
[0068] "conversations": [
[0069] {
[0070] "role": "user",
[0071] "content": "I want to move the camera corresponding to the main transformer device to the preset point"
[0072] },
[0073] {
[0074] "role": "assistant",
[0075] "content": "I need to use cameraFoucsDevice to turn the camera to the main transformer area."
[0076] },
[0077] {
[0078] "role": "tool",
[0079] "name": "cameraFoucsDevice",
[0080] "parameters": {
[0081] "deviceName": "Main Transformer"
[0082] },
[0083] "observation": "True"
[0084] },
[0085] {
[0086] "role": "assistant",
[0087] "content": "The operation returns True, the camera has been successfully transferred to the main transformer"
[0088] } ]
[0090] }".
[0091] S26. Train the large language model based on the intention expression data set to obtain a remote patrol expert model. Specifically, the remote patrol expert model can identify the remote patrol system API interface and interface parameters that should be called based on the text data, and pass it in the form of Python function execution source code to generate a service call request. For example:
[0092] Input the remote patrol expert model: "I want to move the camera corresponding to the main transformer equipment to the preset point."
[0093] Remote patrol expert model output: "dispath_request("cameraFoucsDevice","main transformer")".
[0094] Step S3 parses the interface parameters in the intent data and enhances the interface parameters to obtain enhanced intent data. The purpose of parsing and enhancing the interface parameters in the intent data is to ensure that the interface parameters of the API interface call are accurate and to improve the robustness of the interface call. For example, the data authority of the remote patrol system staff is a certain substation. After parsing by the remote patrol expert model, the interface parameters displayed in the intent data are "No. 1 main transformer" or "main transformer", but there is only one transformer named "No. 1 main transformer" in the substation. After enhancing the interface parameters, it will return to "No. 1 main transformer".
[0095] Among them, the enhanced intent data is obtained in the following manner: synchronizing the relational data and entity data in the remote patrol system to generate a document database, vectorizing the entity data in the remote patrol system through a word embedding model to generate a vector database; searching the interface parameters in the document database and the vector database respectively, and performing an intersection operation on the search results to obtain enhanced interface parameters; combining the enhanced interface parameters and the API interface of the service to be called into enhanced intent data.
[0096] Specifically, the relational data and entity data (inspection points, power equipment, personnel information, etc.) in the remote inspection system are synchronized to the document database, and when synchronizing data, the entity data is vectorized and expressed through the word embedding model (Embeding Model) and stored in the vector database. Milvus can be used as the vector database, Elasticsearch as the document database, and bge-large-zh as the word embedding model. For an interface parameter, on the one hand, the interface parameter is searched by keywords in the document database (Elasticsearch), specifically, the _search interface (provided by Elasticsearch) is used for fuzzy query to obtain a list of entities similar to the interface parameter. On the other hand, the interface parameter is vectorized through the Embeding model, and the list of entities with semantics similar to the interface parameter is queried in the vector database (Milvus). Specifically, the Euclidean distance indicator is used in the vector database to query the nearest entity list. Perform "intersection operation" on the two entity lists mentioned above: Specifically, in order to be compatible with Chinese homophones, first merge the two lists and convert the Chinese in the list into pinyin. The pypinyin library can be used to perform this operation. Finally, convert the input interface parameter into pinyin, and then perform edit distance similarity calculation between it and the pinyin in the list. The search result with the highest similarity is obtained from the list as the final output. Figure 3 As shown, Figure 3 Flowchart diagram enhanced for interface parameter retrieval.
[0097] Step S4 generates a service call request according to the enhanced intention data, and calls the remote patrol system to execute the service through the service call request to obtain the service result. Specifically, the enhanced intention data in the form of Python function source code transmitted by the remote patrol expert model is executed, and an HTTP request for calling the remote patrol system API interface is initiated. The remote patrol system calls the service corresponding to the API interface according to the interface parameters and returns the service result.
[0098] Step S5: input the service result into the remote inspection expert model to generate reply text data. Specifically, the returned service result is generated into reply text data expressed in natural language by the remote inspection expert model.
[0099] Step S6 converts the reply text data into reply voice data for output. Specifically, the reply text data is passed to a speech generation model (PaddleSpeech, OpenTTS, eSpeak model, etc.) to be converted into reply voice, and then output through the audio speaker of the remote patrol system.
[0100] In a possible implementation, step S6 further includes: acquiring an alarm text of the remote patrol system, converting the alarm text into a reply voice, and outputting the reply voice through an audio speaker of the remote patrol system.
[0101] It can be understood that the remote patrol system control method based on sound and language models provided in this solution, on the one hand, calls the API interface service of the remote patrol system through voice dialogue, such as calling cameras, drones, and robots to perform patrol tasks, obtains service results, and simplifies the operation process; on the other hand, during and after the patrol, patrol alarms, patrol results, etc. are converted into voice broadcasts to promptly notify on-site staff.
[0102] See also Figure 4 As shown, Figure 4 The present invention is a structural diagram of a remote patrol system control system based on sound and language models. The system is used to implement the remote patrol system control method based on sound and language models as described above. The system includes: a speech recognition module, which is used to obtain speech data and convert the speech data into text data according to a fine-tuned speech recognition model; a large language model module, which is used to parse intention data from the text data according to a remote patrol expert model, wherein the intention data includes: an API interface and interface parameters of a service to be called, and the remote patrol expert model is a SOTA large language model obtained through training; a retrieval enhancement module, which is used to parse the interface parameters in the intention data and enhance the interface parameters to obtain enhanced intention data; an intention call module, which is used to generate a service call request according to the enhanced intention data, and to call the remote patrol system to execute the service through the service call request to obtain a service result; the large language model module is also used to input the service result into the remote patrol expert model to generate reply text data; and a speech generation module, which is used to convert the reply text data into reply speech data for output.
[0103] In a possible implementation, the speech recognition module is also used to obtain a speech recognition SOTA model, and fine-tune the speech recognition SOTA model according to proprietary speech text data in the power field to obtain a fine-tuned speech recognition model.
[0104] In a possible implementation, the large language model module is also used to: obtain the API interface and annotations of the remote patrol system to form an intention realization seed library; supplement the context and placeholder of the remote patrol system information for each API interface in the intention realization seed library to generate a placeholder intention expression; input the placeholder intention expression into a general large language model for expansion to form a placeholder intention expression data set; manually review the placeholder intention expression data set to screen out erroneous placeholder intention expressions; replace the placeholders in the placeholder intention expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain an intention expression data set; train the large language model based on the intention expression data set to obtain a remote patrol expert model.
[0105] In a possible implementation, the retrieval enhancement module is also used to: synchronize relational data and entity data in the remote patrol system to generate a document database, vectorize the entity data in the remote patrol system through a word embedding model to generate a vector database; retrieve the interface parameters in the document database and the vector database respectively, and perform intersection operations on the retrieval results to obtain enhanced interface parameters; and combine the enhanced interface parameters and the API interface of the service to be called into enhanced intent data.
[0106] In a possible implementation, the voice generation module is further used to obtain an alarm text of the remote patrol system and convert the alarm text into a voice output.
[0107] Compared with the prior art, first, this application collects the voice data of the staff, converts the voice data into text data through the voice recognition model, parses the intention data through the remote patrol expert model, and then calls the corresponding service of the remote patrol system through the intention data, and converts the structured service results into semantically coherent text through the remote patrol expert model, and finally outputs it through voice; the staff can control the remote patrol system to perform tasks through voice, and finally return the task results in voice form, simplifying the operation process of the remote patrol system, and facilitating timely learning of the task results. Second, this application enhances the interface parameters in the intention data, combines the document database and the vector database to retrieve the expression closest to the interface parameters, ensures precise control, avoids control errors caused by the non-standard expression of the staff, improves the fault tolerance rate, and reduces the operation requirements for the staff. Third, this application forms an intention seed library through API interfaces and annotations, generates placeholder intention expressions by supplementing the context and placeholders of the remote patrol system information, expands the training corpus through the general large language model, obtains the intention expression data set by replacing the placeholders with entities, trains the remote patrol expert model through the intention expression data set, and inputs a piece of text data to parse the API interface and interface parameters of the service to be called, thereby controlling the remote patrol system to perform tasks.
[0108] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.< / boolean>
Claims
1. A remote patrol system control method based on sound and language model, characterized in that: include: Acquiring voice data, and converting the voice data into text data according to the fine-tuned voice recognition model; Parsing intent data from the text data according to the remote patrol expert model, the intent data including: an API interface and interface parameters of a service to be called, the remote patrol expert model being a SOTA large language model obtained through training; parsing the interface parameters in the intent data, and enhancing the interface parameters to obtain enhanced intent data; Generate a service call request according to the enhanced intention data, and call the remote patrol system to execute the service through the service call request to obtain a service result; Inputting the service results into the remote patrol expert model to generate reply text data; Convert the reply text data into reply voice data for output; Among them, the remote patrol expert model is obtained in the following way: obtain the API interface and annotations of the remote patrol system to form an intention realization seed library; supplement the context and placeholder of the remote patrol system information for each API interface in the intention realization seed library to generate a placeholder intention expression; input the placeholder intention expression into a general large language model for expansion to form a placeholder intention expression data set; manually review the placeholder intention expression data set to filter out erroneous placeholder intention expressions; replace the placeholders in the placeholder intention expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain an intention expression data set; train the SOTA large language model based on the intention expression data set to obtain a remote patrol expert model; The enhanced intent data is obtained by: synchronizing the relational data and entity data in the remote patrol system to generate a document database, vectorizing the entity data in the remote patrol system through a word embedding model to generate a vector database; searching the interface parameters in the document database and the vector database respectively, and performing an intersection operation on the search results to obtain enhanced interface parameters; and combining the enhanced interface parameters and the API interface of the service to be called into the enhanced intent data; Retrieve the interface parameters in the document database and the vector database respectively, and perform intersection operation on the search results to obtain enhanced interface parameters; including: on the one hand, perform keyword search on the interface parameters in the document database to obtain a list of entities similar to the interface parameters; on the other hand, express the interface parameters in vector form through an Embeding model, and then query the vector database for a list of entities semantically similar to the interface parameters; in order to be compatible with Chinese homophones, first merge the two lists and convert the Chinese in the list into pinyin, and finally convert the input interface parameters into pinyin, and then perform edit distance similarity calculation between it and the pinyin in the list, and obtain the search result with the greatest similarity from the list as the final output.
2. A remote patrol system control method based on sound and language model according to claim 1, characterized in that: The fine-tuned speech recognition model is obtained in the following manner: a speech recognition SOTA model is acquired, and the speech recognition SOTA model is fine-tuned according to proprietary speech text data in the electric power field to obtain a fine-tuned speech recognition model.
3. The remote patrol system control method based on sound and language model according to claim 1 is characterized in that: Also includes: Acquire the alarm text of the remote patrol system, and convert the alarm text into voice output.
4. A remote patrol system control system based on sound and language model, characterized in that: A remote patrol system control method based on sound and language models for executing any one of claims 1 to 3, comprising: A speech recognition module, used to acquire speech data and convert the speech data into text data according to a fine-tuned speech recognition model; A large language model module is used to parse intent data from the text data according to a remote patrol expert model, wherein the intent data includes: an API interface and interface parameters of a service to be called, and the remote patrol expert model is a SOTA large language model obtained through training; A retrieval enhancement module is used to parse the interface parameters in the intent data and enhance the interface parameters to obtain enhanced intent data; An intention calling module, used to generate a service calling request according to the enhanced intention data, and to call the remote patrol system to execute the service through the service calling request to obtain a service result; The large language model module is also used to input the service results into the remote patrol expert model to generate reply text data; A speech generation module, used for converting the reply text data into reply speech data for output; Among them, the large language model module is also used to: obtain the API interface and annotations of the remote patrol system to form an intention realization seed library; supplement the context and placeholder of the remote patrol system information for each API interface in the intention realization seed library to generate a placeholder intention expression; input the placeholder intention expression into the general large language model for expansion to form a placeholder intention expression data set; manually review the placeholder intention expression data set to filter out erroneous placeholder intention expressions; replace the placeholders in the placeholder intention expression data set with the power equipment information, point information, and perception layer equipment information in the remote patrol system to obtain an intention expression data set; train the large language model based on the intention expression data set to obtain a remote patrol expert model; The retrieval enhancement module is further used to: synchronize relational data and entity data in the remote patrol system to generate a document database, vectorize entity data in the remote patrol system through a word embedding model to generate a vector database; retrieve the interface parameters in the document database and the vector database respectively, and perform an intersection operation on the retrieval results to obtain enhanced interface parameters; and combine the enhanced interface parameters and the API interface of the service to be called into enhanced intent data; Retrieve the interface parameters in the document database and the vector database respectively, and perform intersection operation on the search results to obtain enhanced interface parameters; including: on the one hand, perform keyword search on the interface parameters in the document database to obtain a list of entities similar to the interface parameters; on the other hand, express the interface parameters in vector form through an Embeding model, and then query the vector database for a list of entities semantically similar to the interface parameters; in order to be compatible with Chinese homophones, first merge the two lists and convert the Chinese in the list into pinyin, and finally convert the input interface parameters into pinyin, and then perform edit distance similarity calculation between it and the pinyin in the list, and obtain the search result with the greatest similarity from the list as the final output.
5. A remote patrol system control system based on sound and language model according to claim 4, characterized in that: The speech recognition module is also used to obtain a speech recognition SOTA model, and fine-tune the speech recognition SOTA model according to proprietary speech text data in the power field to obtain a fine-tuned speech recognition model.
6. A remote patrol system control system based on sound and language model according to claim 4, characterized in that: The speech generation module is also used to obtain the alarm text of the remote patrol system and convert the alarm text into speech output.
