A method, device and storage medium for generating a reply

By using a decision tree in an on-board scenario to determine whether the user request is supported and generate corresponding replies, the problem of inaccurate reply in the prior art is solved, efficient and accurate reply is achieved, and driving safety is improved.

CN118194998BActive Publication Date: 2025-02-18CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410262059.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-07
Publication Date
2025-02-18
Estimated Expiration
2044-03-07

AI Technical Summary

Technical Problem

The existing natural language generation technology based on templates and rules cannot accurately respond to users’ wrong requests in vehicle-mounted scenarios, resulting in insufficient real-time and accuracy, affecting driving safety.

Method used

A decision tree is used to determine whether the user request is supported, and corresponding replies are generated based on the decision result, including supported and unsupported information, and to provide corrections to unsupported feature information when not supported.

Benefits of technology

While meeting the real-time requirements in vehicle-mounted scenarios, the problem of inaccurate responses in the prior art is improved, accurate replies are provided, user distraction is reduced, and driving safety is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118194998B_ABST
    Figure CN118194998B_ABST
Patent Text Reader

Abstract

The present application relates to a reply generation method, device and storage medium. The reply generation method includes: after receiving a user's request statement, extracting feature information of the request statement; inputting the feature information into a decision tree to obtain a decision result indicating whether the request is supported; and generating a reply statement corresponding to the request statement according to the decision result. By implementing the reply generation method provided by the present application, the problem of the inability to accurately reply to the user's erroneous request existing in the existing template rule technology can be improved while meeting the real-time requirements in the vehicle-mounted scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile technology, and in particular to a response generation method, device and storage medium. Background Art

[0002] Currently, users can control devices through voice, and in order to give timely responses, the devices can use natural language generation technology based on templates and rules, or natural language generation technology based on deep learning models and large language models.

[0003] Both technologies have their own advantages, but in vehicle-mounted scenarios, there are higher real-time requirements, so template- and rule-based natural language generation technology is usually used.

[0004] However, the current natural language generation technology based on templates and rules cannot accurately respond to users' erroneous requests because the technology quickly generates responses by filling in semantic slots. For example, when a user issues a request statement such as "Turn on the air conditioner and adjust the temperature to 100 degrees", the device will reply with "OK, adjust the air conditioner temperature to 100 degrees." Summary of the invention

[0005] Based on this, the present application provides a response generation method, device and storage medium, which can improve the problem of the existing template rule technology that cannot accurately respond to the user's erroneous requests while meeting the real-time requirements in the vehicle scenario.

[0006] In a first aspect, the present application provides a reply generation method, which comprises: after receiving a user's request statement, extracting feature information of the request statement; inputting the feature information into a decision tree to obtain a decision result indicating whether the request is supported; and generating a reply statement corresponding to the request statement based on the decision result.

[0007] In combination with the first aspect, in a first possible implementation manner of the first aspect, the characteristic information of the aforementioned request statement includes at least one of a device, function, operation, and status value, and the aforementioned step of inputting the characteristic information into a decision tree to obtain a decision result indicating whether the request is supported includes: inputting the characteristic information into the decision tree so that the decision nodes in the decision tree judge whether each characteristic information is supported in sequence according to the order of device, function, operation, and status value; and outputting the decision result through the result node, wherein the decision result includes support and non-support.

[0008] In combination with the first possible implementation method of the first aspect, in the second possible implementation method of the first aspect, the step of generating a reply statement corresponding to the request statement based on the decision result includes: taking the result node in the decision tree used to output the decision result as the target node; generating a reply statement according to the reply template corresponding to the target node, wherein the reply statement includes whether the request is supported, and when not supported, the reply statement also includes unsupported feature information.

[0009] In combination with the second feasible implementation method of the first aspect, in the third feasible implementation method of the first aspect, when the decision result is not supported, the step of generating a reply statement according to the reply template corresponding to the target node includes: judging whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correcting the feature information according to an adjustable range, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy and a default step size; generating a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

[0010] In combination with the third feasible implementation method of the first aspect, in the fourth feasible implementation method of the first aspect, after the state value is corrected according to the adjustable range and before the reply statement is generated, it also includes: re-inputting the corrected feature information into the decision tree to obtain a new decision result; judging whether the new decision result is supported, and if so, verifying it and executing the step of generating a reply statement according to the reply template corresponding to the target node and the corrected feature information.

