User question response method and device, equipment, medium and program product
By building a question processing service in the building operation and maintenance management system, receiving and processing user problems, generating prompt words and calling task execution tools, the problem of cumbersome and inefficient operation and maintenance management in the existing technology is solved, and the operation and maintenance management is improved Efficiency and user experience.
Patent Information
- Application Number
- CN202411302866.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
The existing building operation and maintenance management model is cumbersome, inefficient, and has a high threshold for user use, making it difficult to quickly detect the source of mechanical and electrical equipment failures.
A question processing service is built in the building operation and maintenance management system, receiving problem data from the user terminal, determining the type of question is a knowledge question-and-answer class or task execution class, generating prompt words, calling task execution tools, and providing response data to answer user questions.
It lowers the experience threshold for users, simplifies the operation and maintenance operation process, improves the operation and maintenance management efficiency, and reduces the repeated interaction between users on multiple status monitoring pages.
Smart Images

Figure CN119271778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method, device, electronic device, storage medium and program product for responding to user questions. Background Art
[0002] A building operation and maintenance management system usually includes sensing devices, control devices, and one or more user terminals. Sensing devices, such as temperature sensors, humidity sensors, and cameras, are used to obtain the operating status data of electromechanical equipment in the sensing building. The control device can process the operating status data of the electromechanical equipment obtained by the sensing device according to the operation components called by the user terminal, and generate a status monitoring page for display on the user terminal. The user terminal can be open to users such as management personnel and operation and maintenance personnel in the building. Users can view various status monitoring pages of various electromechanical equipment through the user terminal and perform operation and maintenance management of the electromechanical equipment.
[0003] The source of the failure of electromechanical equipment with operational failure may be related to a variety of factors. For example, an elevator failure may be caused by abnormal power supply, cable damage, or wear and tear of mechanical parts. In order to troubleshoot the source of the failure of electromechanical equipment, users usually need to operate many components on the user terminal, open multiple status monitoring pages associated with the electromechanical equipment, and repeatedly perform human-computer interaction. Therefore, the existing building operation and maintenance management model is cumbersome and inefficient, and the threshold for users to use the building operation and maintenance management system is high. Summary of the invention
[0004] The present invention provides a method, device, electronic device, storage medium and program product for responding to user questions, so as to solve the problems of cumbersome operation and low efficiency of the existing building operation and maintenance management mode. By constructing a question processing service in the building operation and maintenance management system, the user's experience threshold is lowered, the operation and maintenance operation process is simplified, and the operation and maintenance management efficiency is improved.
[0005] According to one aspect of the present invention, a method for responding to a user's question is provided, the method being executed by a question processing service in a building operation and maintenance management system; the method comprising:
[0006] Receiving question data sent by a user terminal, and determining a question type according to the question data; wherein the question type is one of a knowledge question answering type and a task execution type;
[0007] If the question type is a task execution type, the task execution process is determined according to the question data, and at least one first-level prompt word is generated according to the task execution process; wherein the prompt word is used to indicate at least one execution method of the execution step in the task execution process;
[0008] According to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal.
[0009] According to another aspect of the present invention, a device for responding to user questions is provided, wherein the device is configured in a question processing service in a building operation and maintenance management system; the device comprises:
[0010] A question type determination module, used to receive question data sent by a user terminal, and determine the question type according to the question data; wherein the question type is one of a knowledge question answering type and a task execution type;
[0011] A prompt word generation module, for determining the task execution process according to the question data if the question type is a task execution type, and generating at least one first-level prompt word according to the task execution process; wherein the prompt word is used to indicate at least one execution method of an execution step in the task execution process;
[0012] The response data determination module is used to call the task execution tool according to the prompt words at each level, determine the response data, and feed it back to the user terminal.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and a memory in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for responding to user questions described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for responding to a user's question as described in any embodiment of the present invention when executed.
[0016] The technical solution of the embodiment of the present invention receives question data sent by a user terminal, and determines the question type according to the question data; wherein the question type is one of a knowledge question and answer type and a task execution type; if the question type is a task execution type, the task execution process is determined according to the question data, and at least one level of prompt words is generated according to the task execution process; wherein the prompt words are used to indicate at least one execution method of the execution steps in the task execution process; according to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal. This technical solution solves the problem of cumbersome operation and low efficiency of the existing building operation and maintenance management mode, and by constructing a question processing service in the building operation and maintenance management system, it reduces the user's experience threshold, simplifies the operation and maintenance operation process, and improves the efficiency of operation and maintenance management.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a flowchart of a method for responding to a user's question provided in Embodiment 1 of the present invention;
[0020] Figure 2 is a flow chart of a method for responding to a user's question provided in accordance with Embodiment 2 of the present invention;
[0021] Figure 3 is a schematic diagram of the structure of a device for responding to user questions provided in Embodiment 3 of the present invention;
[0022] Figure 4 The present invention is a schematic diagram of the structure of an electronic device for implementing the method for responding to a user's question according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0025] Embodiment 1
[0026] Figure 1 A flowchart of a method for responding to user questions is provided for the first embodiment of the present invention. This embodiment can be applied to responding to user questions in a building operation and maintenance scenario. The method can be executed by a device for responding to user questions, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0027] S110, receiving question data sent by a user terminal, and determining a question type according to the question data; wherein the question type is one of a knowledge question and answer type and a task execution type.
[0028] This solution can be executed by the question processing service in the building operation and maintenance management system. The building operation and maintenance management system may include a question processing service, which may include a sensing device, a control device, a question processing service, and at least one user terminal. Among them, the sensing device, such as a temperature sensor, a humidity sensor, and a camera, can be used to periodically obtain the operating status data of the electromechanical equipment in the sensing building. The control device can process the operating status data of the electromechanical equipment obtained by the sensing device to generate a status monitoring page. The user terminal can be open to users such as management personnel and operation and maintenance personnel in the building to obtain question data entered by the user, such as "How to check the operating status of the air-conditioning system?", "Please show the analysis results of the energy consumption data of Building A this month", etc. The question data can be the search text entered by the user in the search box of the user terminal, or it can be a voice command issued by the user. The user terminal can send the question data to the question processing service.
[0029] In a preferred solution, the question data may also be a target question selected by the user from the frequently asked questions displayed on the user terminal page. It is understandable that the question processing service may perform statistical analysis on the historical question and answer data in advance and calculate the question frequency of each question in the historical question and answer data. The question processing service may filter out a preset number of question and answer data with a high question frequency from the historical question and answer data to form a common question and answer data set, and display the common questions in a specific area of the user terminal page. Based on the target question selected by the user from the frequently asked questions, the question processing service may directly extract the answer data from the common question and answer data set and feed it back to the user terminal to achieve quick answers to the user's questions.
[0030] The question processing service may be a natural language processing entity built based on a large language model (LLM). After receiving the question data sent by the user terminal, the question processing service may perform text recognition on the question data to determine the question type. Among them, the question type may include two types: knowledge question and answer type and task execution type. The question processing service may match the question data with the corpus set corresponding to each question type, and determine the question type to which the question data belongs according to the matching result. For example, the corpus set of the knowledge question and answer type may include corpus elements such as "how", "how" and "answer", and the corpus set of the task execution type may include corpus elements such as "analyze...", "calculate..." and "view..." trends. The question processing service may compare the question data with the corpus elements in the corpus set corresponding to each question type, and calculate the matching degree between the question data and each corpus element, for example, the similarity between the question data and each corpus element. According to the matching degree between the question data and each corpus element, the question processing service may determine the question type to which the question data belongs.
[0031] S120. If the question type is a task execution type, determine the task execution process according to the question data, and generate at least one level of prompt words according to the task execution process; wherein the prompt words are used to indicate at least one execution method of the execution steps in the task execution process.
[0032] If the question type of the question data is a task execution type, the question processing service can identify keywords from the question data based on the language recognition model, and then formulate a task execution process based on the keywords. The task execution process may include multiple execution steps, and there is execution logic between each execution step. The question processing service can generate prompt words that match each execution step. The prompt words can be used to indicate one or more execution methods of the execution step. The question processing service can define the execution level according to the execution logic of each execution step, and then generate at least one level of prompt words based on the results of the execution level definition.
[0033] S130: According to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal.
[0034] It can be understood that the prompt word is used to indicate at least one execution method of the execution step in the task execution process. The execution method may include information such as task execution tools, input data, and execution conditions. According to the prompt words at each level, the question processing service can call the task execution tool that matches the execution step according to the execution logic of the execution step to obtain the execution results corresponding to the prompt words at each level. The execution results corresponding to each level of prompt words can be one or more. The task execution tool is an available task execution tool in the available tool list of the building operation and maintenance management system.
[0035] After obtaining the execution results of the prompt words at each level, the question processing service can determine whether the execution steps at each level are executed normally according to the execution results corresponding to the prompt words at each level. If the execution steps at each level are executed normally, the question processing service can generate response data matching the question data according to the output result of the last level execution step, and send the response data to the user terminal to answer the user's question.
[0036] The technical solution of the embodiment of the present invention receives question data sent by a user terminal, and determines the question type according to the question data; wherein the question type is one of a knowledge question and answer type and a task execution type; if the question type is a task execution type, the task execution process is determined according to the question data, and at least one level of prompt words is generated according to the task execution process; wherein the prompt words are used to indicate at least one execution method of the execution steps in the task execution process; according to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal. This technical solution solves the problem of cumbersome operation and low efficiency of the existing building operation and maintenance management mode, and by constructing a question processing service in the building operation and maintenance management system, it reduces the user's experience threshold, simplifies the operation and maintenance operation process, and improves the efficiency of operation and maintenance management.
[0037] Embodiment 2
[0038] Figure 2 This is a flow chart of a method for responding to a user's question provided in Embodiment 2 of the present invention. This embodiment refines the above embodiment. Figure 2 As shown, the method includes:
[0039] S210, receiving question data sent by a user terminal, and determining a question type according to the question data; wherein the question type is one of a knowledge question and answer type and a task execution type.
[0040] In a feasible solution, determining the problem type according to the problem data includes:
[0041] Based on a pre-trained language processing model, the question type of the question data is determined.
[0042] In this solution, the question processing service can convert question data into question vectors according to preset text conversion rules, and input the question vectors into a pre-trained language processing model to extract the language features of the question vectors, and then determine the question type based on the language features.
[0043] The language processing model can be a question classification model based on deep learning, which can classify language features extracted from language data. The language processing model can be trained based on labeled question samples, and the labels of the question samples can be used to indicate the types of the question samples, which can include knowledge question answering and task execution.
[0044] S220: Determine whether the problem type is a task execution type.
[0045] If the question type is a task execution type, then S230 - S250 are executed. If the question type is not a task execution type, then it is a knowledge question and answer type, then S260 is executed.
[0046] S230, determining a task execution process according to the problem data, and generating at least one level of prompt words according to the task execution process; wherein the prompt words are used to indicate at least one execution method of an execution step in the task execution process.
[0047] In a feasible solution, determining the task execution process according to the problem data, and generating at least one first-level prompt word according to the task execution process, includes:
[0048] Performing word segmentation on the question data, removing meaningless words in the word segmentation results, and obtaining the target corpus;
[0049] A task execution process is determined according to the target corpus, and at least one first-level prompt word is determined according to the execution logic of each execution step in the task execution process.
[0050] The question processing service can perform word segmentation on the question data, remove nonsense words in the word segmentation results, and obtain the target corpus. The nonsense words refer to words that have no meaning for the setting of the task execution process, such as greetings such as "hello" and "please", pause words such as "uh" and "hmm", and words without actual meaning such as "de" and "le". Specifically, the question processing service can compare each word in the word segmentation result with the nonsense word elements in the pre-acquired nonsense word set to determine the nonsense words in the word segmentation result. The nonsense word set may include multiple nonsense word elements, and the nonsense word elements in the nonsense word set may be obtained by the question processing service through statistical analysis based on a large number of natural language samples.
[0051] It is easy to understand that the target corpus may include one or more keywords for setting the task execution process. The question processing service may determine the task execution process based on the target corpus and determine the execution logic of each execution step in the task execution process. According to the execution logic of each execution step in the task execution process, the question processing service may determine at least one first-level prompt word.
[0052] In a specific example, the question data may be "Please show the analysis results of the energy consumption data of Building A this month". Based on the question data, the question processing service can extract four keywords, namely "Building A", "this month", "energy consumption data" and "analysis results". Based on the above keywords, the question processing service can obtain the following task execution process according to the preset task execution process setting principles:
[0053] Step 1: Find the energy consumption data set of building A;
[0054] Step 2: Extract the energy consumption data from the start date to the end date of this month from the energy consumption data set;
[0055] Step 3: Find the maximum energy consumption day and the minimum energy consumption day from the energy consumption data of building A this month;
[0056] Step 4: Calculate the average daily energy consumption of building A this month;
[0057] Step 5: Draw the energy consumption trend of building A on a single day this month;
[0058] Step 6: Combine the maximum energy consumption day, minimum energy consumption day, daily average energy consumption and energy consumption change trend into a display page.
[0059] The above task execution process includes 6 execution steps, and the execution logic of each execution step may include: step 1-step 2 are executed sequentially, after step 2 is executed, step 3, step 4 and step 5 can be executed synchronously, and step 6 is executed after step 3, step 4 and step 5 are all executed.
[0060] The prompt words of step 1 may include: "query function X", "building A"; the prompt words of step 2 may include: "query function Y", "query function X output", "start date of this month", "end date of this month"; the prompt words of step 3 may include: "sorting function", "query function Y output", "maximum", "minimum"; the prompt words of step 4 may include: "averaging function", "query function Y output"; the prompt words of step 5 may include: "curve drawing function", "query function Y output"; the prompt words of step 6 may include: "picture combination function", "sorting function output", "averaging function output", "curve drawing function output".
[0061] According to the execution logic of each execution step, the question processing service can be divided into four execution levels: level 1 (execute step 1), level 2 (execute step 2), level 3 (execute steps 3, 4 and 5), and level 4 (execute step 6). According to the results of the execution level demarcation, the question processing service can generate four levels of prompt words, and the prompt words of level 1, level 2, level 3 and level 4 are respectively: the prompt word of step 1, the prompt word of step 2, the prompt word of step 3 + the prompt word of step 4 + the prompt word of step 5, and the prompt word of step 6.
[0062] S240: According to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal.
[0063] Based on the above scheme, the task execution tool is called according to the prompt words at each level to determine the response data, including:
[0064] Determine the task execution tools that match the prompt words at each level;
[0065] According to the execution logic of each execution step in the task execution process, the task execution tools matching the prompt words at each level are called to determine the response data.
[0066] The task execution tool may be a software tool required for the execution step, such as a drawing tool, a data acquisition interface, and a functional function. Each level of prompt words may include one or more groups of prompt words, each group of prompt words may correspond to an execution step and also corresponds to a task execution tool, and each group of prompt words may include an identifier of the task execution tool. According to the task execution tool identifier in each level of prompt words, the question processing service may determine the task execution tool that matches the prompt words at each level. According to the execution logic of each execution step in the task execution process, the task execution tool that matches the prompt words at each level is called, and the question processing service may determine the execution result of each execution step, and then obtain the response data of the question data.
[0067] In a feasible solution, according to the execution logic of each execution step in the task execution process, calling the task execution tools matching the prompt words at each level to determine the response data includes:
[0068] According to the execution logic of each execution step in the task execution process, determine the current execution step and determine the target prompt word; wherein the target prompt word is the prompt word matched by the current execution step;
[0069] Calling the task execution tool matching the target prompt word to determine the execution result of the current execution step;
[0070] If it is determined that the task execution process is completed according to the execution result of the current execution step, then the response data is determined according to the execution result of the current execution step;
[0071] If it is determined based on the execution result of the current execution step that the task execution process is not completed, the current execution step is used as the previous execution step, and the execution is returned to the execution logic of each execution step in the task execution process to determine the current execution step until the task execution process is completed.
[0072] The question processing service can determine the current execution step according to the execution logic of each execution step in the task execution process, and determine the prompt word corresponding to the current execution step in the prompt words of the execution level to which the current execution step belongs, that is, the target prompt word. By calling the task execution tool corresponding to the target prompt word, the question processing service can obtain the execution result of the current execution step, and then judge whether the task execution process is completed according to the execution result of the current execution step. If it is completed, the response data is generated according to the execution result of the current execution step. If it is not completed, according to the execution logic of each execution step in the task execution process, the current execution step is used as the previous execution step, and the next execution step of the current execution step is updated to the current execution step, and the target prompt word of the current execution step is determined. The task execution tool corresponding to the target prompt word is called to determine the execution result of the current execution step, until the task execution process is determined to be completed according to the execution result of the current execution step.
[0073] For example, the current execution step is step 1. According to the prompt word of step 1, the question processing service can call query function X to search for the energy consumption data of building A. If step 1 is executed successfully, the energy consumption data of building A is output. The question processing service can judge whether the task execution process is completed based on the execution result of step 1. The energy consumption data of building A is not the analysis result of the energy consumption data of building A this month, that is, the task execution process is not completed. The question processing service can update step 1 to the previous execution step and update the next step of step 1, that is, step 2, to the current execution step. According to the prompt word of step 2, the question processing service can call query function Y to query the energy consumption data of this month in the energy consumption data of building A, and output the energy consumption data of building A this month. According to the execution result of step 2, it is judged that the task execution process is not completed, and step 2 is updated to the previous execution step, and the next step of step 2, that is, step 3-step 5, is updated to the current execution step. The question processing service can call the sorting function to sort the energy consumption data of building A output by the query function Y this month according to the prompt word of step 3, and call the averaging function to obtain the average of the energy consumption data of building A this month according to the prompt word of step 4, and call the curve drawing function to draw the energy consumption curve of building A this month according to the prompt word of step 5, and obtain the execution results of steps 3, 4 and 5 respectively. According to the execution results of steps 3-5, it is judged that the task execution process is not completed. The question processing service can update steps 3-5 as the previous execution step and step 6 as the current execution step. According to the prompt word of step 6, the screen combination function is called to combine the execution results of steps 3, 4 and 5 into a display screen. According to the execution result of step 6, it is judged that the task execution process is completed, and the execution result of step 6 is fed back to the user terminal as response data.
[0074] In a preferred solution, the prompt word includes the task execution tool identifier and input description information of the task execution tool;
[0075] The task execution tool for determining the matching of prompt words at various levels includes:
[0076] According to the task execution tool identifiers in the prompt words at each level, the task execution tools matching the prompt words at each level are determined;
[0077] The calling of the task execution tool matching the target prompt word to determine the execution result of the current execution step includes:
[0078] According to the input description information of the task execution tool in the target prompt word, the input data of the task execution tool matching the target prompt word is obtained;
[0079] According to the input data of the task execution tool matching the target prompt word, the task execution tool matching the target prompt word is called to determine the execution result of the current execution step.
[0080] If the task execution tool needs input data to be successfully called, the prompt word may include input description information of the task execution tool in addition to the task execution tool identifier. Among them, the input description information of the task execution tool may include information such as the input data of the task execution tool, the data type of the input data, and the data dimension of the input data. The input data of the task execution tool can be one or more. For example, in the prompt word of step 1, the task execution tool identifier is "query function X", and "building A" is the input data of query function X. The prompt word of step 1 indicates that query function X needs to query the energy consumption data of building A. For another example, in the prompt word of step 6, the task execution tool identifier is "picture combination function", and the input description information of the task execution tool is "sorting function output", "averaging function output" and "curve drawing function output". The output data of the sorting function in step 3, the output data of the averaging function in step 4, and the output data of the curve drawing function in step 5 can be used as the input data of the picture combination function.
[0081] If the question processing service has requirements for the output data of the task execution tool, the prompt words may include the output description information of the task execution tool in addition to the task execution tool identifier and the input description information of the task execution tool. The output description information of the task execution tool may be a restriction condition on the output data of the task execution tool. For example, the prompt words of step 3 include: "sorting function", "maximum", "minimum", where the task execution tool identifier is "sorting function", the input description information of the task execution tool is "query function Y output", i.e., the output data of query function Y in step 2, and the output description information of the task execution tool is "maximum" and "minimum", i.e., only the maximum and minimum values are output from the sorting result output by the sorting function.
[0082] S250: Determine answer data matching the question data from a knowledge database in the question processing service, and feed back the answer data to the user terminal.
[0083] If the question type is a knowledge question and answer type, the question processing service can match the question data with each piece of knowledge data in the knowledge database, determine the answer data that matches the question data, and feed back the answer data to the user terminal to answer the user's question.
[0084] In this solution, the knowledge database includes multiple pieces of knowledge data; the knowledge database may be a database pre-established by the question processing service based on knowledge in the field of building operation and maintenance.
[0085] The step of determining answer data matching the question data from a knowledge database in the question processing service includes:
[0086] Determine the similarity between each piece of knowledge data in the knowledge database and the problem data in turn;
[0087] According to the similarity between each piece of knowledge data and the question data, answer data matching the question data is determined.
[0088] It is easy to understand that the knowledge database includes multiple knowledge data, each of which can be a piece of knowledge content, such as "the operating status of the air-conditioning system can be measured through pressure testing, temperature sensation, sound monitoring, visual inspection and other professional tools", or it can be a question and answer, for example: "Q: What are the ways to judge the operating status of the air-conditioning system? A: The operating status of the air-conditioning system can be measured through pressure testing, temperature sensation, sound monitoring, visual inspection and other professional tools".
[0089] The knowledge data can be stored in the knowledge database in the form of vectors. The question processing service can convert the question data according to the representation form of the knowledge data to obtain the question vector. The similarity between the question vector and each piece of knowledge data in the knowledge database is calculated in sequence, and the knowledge data with the greatest similarity is taken as the answer data matching the question data.
[0090] The technical solution of the embodiment of the present invention receives question data sent by a user terminal, and determines the question type according to the question data; wherein the question type is one of a knowledge question and answer type and a task execution type; if the question type is a task execution type, the task execution process is determined according to the question data, and at least one level of prompt words is generated according to the task execution process; wherein the prompt words are used to indicate at least one execution method of the execution steps in the task execution process; according to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal. This technical solution solves the problem of cumbersome operation and low efficiency of the existing building operation and maintenance management mode, and by constructing a question processing service in the building operation and maintenance management system, it reduces the user's experience threshold, simplifies the operation and maintenance operation process, and improves the efficiency of operation and maintenance management.
[0091] Embodiment 3
[0092] Figure 3 This is a schematic diagram of the structure of a device for responding to user questions provided in the third embodiment of the present invention. The device is configured in the question processing service in the building operation and maintenance management system. Figure 3 As shown, the device comprises:
[0093] The question type determination module 310 is used to receive question data sent by the user terminal and determine the question type according to the question data; wherein the question type is one of a knowledge question answering type and a task execution type;
[0094] The prompt word generating module 320 is used to determine the task execution process according to the question data if the question type is a task execution type, and generate at least one first-level prompt word according to the task execution process; wherein the prompt word is used to indicate at least one execution method of the execution step in the task execution process;
[0095] The response data determination module 330 is used to call the task execution tool according to the prompt words at each level, determine the response data, and feed it back to the user terminal.
[0096] In this solution, the device also includes:
[0097] The answer data determination module is used to determine the answer data matching the question data from the knowledge database in the question processing service after determining the question type, if the question type is a knowledge question and answer type, and feed back the answer data to the user terminal.
[0098] In a feasible solution, the question type determination module 310 is specifically used to:
[0099] Based on a pre-trained language processing model, the question type of the question data is determined.
[0100] In a feasible solution, the prompt word generation module 320 is specifically used to:
[0101] Performing word segmentation on the question data, removing meaningless words in the word segmentation results, and obtaining the target corpus;
[0102] A task execution process is determined according to the target corpus, and at least one first-level prompt word is determined according to the execution logic of each execution step in the task execution process.
[0103] Based on the above solution, the response data determination module 330 includes:
[0104] An execution tool determination unit, used to determine the task execution tools that match the prompt words at each level;
[0105] The response data determination unit is used to call the task execution tools matched with the prompt words at each level according to the execution logic of each execution step in the task execution process to determine the response data.
[0106] Based on the above solution, the response data determination unit is specifically used to:
[0107] According to the execution logic of each execution step in the task execution process, determine the current execution step and determine the target prompt word; wherein the target prompt word is the prompt word matched by the current execution step;
[0108] Calling the task execution tool matching the target prompt word to determine the execution result of the current execution step;
[0109] If it is determined that the task execution process is completed according to the execution result of the current execution step, then the response data is determined according to the execution result of the current execution step;
[0110] If it is determined based on the execution result of the current execution step that the task execution process is not completed, the current execution step is used as the previous execution step, and the execution is returned to the execution logic of each execution step in the task execution process to determine the current execution step until the task execution process is completed.
[0111] In a feasible solution, the prompt word includes the task execution tool identifier and input description information of the task execution tool;
[0112] The execution tool determination unit is specifically used to:
[0113] According to the task execution tool identifiers in the prompt words at each level, the task execution tools matching the prompt words at each level are determined;
[0114] The response data determination unit is specifically used to:
[0115] According to the input description information of the task execution tool in the target prompt word, the input data of the task execution tool matching the target prompt word is obtained;
[0116] According to the input data of the task execution tool matching the target prompt word, the task execution tool matching the target prompt word is called to determine the execution result of the current execution step.
[0117] The device for responding to user questions provided in the embodiment of the present invention can execute the method for responding to user questions provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0118] Embodiment 4
[0119] Figure 4 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0120] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0121] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0122] Processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. Processor 411 executes the various methods and processes described above, such as a method for responding to user questions.
[0123] In some embodiments, the method for responding to user questions may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the method for responding to user questions described above may be performed. Alternatively, in other embodiments, the processor 411 may be configured to execute the method for responding to user questions in any other appropriate manner (e.g., by means of firmware).
[0124] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable user-question-response device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0126] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0128] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0129] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0130] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0131] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for responding to user questions, characterized in that: The method is performed by a question processing service in a building operation and maintenance management system; the method comprises: Receiving question data sent by a user terminal, and determining a question type according to the question data; wherein the question type is one of a knowledge question answering type and a task execution type; If the question type is a task execution type, the task execution process is determined according to the question data, and at least one first-level prompt word is generated according to the task execution process; wherein the prompt word is used to indicate at least one execution method of the execution step in the task execution process; According to the prompt words at each level, the task execution tool is called to determine the response data to be fed back to the user terminal.
2. The method according to claim 1, characterized in that: After determining the type of problem, the method further includes: If the question type is a knowledge question and answer type, answer data matching the question data is determined from a knowledge database in a question processing service, and the answer data is fed back to the user terminal.
3. The method according to claim 1, characterized in that Determining the problem type according to the problem data includes: Based on a pre-trained language processing model, the question type of the question data is determined.
4. The method according to claim 1, characterized in that: Determining the task execution process according to the problem data, and generating at least one first-level prompt word according to the task execution process, includes: Performing word segmentation on the question data, removing meaningless words in the word segmentation results, and obtaining the target corpus; A task execution process is determined according to the target corpus, and at least one first-level prompt word is determined according to the execution logic of each execution step in the task execution process.
5. The method according to claim 4, characterized in that The calling of the task execution tool according to the prompt words at each level and determining the response data include: Determine the task execution tools that match the prompt words at each level; According to the execution logic of each execution step in the task execution process, the task execution tools matching the prompt words at each level are called to determine the response data.
6. The method according to claim 5, characterized in that According to the execution logic of each execution step in the task execution process, calling the task execution tools matching the prompt words at each level to determine the response data includes: According to the execution logic of each execution step in the task execution process, determine the current execution step and determine the target prompt word; wherein the target prompt word is the prompt word matched by the current execution step; Calling the task execution tool matching the target prompt word to determine the execution result of the current execution step; If it is determined that the task execution process is completed according to the execution result of the current execution step, then the response data is determined according to the execution result of the current execution step; If it is determined based on the execution result of the current execution step that the task execution process is not completed, the current execution step is used as the previous execution step, and the execution is returned to the execution logic of each execution step in the task execution process to determine the current execution step until the task execution process is completed.
7. The method according to claim 6, characterized in that The prompt word includes the task execution tool identifier and input description information of the task execution tool; The task execution tool for determining the matching of prompt words at various levels includes: According to the task execution tool identifiers in the prompt words at each level, the task execution tools matching the prompt words at each level are determined; The calling of the task execution tool matching the target prompt word to determine the execution result of the current execution step includes: According to the input description information of the task execution tool in the target prompt word, the input data of the task execution tool matching the target prompt word is obtained; According to the input data of the task execution tool matching the target prompt word, the task execution tool matching the target prompt word is called to determine the execution result of the current execution step.
8. A device for responding to user questions, characterized in that: The device is configured for a question processing service in a building operation and maintenance management system; the device comprises: A question type determination module, used to receive question data sent by a user terminal, and determine the question type according to the question data; wherein the question type is one of a knowledge question answering type and a task execution type; A prompt word generation module, for determining the task execution process according to the question data if the question type is a task execution type, and generating at least one first-level prompt word according to the task execution process; wherein the prompt word is used to indicate at least one execution method of an execution step in the task execution process; The response data determination module is used to call the task execution tool according to the prompt words at each level, determine the response data, and feed it back to the user terminal.
9. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for responding to a user's question as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for responding to a user's question according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Operation and maintenance question-answering system and method based on large language model workflow
CN119441410A
Task execution method, device and system, electronic device and storage medium
CN120723411A