[0011] In combination with the third feasible implementation method of the first aspect, in the fifth feasible implementation method of the first aspect, after correcting the status value according to the adjustable range and before generating the reply statement, it also includes: returning the parent node of the target node, so that the decision tree starts execution from the breakpoint of the decision path; after obtaining the new decision result, judging whether the new decision result is supported; if the new decision result is supported, the verification is passed, and the step of generating a reply statement according to the reply template corresponding to the target node and the corrected feature information is executed.

[0012] In combination with the first aspect, in a sixth possible implementation of the first aspect, before executing the step of analyzing feature information using a decision tree, the method also includes: extracting devices, functions, operations, and adjustable ranges in the device protocol to establish a knowledge graph; generating a data set based on the association relationship between each node in the knowledge graph, wherein the data set includes multiple decision paths, each decision path includes a decision result and a decision rule for each feature information; and training the decision tree using the data set.

[0013] On the second aspect, the present application also provides a reply generation device, which includes: an extraction unit, used to extract feature information of a request statement after receiving a user's request statement; a decision unit, used to input the feature information into a decision tree to obtain a decision result indicating whether the request is supported; and a reply unit, used to generate a reply statement corresponding to the request statement based on the decision result.

[0014] In combination with the second aspect, in a first possible implementation of the second aspect, the characteristic information of the aforementioned request statement includes at least one item of equipment, function, operation and status value, and the aforementioned decision unit is specifically used to: input the characteristic information into a decision tree, so that the decision nodes in the decision tree judge whether each characteristic information is supported in sequence according to the order of equipment, function, operation and status value; and output the decision result through the result node, wherein the decision result includes support and non-support.

[0015] In combination with the first feasible embodiment of the second aspect, in the second feasible embodiment of the second aspect, the aforementioned reply unit is specifically used to: use the result node in the decision tree for outputting the decision result as the target node; generate a reply statement according to the reply template corresponding to the target node, wherein the reply statement includes whether the request is supported, and when it is not supported, the reply statement also includes unsupported feature information.

[0016] In combination with the second possible implementation method of the second aspect, in the third possible implementation method of the second aspect, when the decision result is not supported, the aforementioned reply unit is specifically used to: determine whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correct the feature information according to an adjustable range, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy and a default step size; generate a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

[0017] In combination with the third possible implementation method of the second aspect, in a fourth possible implementation method of the second aspect, the reply generation device also includes a correction unit, which is used to: re-input the corrected feature information into the decision tree to obtain a new decision result; determine whether the new decision result is supported, and if so, verify it and execute the step of generating a reply statement according to the reply template corresponding to the target node and the corrected feature information.

[0018] In combination with the third possible implementation method of the second aspect, in the fifth possible implementation method of the second aspect, the reply generation device also includes a verification unit, which is used to: return the parent node of the target node so that the decision tree starts execution from the breakpoint of the decision path; after obtaining a new decision result, determine whether the new decision result is supported; if the new decision result is supported, the verification is passed, and the step of generating a reply statement according to the reply template corresponding to the target node and the corrected feature information is executed.

[0019] In combination with the second aspect, in a sixth possible implementation of the second aspect, the reply generating device also includes a verification unit, which is used to: extract the device, function, operation and adjustable range in the device protocol to establish a knowledge graph; generate a data set based on the association relationship between each node in the knowledge graph, wherein the data set includes multiple decision paths, each decision path includes a decision result and a decision rule for each feature information; and train a decision tree using the data set.

[0020] In a third aspect, the present application also provides a reply generation device, which includes a processor and a memory, and the processor and the memory are connected via a bus; the processor is used to execute multiple instructions; the memory is used to store multiple instructions, and the instructions are suitable for being loaded by the processor and executed by the reply generation method such as the first aspect or any one of the embodiments of the first aspect.

[0021] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor and executed by a reply generation method such as the first aspect or any one embodiment of the first aspect.

[0022] In summary, the present application provides a reply generation method, device and storage medium, wherein, before generating a reply statement, the present application uses a decision tree to determine whether the user request is supported, and then generates a corresponding reply statement based on whether the user request is supported. Therefore, the present application can generate an accurate reply statement, and will not reply with an affirmative reply that the user request is supported when the user makes an erroneous request. Moreover, compared with most deep learning technologies, decision trees have the advantages of simple training and fast processing. Therefore, the present application can improve the problem that the existing template rule technology cannot accurately reply to the user's erroneous requests while meeting the real-time requirements in the vehicle-mounted scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic flow chart of a reply generation method in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of the structure of a decision tree in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of the structure of a knowledge graph in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the structure of a decision tree in another embodiment of the present application;

[0027] Figure 5 A schematic block diagram of a reply generating device in an embodiment of the present application;

[0028] Figure 6 It is a structural block diagram of a reply generating device in one embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] Among the current natural language generation technologies, template rule technology still has the problem of inaccurate responses. For example, after a user sends an erroneous request, the device gives a positive answer, but does not execute the user's request for a long time. At this time, the user may be distracted, so there are still certain driving safety risks. Deep learning technology requires a large amount of training data for training, so it is time-consuming and labor-intensive, and requires a long processing time in the vehicle scenario, making it difficult to meet real-time requirements. Because during driving, if the user sends a request and does not receive a reply for a long time, it will also distract the user, causing driving safety problems. Therefore, in the vehicle scenario, timely response is very necessary.

[0031] In this regard, the present application proposes a reply generation method, which is applied to scenarios that require high real-time performance and accuracy, such as in-vehicle scenarios. The method uses a decision tree to improve the problem of inaccurate replies in template rule technology. Compared with most deep learning technologies, decision trees have the advantages of simple training and fast processing speed, which can meet the real-time requirements of in-vehicle scenarios. Specifically, the reply generation method provided by the present application includes: after receiving the user's request statement, extracting feature information of the request statement; inputting the feature information into the decision tree to obtain a decision result indicating whether the request is supported; and generating a reply statement corresponding to the request statement according to the decision result.

[0032] Based on the above description, it can be seen that since the present application adopts a decision tree to determine whether the user request is supported, and then generates a reply statement based on whether the user request is supported, the present application can improve the problem of inaccurate replies in the existing template rule technology while meeting the real-time requirements of the in-vehicle scenario.

[0033] It should be noted that the reply generating device proposed in this application may be an electronic control unit (Electric Control Unit, ECU) or other vehicle-mounted device, and this application does not impose any restrictions on this. In addition, the reply generating device can exchange data with other devices and execute the reply generating method proposed in this application.

[0034] In order to better understand the answer generation method of this application, Figure 1 As shown, the present application provides an embodiment of a reply generation method. Next, the present application will use a reply generation device as an execution subject to Figure 1 The answer generation method described is explained below, specifically:

[0035] 101: After receiving a user's request statement, extract feature information of the request statement.

[0036] After receiving the user's request statement, the reply generating device can extract feature information of the request statement through natural language parsing technology, etc. Feature information is the key information of the request statement, including the device (device), function (function), operation (action) and state value (state) requested by the user. The operation includes turning on and off, increasing, setting and decreasing, and timing, etc.

[0037] For example, the response generation device uses natural language parsing technology to parse the user's request sentence "adjust the air conditioner temperature to 32 degrees", and the parsing result is as follows:

[0038] {

[0039] "name":"airConditioning",

[0040] "function":"temperature",

[0041] "action":"set",

[0042] "value":"32"

[0043] }

[0044] According to the conversion protocol of natural language parsing technology, the above parsing results are converted to extract the feature values ​​in the user's request statement, name=airConditioning is the device name (device), function=temperature is the function name (function), action=set is the operation (action), and value=32 is the state value (state).

[0045] 102: Input the feature information into the decision tree to obtain a decision result indicating whether the request is supported.

[0046] The answer generation device may input the extracted feature information into a decision tree, so that the decision tree judges each feature information in turn. If all feature information is supported, a decision result indicating that the request is supported will be obtained. If one feature information is judged to be unsupported, a decision result indicating that the request is not supported will be obtained. The decision results include support and non-support.

[0047] In a specific implementable manner, when the characteristic information includes equipment, functions, operations, and status values, the decision tree in the present application determines in turn whether the equipment, functions, operations, and status values ​​are supported. Specifically, the characteristic information of the request statement includes at least one of the equipment, functions, operations, and status values. The aforementioned step of inputting the characteristic information into the decision tree to obtain a decision result indicating whether the request is supported includes: inputting the characteristic information into the decision tree so that the decision nodes in the decision tree determine in turn whether each characteristic information is supported in the order of equipment, functions, operations, and status values; and outputting the decision result through the result node, wherein the decision result includes support and non-support.

[0048] It should be noted that the decision tree of this application judges whether the user request is supported in the order of device, function, operation and status value, which can improve the real-time, accuracy and user experience of the response. This is because there is an association between the several feature information, that is, the function is the attribute of the device, the operation is the attribute of the function, and the status is the attribute of the operation. Therefore, when making a decision, if the several feature information can be judged in the order of device, function, operation and status value, the efficiency of the decision can be improved, thereby improving the real-time, accuracy and user experience of the response.

[0049] For example, if Figure 2As shown, it is a structural schematic diagram of the decision tree provided by the present application. The rectangular node represents the decision node, and the elliptical node represents the result node. The decision node is used to determine whether the feature information conforms to the decision rule on the connecting line, and the result node is used to output the decision result. After the feature information is input into the decision tree, the decision tree judges whether the equipment, function, operation and state value conform to the decision rule on the corresponding connecting line in turn. If it conforms, it enters the child node connected by the connecting line until the decision result is output from the result node. This application takes air conditioning as an example for explanation. Assuming that the user issues a request statement "adjust the air conditioning temperature to 32 degrees", the generating device inputs the feature information "air conditioning", "temperature", "adjust" and "32" into the decision tree. The decision tree uses the "equipment" node, "function" node, "operation" node and "state value" node in turn to determine whether the equipment, function, operation and state value are supported. If any functional feature is not supported, the decision result is output through the corresponding "not supported" node. If all feature information is supported, the decision result is output through the corresponding "support" node.

[0050] In another practicable manner, the present application also provides a method for quickly constructing a decision tree. In this embodiment, the present application constructs a decision tree based on a knowledge graph, which can speed up the construction of the decision tree. Specifically, before inputting feature information into the decision tree and obtaining a decision result indicating whether the request is supported, the device, function, operation and adjustable range in the device protocol are extracted to establish a knowledge graph, wherein the adjustable range includes at least one of the maximum value, minimum value, precision and default step size; a data set is generated according to the association relationship of each node in the knowledge graph, wherein the data set includes multiple decision paths, each decision path includes a decision result and a decision rule for each feature information; and the decision tree is trained using the data set. In addition, the present application can select the C4.5 decision tree algorithm for model training, and the adjustable range is used to determine whether the status value requested by the user is supported, and the range can include at least one of the maximum value, minimum value, precision and step size. The knowledge graph will be updated in real time, and it also supports the continuous expansion of the functional field. Once the knowledge graph is updated or expanded, it will trigger the update of the iterative decision tree, thereby further improving the accuracy of the reply statement.

[0051] Among them, after extracting the equipment, functions, operations and adjustable ranges from the list of vehicle-mounted equipment and function protocols (referred to as equipment protocols), the present application will construct a knowledge graph based on the extracted data. The nodes in the knowledge graph are used to store data, and the lines between the nodes are used to represent the association relationship between the data. For example, Figure 3 As shown in the figure, "temperature" is the functional attribute of "air conditioning", "increase" is the operational attribute of "temperature", and "maximum value" is the maximum attribute of "temperature". The knowledge graph about air conditioning temperature can be expressed as follows:

[0052]

[0053] Among them, name = Air Conditioning is the device, function = temperature is the function of the device, action = ["set", "add", "sub"] is the operations supported by the function, including: adjust up, adjust down, set, range indicates the adjustable range, where min is the minimum value, max is the maximum value, step is the default step size, and accuracy is the accuracy value.

[0054] After constructing the knowledge graph, the answer generation device first generates a data set based on the association relationship between the nodes in the knowledge graph. The data set is used to train the decision tree. Each piece of data represents a decision path. Each decision path includes the decision result and the decision rules of each feature information. For example, taking the air conditioning temperature as an example, the data set is shown in Table 1:

[0055]

[0056]

[0057] Table 1

[0058] Among them, max represents the maximum value, min represents the minimum value, T represents the current temperature, accuracy represents the precision, "&&" represents "and", and "||". Taking the decision condition "≤max&&≥min" under the temperature value as an example, this decision condition means that the temperature value is less than or equal to the maximum value, and the temperature value is greater than or equal to the minimum value. Starting from the second row of data, each row of data represents a decision path, and "temperature value" and "precision" are the decision rules corresponding to the state value. The answer generation device uses the data set to train the decision tree and obtains the following Figure 4 The decision tree shown.

[0059] Based on the above description, it can be seen that the application is based on the association relationship between the nodes of the knowledge graph, and can quickly generate a data set. The decision path of the constructed decision tree is very reasonable, which can improve the decision efficiency of the decision tree.

[0060] It should be noted that in order to further improve the speed of building the decision tree, when generating a data set based on the knowledge graph, the present application can first generate a decision path with supported decision results, such as the data rows with "ID" 1, 4, and 7 in Table 1, and then derive other decision paths with unsupported decision results based on each path. Specifically, starting from the terminal feature information of the decision path with supported decision results, take the mutually exclusive conditions of the decision rules of the terminal feature information to obtain a new decision path, and then determine the second-to-last feature information of the new decision path, take the mutually exclusive conditions of the decision rules of the second-to-last feature information to obtain a new decision path... Repeat the above operations until a decision condition without mutually exclusive conditions is encountered, and the decision result of the new decision path is "not supported". Figure 4 Taking the first decision path in as an example, the reply generating device first determines the mutually exclusive condition “<accuracy” of “≥accuracy” under the accuracy of the first decision path to obtain the second decision path, and then modifies the mutually exclusive condition “≤max-T” of the temperature value of the second decision path to obtain the third decision path. By analogy, the fifth and sixth decision paths can be quickly obtained based on the fourth decision path, and the eighth and ninth decision paths can be quickly obtained based on the seventh decision path.

[0061] 103: Generate a reply statement corresponding to the request statement according to the above decision result.

[0062] Among them, the decision results include support and non-support. The reply generating device can obtain the reply template corresponding to the decision result, and then fill in the semantic slot in the reply template according to the request statement to obtain the corresponding reply sentence. The reply sentence is used to prompt the user whether the request is supported. For example, assuming that the user's request sentence is "adjust the air conditioning temperature to 32 degrees", if the decision result is support, then obtain the corresponding reply template, that is, "OK, {air conditioning} {temperature} is set to {32} degrees", fill in the semantic slot to obtain "OK, the air conditioning temperature is set to 20 degrees"; if the decision result is non-support, then obtain the corresponding reply template, that is, "Sorry, it exceeds the highest {function} supported by {device}", fill in the semantic slot to obtain "Sorry, it exceeds the highest {temperature} supported by {air conditioning}", {} is the semantic slot.

[0063] Based on the above description, it can be seen that the reply statement generated by the present application can prompt whether the user's request is supported. That is to say, the generated reply statement is different depending on whether the decision result is supported or not. Therefore, the present application obtains different reply templates to generate reply statements based on whether the user's request is supported, thereby improving the accuracy of the reply and improving the problem of fixed replies in the prior art.

[0064] It should also be noted that if the reply statement only prompts the user whether the request is supported, then if it is not supported, the user still cannot know the specific reason for not supporting it. In order to further improve the accuracy of the reply and increase the diversity and flexibility of the reply statement, the present application also provides another implementable method of reply generation. In this implementable method, the aforementioned step of generating a reply statement corresponding to the request statement according to the decision result includes: using the result node in the decision tree for outputting the decision result as the target node; generating a reply statement according to the reply template corresponding to the target node, wherein the reply statement includes whether the request is supported, and when it is not supported, the reply statement also includes unsupported feature information.

[0065] Different result nodes correspond to different reply templates. The reply template is not only used to prompt the user whether the request is supported, but also to prompt the specific reasons for the unsupported request if it is not supported. Therefore, generating a reply statement based on the target node to which the decision result belongs can further improve the accuracy and diversity of the reply. For example, assuming that the user's request statement is "adjust the air conditioner temperature to 31.36 degrees", when the state value is not supported, if the target node is a child node under "temperature value", the corresponding reply statement is "Sorry, the highest {temperature} supported by {air conditioner} is {31 degrees}, set it to {31 degrees} for you", and if the target node is a child node under "precision", the corresponding reply statement is "Sorry, the precision supported by {air conditioner} is {0.1 degrees}, set it to {31.3 degrees} for you".

[0066] It should be noted that the present application also provides a method for generating a reply template. Before obtaining the reply template corresponding to the target node, the reply generating device generates a reply template according to the decision conditions at the end of the decision path where each result node is located. For example, Figure 4 As shown, the terminal decision condition on the decision path where the "Not Supported" node under the "Temperature Value" node is located is ">max-T". According to the analysis of this decision condition, the reason for not supporting is that the temperature exceeds the maximum value. Based on this, the corresponding reply template is formulated: "Sorry, the highest {function} supported by {device} is {max}, and it is set to {max} for you."

[0067] In another implementable manner, in order to further improve the accuracy of the reply, the present application also corrects the erroneous feature information when the request is not supported, and then generates a reply statement based on the corrected feature information, thereby reducing the user's repeated attempts and reducing user analysis, thereby improving driving safety. Specifically, when the decision result is not supported, the aforementioned step of generating a reply statement based on the reply template corresponding to the target node includes: judging whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correcting the feature information according to an adjustable range, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy and a default step size; generating a reply statement based on the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

[0068] Among them, the present application mainly modifies the state value in the feature information. Therefore, before the modification, it is first determined whether the unsupported feature information is a state value according to the target node. For example, the unsupported feature information can be determined according to the decision condition at the end of the decision path where the target node is located, such as Figure 4 As shown, the decision conditions at the end of the decision path where the result node of the penultimate layer of the decision tree is located are all used to judge the temperature value. Therefore, the unsupported feature information is the state value. Therefore, the feature information is adjusted according to the adjustable range, and then a reply statement is generated according to the reply template corresponding to the target node and the corrected feature information.

[0069] For example, the user's request statement 1 is "Adjust the air conditioning temperature to 32 degrees". Assuming the maximum temperature is 31 degrees, the reply statement generated after correcting the feature information can be "Sorry, the maximum {temperature} supported by {air conditioner} is {31 degrees}, and it is set to {31 degrees} for you"; the user's request statement 2 is "Adjust the air conditioning temperature to 25.36 degrees". Assuming the accuracy is 0.1 degree, the reply statement generated after correcting the feature information can be "Sorry, the accuracy supported by {air conditioner} is {0.1 degree}, and it is set to {25.3 degrees} for you".

[0070] In another implementable manner, in order to further improve the accuracy of the reply, the present application may also verify the corrected feature information after correction, and generate a reply statement based on the corrected feature information after the verification. Specifically, after correcting the feature information according to the adjustable range, before generating the reply statement, the corrected feature information is re-input into the decision tree to obtain a new decision result; determine whether the new decision result is supported, and if so, verify and execute the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information.

[0071] Among them, after correction, the reply generating device will re-input the corrected feature information into the decision tree for processing. If the new decision result obtained by processing is not supported, it means that the verification is passed, and then the correction and verification are performed again until the verification is passed; if the new decision result obtained by processing is supported, it means that the verification is passed, and then the aforementioned step of generating a reply statement based on the corrected feature information is executed. Since the feature information is corrected, the reply statement will be more accurate, which can reduce user distraction and improve driving safety.

[0072] For example, the user's request statement is "adjust the air conditioner temperature to 25.36 degrees", and the supported precision is 0.1 degrees. Therefore, when the characteristic information of the request statement "air conditioner", "temperature", "adjust to", "25.36" is input as follows Figure 4 After the decision tree shown, after being processed by the decision tree, an unsupported decision result is output from the 4th result node (target node) of the last layer of the decision tree, and then the state value 25.36 is corrected to obtain a new state value of 25.3. Finally, "air conditioning", "temperature", "adjust to", and "25.3" are re-input into the decision tree, and a supported decision result is output from the 3rd decision point of the last layer of the decision tree. At this time, it means that the verification is passed, and the corresponding reply sentence "Sorry, the accuracy supported by {air conditioning} is {0.1 degrees}, and it is set to {25.3 degrees} for you" is generated according to the new state value 25.3.

[0073] It should be noted that although the previous feasible method can improve the accuracy of the reply, there is still room for improvement in real-time performance. In order to further improve the real-time performance of the reply, the present application proposes another feasible method based on the previous feasible method. Specifically, after correcting the characteristic information according to the adjustable range and before generating the reply statement, it also includes: returning to the parent node of the target node so that the decision tree starts to execute from the breakpoint of the decision path; after obtaining the new decision result, judging whether the new decision result is support; if the new decision result is support, the verification is passed, and the step of generating a reply statement according to the reply template corresponding to the target node and the corrected characteristic information is executed.

[0074] Among them, in the previous implementable method, the reply generating device needs to re-input the corrected feature parameters into the decision tree after correction, so that the decision tree re-executes the complete decision path again, while the present application starts execution from the breakpoint of the decision path, and there is no need to execute the complete decision path, which can meet the high real-time requirements in the vehicle scenario. Continuing to explain based on the example of the previous implementable method, after the correction to obtain the state value 25.3, the present application returns to the parent node of the target node, so that the decision tree determines whether 25.3 meets the decision rule of "precision", and then outputs the supported decision result from the child node, so the verification passes. It can be seen that the present application does not need to be re-executed from the top of the decision tree, but starts execution from the breakpoint, so the efficiency of verification can be improved, thereby improving the real-time performance of the reply.

[0075] In summary, the present application utilizes a decision tree to determine whether a user request is supported, and then generates a reply statement based on whether the user request is supported, thereby improving the problem of inaccurate replies in existing template rule technologies while meeting the real-time requirements of vehicle-mounted scenarios.

[0076] The present application also provides a reply generating device, such as Figure 5 As shown. The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. Specifically, Figure 5 As shown, the reply generating device includes: an extraction unit 510, which is used to extract characteristic information of a request statement after receiving a user's request statement; a decision unit 520, which is used to input the characteristic information into a decision tree to obtain a decision result indicating whether the request is supported; and a reply unit 530, which is used to generate a reply statement corresponding to the request statement according to the decision result.

[0077] In another implementable manner, the characteristic information of the aforementioned request statement includes at least one of a device, a function, an operation, and a status value, and the aforementioned decision unit 520 is specifically used to: input the characteristic information into a decision tree, so that the decision nodes in the decision tree judge whether each characteristic information is supported in sequence according to the order of the device, function, operation, and status value; and output the decision result through the result node, wherein the decision result includes support and non-support.

[0078] In another practicable manner, the aforementioned reply unit 530 is specifically used to: use the result node in the decision tree for outputting the decision result as the target node; generate a reply statement according to the reply template corresponding to the target node, wherein the reply statement includes whether the request is supported, and when it is not supported, the reply statement also includes unsupported feature information.

[0079] In another implementable manner, when the decision result is not supported, the aforementioned reply unit 530 is specifically used to: determine whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correct the feature information according to an adjustable range, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy and a default step size; generate a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

[0080] In another practicable manner, the reply generation device also includes a correction unit 540, which is used to: re-input the corrected feature information into the decision tree to obtain a new decision result; determine whether the new decision result is supported, and if so, verify it and execute the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information.

[0081] In another practicable manner, the reply generation device also includes a verification unit 550, which is used to: return the parent node of the target node so that the decision tree starts execution from the breakpoint of the decision path; after obtaining a new decision result, determine whether the new decision result is supported; if the new decision result is supported, the verification is passed, and the step of generating a reply statement according to the reply template corresponding to the target node and the corrected feature information is executed.

[0082] In another practicable manner, the reply generating device further includes a verification unit 550, which is used to: extract the equipment, functions, operations and adjustable ranges in the equipment protocol to establish a knowledge graph; generate a data set based on the association relationship between each node in the knowledge graph, wherein the data set includes multiple decision paths, each decision path includes a decision result and a decision rule for each feature information; and train a decision tree using the data set.

[0083] The present application also provides a reply generating device, see Figure 6 .like Figure 6The answer generation device in the embodiment shown may include: a processor 610 and a memory 620. The processor 610 and the memory 620 are connected via a bus 630. The processor 610 is used to execute multiple instructions; the memory 620 is used to store multiple instructions, which are suitable for the processor 610 to load and execute the answer generation method in the above embodiment.

[0084] The processor 610 may be an electronic control unit (ECU), a central processing unit (CPU), a general processor, a coprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The processor 610 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of 5SP and a microprocessor, etc. In this embodiment, the processor 610 may be a single-chip microcomputer, and various control functions may be implemented by programming the single-chip microcomputer. The processor has the advantages of powerful computing power and fast processing. Specifically, the processor 610 is used to execute the function of the extraction unit 510, which is used to extract the characteristic information of the request statement after receiving the user's request statement; the processor 610 is also used to execute the function of the decision unit 520, which is used to input the characteristic information into the decision tree to obtain a decision result indicating whether the request is supported; the processor 610 is also used to execute the function of the reply unit 530, which is used to generate a reply statement corresponding to the request statement according to the decision result.

[0085] In another practicable manner, the characteristic information of the aforementioned request statement includes at least one of a device, a function, an operation, and a status value, and the aforementioned processor 610 is specifically used to: input the characteristic information into a decision tree, so that the decision nodes in the decision tree judge whether each characteristic information is supported in sequence according to the order of the device, function, operation, and status value; and output the decision result through the result node, wherein the decision result includes support and non-support.

[0086] In another practicable manner, the aforementioned processor 610 is specifically used to: use the result node in the decision tree for outputting the decision result as the target node; generate a reply statement according to the reply template corresponding to the target node, wherein the reply statement includes whether the request is supported, and when it is not supported, the reply statement also includes unsupported feature information.

[0087] In another implementable manner, when the decision result is not supported, the aforementioned processor 610 is specifically used to: determine whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correct the feature information according to an adjustable range, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy and a default step size; generate a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

[0088] In another practicable manner, the processor 610 is also used to execute the function of the correction unit 540, which is used to: re-input the corrected feature information into the decision tree to obtain a new decision result; determine whether the new decision result is supported, and if so, verify it and execute the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information.

[0089] In another practicable manner, the processor 610 is also used to execute the functions of the verification unit 550, which is used to: return the parent node of the target node so that the decision tree starts execution from the breakpoint of the decision path; after obtaining a new decision result, determine whether the new decision result is supported; if the new decision result is supported, the verification passes, and executes the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information.

[0090] In another practicable manner, the processor 610 is also used to execute the functions of the verification unit 550, which is used to: extract the devices, functions, operations and adjustable ranges in the device protocol to establish a knowledge graph; generate a data set based on the association relationship between each node in the knowledge graph, wherein the data set includes multiple decision paths, each decision path includes a decision result and a decision rule for each feature information; and use the data set to train a decision tree.

[0091] In one embodiment, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method in any of the foregoing embodiments. The processor is used to execute the plurality of instructions; the memory is used to store the plurality of instructions, which are loaded by the processor and execute the reply generation method in the foregoing embodiments.

[0092] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A response generation method applied in a vehicle-mounted scenario, characterized in that: The method comprises: After receiving a user's request statement, extracting characteristic information of the request statement, wherein the characteristic information of the request statement includes at least one of a device, a function, an operation, and a state value; Input the feature information into the decision tree, so that the decision nodes in the decision tree judge whether each feature information is supported in the order of device, function, operation and status value, and output the decision result through the result node, which includes support or not; Using the result node for outputting the decision result in the decision tree as the target node; A reply statement is generated according to the reply template corresponding to the target node; when the decision result is not supported, the step of generating a reply statement according to the reply template corresponding to the target node includes: judging whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correcting the feature information according to an adjustable range; generating a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

2. The method according to claim 1, characterized in that The reply statement includes whether the request is supported, and when not supported, the reply statement also includes unsupported feature information.

3. The method according to claim 1, characterized in that The adjustable range includes at least one of a maximum value, a minimum value, an accuracy, and a default step size.

4. The method according to claim 3, characterized in that After the feature information is modified according to the adjustable range and before the reply statement is generated, the following steps are also included: Re-input the corrected feature information into the decision tree to obtain a new decision result; Determine whether the new decision result is support. If so, the verification is passed, and the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information is executed.

5. The method according to claim 3, characterized in that After the feature information is modified according to the adjustable range and before the reply statement is generated, the following steps are also included: Return the parent node of the target node so that the decision tree starts executing from the breakpoint of the decision path; After obtaining a new decision result, determining whether the new decision result is support; If the new decision result is support, the verification is passed, and the step of generating a reply statement based on the reply template corresponding to the target node and the corrected feature information is executed.

6. The method according to claim 1, characterized in that Before inputting the feature information into the decision tree to obtain a decision result indicating whether the request is supported, the method further includes: Extracting devices, functions, operations, and adjustable ranges from the device protocol to establish a knowledge graph, wherein the adjustable range includes at least one of a maximum value, a minimum value, an accuracy, and a default step size; Generate a data set based on the association relationship between each node in the knowledge graph, where the data set includes multiple decision paths, each decision path includes the decision result and the decision rules of each feature information; The decision tree is trained using the data set.

7. A reply generating device, characterized in that The reply generating device comprises: an extraction unit, configured to extract characteristic information of a request statement after receiving a request statement from a user, wherein the characteristic information of the request statement includes at least one of a device, a function, an operation, and a state value; The decision unit is used to input the feature information into the decision tree, so that the decision nodes in the decision tree judge whether each feature information is supported in the order of device, function, operation and status value, and output the decision result through the result node, which includes support or not; A reply unit is used to use the result node for outputting the decision result in the decision tree as the target node; generate a reply statement according to the reply template corresponding to the target node. When the decision result is not supported, the step of generating a reply statement according to the reply template corresponding to the target node includes: judging whether the unsupported feature information is a status value according to the target node; if the unsupported feature information is a status value, correcting the feature information according to an adjustable range; generating a reply statement according to the reply template corresponding to the target node and the corrected feature information, wherein the reply statement also includes the corrected feature information.

8. A reply generating device, characterized in that The reply generating device includes a processor and a memory, which are connected via a bus; the processor is used to execute multiple instructions; the memory is used to store the multiple instructions, and the instructions are suitable for being loaded by the processor and executing the reply generating method described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that a plurality of instructions are stored in the computer-readable storage medium, and the instructions are suitable for being loaded by a processor and executing the answer generation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Response information generation method and device, electronic equipment and computer readable medium

    CN112434147A