Vehicle instruction generation method and device, electronic equipment and readable medium

By using preset instruction models and directed acyclic graph technology in the vehicle intelligent cockpit, target vehicle instructions related to user experience description text are generated, and the hallucination problem of large language models when understanding user instructions is solved, and more accurate and executable instruction generation is achieved.

CN119739426APending Publication Date: 2025-04-01CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411954720.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

Large language models may have hallucinations when understanding user instructions, resulting in the generated instructions not being executed in the vehicle's cockpit.

Method used

By obtaining the user's initial experience description text, input it into the preset command model, the first word of the target vehicle instruction is generated, and the preset vehicle instruction is fused and judged according to the preset vehicle instruction directed acyclic diagram to generate the final target vehicle instruction.

Benefits of technology

Improve the accuracy of the target vehicle instructions, ensuring that the generated instructions can be executed in the vehicle's cockpit, avoiding hallucination problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739426A_ABST
    Figure CN119739426A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a vehicle instruction generation method and apparatus, an electronic device and a readable medium. The method comprises the steps of obtaining an initial feeling description text of a user; inputting the initial feeling description text into a preset instruction model to obtain a first word of the target vehicle instruction; judging whether the first word is a first node word in a preset vehicle instruction directed acyclic graph or not; the preset vehicle instruction directed acyclic graph comprises a first node word and a second node word connected with the first node word through a directed edge; if yes, fusing the first node word with the initial feeling description text to obtain a fused feeling description text; inputting the fused feeling description text into a preset instruction model to obtain a second word of the target vehicle instruction; judging whether the second word is a second node word or not; if yes, the target vehicle instruction is generated according to the first node word and the second node word, the accuracy of the instruction is improved, and it is ensured that the generated instruction can be executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to a method for generating a vehicle instruction, a device for generating a vehicle instruction, an electronic device and a computer-readable medium. Background Art

[0002] With the development of large language models, large language models are gradually being applied to the intelligent cockpit of vehicles to understand the user's generalized instructions for the vehicle, such as vehicle control methods and other operations. However, when the large language model understands the user's instructions, there may be hallucination problems, that is, there may be situations where the large language model understands the user's feeling input and generates instructions that may not be executed in the vehicle's cockpit. For example: the user inputs the feelings related to the command to turn on the air conditioner, while the command understood by the large language model may be to switch the music played on the mobile device. Summary of the invention

[0003] Embodiments of the present invention provide a method, device, electronic device, and computer-readable storage medium for generating vehicle commands to solve the problem that a large language model may have hallucinations when understanding user commands.

[0004] An embodiment of the present invention discloses a method for generating a vehicle instruction, the method comprising:

[0005] Obtain the user's initial feeling description text;

[0006] Inputting the initial feeling description text into a preset instruction model to obtain a first word of a target vehicle instruction;

[0007] Determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge;

[0008] If so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text;

[0009] Inputting the fused feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction;

[0010] Determining whether the second word is the second node word;

[0011] If so, the target vehicle instruction is generated according to the first node term and the second node term.

[0012] Optionally, the method comprises:

[0013] Obtain at least one vehicle command, and convert the vehicle command into a command description text;

[0014] The instruction description text is split into at least one instruction split word, and the instruction split word is set on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

[0015] Optionally, the first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

[0016] Optionally, the instruction splitting words include: instruction triggering words and instruction ending words; the instruction splitting words are set on each node of the directed acyclic graph, and each node is connected by a directed edge, including:

[0017] Setting the instruction trigger word at the starting node of the directed path of the directed acyclic graph;

[0018] The instruction end word is set at the terminal node of the directed path of the directed acyclic graph.

[0019] Optionally, the first node word includes a first target node word; and the determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph includes:

[0020] Obtaining an equivalent probability that the first word is the first node word;

[0021] If the identical probability is greater than a preset probability, it is determined that the first word is a first target node word in a preset vehicle instruction directed acyclic graph.

[0022] Optionally, the second node word includes a second target node word; and determining whether the second word is the second node word includes:

[0023] Obtaining the adjustment strength of each first node word corresponding to the second word;

[0024] If the matching degree between the adjustment strength and the first node word is greater than a preset matching degree, it is determined that the second word is a second target node word in the preset vehicle instruction directed acyclic graph.

[0025] Optionally, obtaining the user's initial feeling description text includes:

[0026] Obtain the user's voice description of his / her feelings;

[0027] The feeling description speech is converted into the initial feeling description text.

[0028] The embodiment of the present invention further discloses a vehicle instruction generating device, the device comprising:

[0029] A text acquisition module is used to obtain the user's initial feeling description text;

[0030] A first word obtaining module, used for inputting the initial feeling description text into a preset instruction model to obtain a first word of the target vehicle instruction;

[0031] A first word determination module is used to determine whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge;

[0032] a fusion module, configured to fuse the first node word with the initial feeling description text to obtain a fused feeling description text;

[0033] A second word obtaining module, used for inputting the fusion feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction;

[0034] A second word determination module, used to determine whether the second word is the second node word;

[0035] The target vehicle instruction generating module is used to generate the target vehicle instruction according to the first node word and the second node word.

[0036] Optionally, the device comprises:

[0037] An instruction conversion module, used for acquiring at least one vehicle instruction and converting the vehicle instruction into an instruction description text;

[0038] A splitting module is used to split the instruction description text into at least one instruction splitting word, and set the instruction splitting word on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

[0039] Optionally, the first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

[0040] Optionally, the instruction splitting words include: instruction triggering words and instruction ending words; the splitting module includes:

[0041] A first setting submodule, used for setting the instruction triggering word at the starting node of the directed path of the directed acyclic graph;

[0042] The second setting submodule is used to set the instruction end word at the terminal node of the directed path of the directed acyclic graph.

[0043] Optionally, the first node word includes a first target node word; and the first word determination module includes:

[0044] A probability acquisition submodule, used to acquire the equivalent probability that the first word is the first node word;

[0045] The first word determination submodule is used to determine that the first word is a first target node word in a preset vehicle instruction directed acyclic graph if the equivalent probability is greater than a preset probability.

[0046] Optionally, the second node word includes a second target node word; and the second word determination module includes:

[0047] An adjustment strength acquisition submodule, used to acquire the adjustment strength of each first node word corresponding to the second word;

[0048] The second word determination submodule is used to determine that the second word is a second target node word in a preset vehicle instruction directed acyclic graph if the matching degree between the adjustment strength and the first node word is greater than a preset matching degree.

[0049] Optionally, the text acquisition module includes:

[0050] The voice acquisition submodule is used to acquire the user's feeling description voice;

[0051] The speech conversion submodule is used to convert the feeling description speech into the initial feeling description text.

[0052] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0053] The memory is used to store computer programs;

[0054] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0055] The embodiment of the present invention further discloses one or more computer-readable media on which instructions are stored. When executed by one or more processors, the processors are enabled to execute the method described in the embodiment of the present invention.

[0056] The embodiments of the present invention include the following advantages:

[0057] In an embodiment of the present invention, the user's initial feeling description text is obtained; the initial feeling description text is input into a preset instruction model to obtain a first word of the target vehicle instruction; it is determined whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes a first node word and a second node word connected to the first node word by a directed edge; if so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text; the fused feeling description text is input into a preset instruction model to obtain a second word of the target vehicle instruction; it is determined whether the second word is a second node word; if so, the target vehicle instruction is generated according to the first node word and the second node word. All vehicle instructions are constructed into a vehicle instruction directed acyclic graph, and according to the vehicle instruction directed acyclic graph, a preset instruction model is used to generate a target vehicle instruction related to the user's initial feeling description text, so that the preset instruction model generates instructions existing on the vehicle instruction directed acyclic graph to improve the accuracy of the target vehicle instruction and ensure that the generated target vehicle instruction can be executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of steps of a method for generating a vehicle instruction provided in an embodiment of the present invention;

[0059] Figure 2 is a schematic diagram of a vehicle instruction directed acyclic graph provided in an embodiment of the present invention;

[0060] Figure 3 is a flowchart of the steps of another method for generating a vehicle instruction provided in an embodiment of the present invention;

[0061] Figure 4 is a structural block diagram of a vehicle instruction generating device provided in an embodiment of the present invention;

[0062] Figure 5 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0063] Figure 6 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] To facilitate understanding of the technical solutions and technical effects of the embodiments of the present invention, the relevant technologies of the present invention are briefly described below.

[0066] With the development of large language models, large language models are gradually being applied to the intelligent cockpit of vehicles to understand the user's generalized instructions for the vehicle, such as vehicle control methods and other operations. However, when understanding user instructions, the large language model may have hallucination problems, that is, there may be situations where the large language model understands the user's feeling input and generates instructions that may not be executed in the vehicle's cockpit. For example: the user inputs the feelings related to the command to turn on the air conditioner, and the command understood by the large language model may be to switch the music played on the mobile device. In addition, the hallucination problem of the large language model cannot be completely solved. In order to ensure that the instructions generated by the large language model can be executed in the vehicle's cockpit, the instructions generated by the large language model must be post-processed to ensure the executability of the instructions.

[0067] Since post-processing is to verify the results generated by the large language model, it requires that the large language model must complete all outputs before verification can be performed, which increases the post-processing time. At the same time, the output results of the large language model do not support streaming output, that is, the output of the large language model can only be output after all the results are prepared, and cannot be output in real time and continuously. In addition, post-processing can only filter out unreasonable instructions, but cannot increase the probability of generating reasonable instructions, and it cannot affect the generated content of the model.

[0068] Reference Figure 1 , shows a flow chart of the steps of a method for generating a vehicle instruction provided in an embodiment of the present invention, which may specifically include the following steps:

[0069] Step 101, obtaining a user's initial feeling description text;

[0070] In the embodiment of the present invention, the user's initial feeling description text may be obtained, for example: "It's a bit hot today", "It's too hot today", "It's really too hot today" and "So boring".

[0071] In some embodiments of the present invention, obtaining the user's initial feeling description text includes:

[0072] Obtain the user's voice description of his / her feelings;

[0073] The feeling description speech is converted into the initial feeling description text.

[0074] In an embodiment of the present invention, a voice assistant or a microphone on the vehicle may be used to receive the user's feeling description voice input, and the feeling description voice may be converted into an initial feeling description text through ASR (Automatic Speech Recognition).

[0075] In some embodiments of the invention, the method comprises:

[0076] Obtain at least one vehicle command, and convert the vehicle command into a command description text;

[0077] The instruction description text is split into at least one instruction split word, and the instruction split word is set on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

[0078] In the embodiment of the present invention, the vehicle includes devices such as a vehicle air conditioner, a vehicle music player, a vehicle large screen, and vehicle windows. For the vehicle, the vehicle instructions include: turning on or off the air conditioner, turning on or off the vehicle music player, adjusting the volume of the music player, turning on or off the vehicle large screen, and opening or closing the vehicle windows. In the embodiment of the present invention, the instruction description texts of these vehicle instructions can be obtained, that is, the text descriptions of these instructions are obtained.

[0079] In the embodiment of the present invention, the instruction description text of the vehicle instruction may be split into at least one instruction splitting word.

[0080] In a specific example, the vehicle command "turn on the air conditioner" can be split into turn on and air conditioner. The vehicle command "increase the air conditioner temperature to 26 degrees Celsius" can also be split into air conditioner and increase the temperature to 26 degrees Celsius.

[0081] In an embodiment of the present invention, the instruction splitting words are set on each node of the directed acyclic graph, and each node of the directed acyclic graph is connected by directed edges to obtain a vehicle instruction directed acyclic graph (DAG, Directed Acyclic Graph). Among them, the words on the vehicle instruction directed acyclic graph are all words related to the vehicle instruction.

[0082] In an embodiment of the present invention, a vehicle command directed acyclic graph may be configured for a preset command model, wherein the preset command model may be a trained large language model or an untrained large language model.

[0083] Reference Figure 2, shows a schematic diagram of a vehicle instruction directed acyclic graph provided in an embodiment of the present invention. The vehicle instruction directed acyclic graph only includes vehicle instructions for raising or lowering windows and turning on or off air conditioners. The vehicle instruction directed acyclic graph also includes a first node word and a second node word. The first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection. Figure 2 In the directed acyclic graph of vehicle instructions, the next step from the beginning points to the first node word; then the next step of the first node word points to the second node word.

[0084] In some embodiments of the present invention, the first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

[0085] In an embodiment of the present invention, the first node word in the vehicle instruction directed acyclic graph is a split word representing a control object of the vehicle instruction, and the second node word is a split word representing a control operation associated with the control object. Figure 2 In the directed acyclic graph of vehicle instructions, the next step from the beginning can only be the split words of the control objects of all vehicle instructions; then the next step of the split words of the control objects is the split words of the control operations associated with the control objects.

[0086] Therefore, the vehicle instruction directed acyclic graph is constructed using words that represent the control objects and control operations of the vehicle instructions. The preset instruction model can generate words that represent the control objects and words that represent the control operations related to the user's initial feeling description text based on the vehicle instruction directed acyclic graph, which are the first target node words and the second target node words, respectively. The first target node words and the second target node words constitute the target vehicle instructions. The preset instruction model generates the target vehicle instructions based on the vehicle instruction directed acyclic graph, which is equivalent to generating instructions under the intervention of FST (Finite State Transducer).

[0087] In a specific example, the user's initial feeling description text is "It's too hot today", then the preset instruction model can first generate the first target node word "air conditioning" of the control object according to the vehicle instruction directed acyclic graph, and then generate the second target node word "turn on" of the control operation to obtain the target vehicle instruction "turn on the air conditioner".

[0088] In some embodiments of the present invention, the instruction splitting words include: instruction triggering words and instruction ending words; the instruction splitting words are set on each node of the directed acyclic graph, and each node is connected by a directed edge, including:

[0089] Setting the instruction trigger word at the starting node of the directed path of the directed acyclic graph;

[0090] The instruction end word is set at the terminal node of the directed path of the directed acyclic graph.

[0091] In the embodiment of the present invention, the instruction splitting words include: instruction triggering words and instruction ending words, wherein the instruction triggering words may be start, and the instruction ending words may be end.

[0092] In an embodiment of the present invention, in the process of constructing a vehicle instruction directed acyclic graph, the instruction trigger words can be set at the starting node of the directed path of the directed acyclic graph, and the instruction end words can be set at the ending node of the directed path of the directed acyclic graph.

[0093] Step 102, inputting the initial feeling description text into a preset instruction model to obtain a first word of the target vehicle instruction;

[0094] In an embodiment of the present invention, the preset instruction model can be an untrained large language model or a trained large language model. The large language model includes a preset vocabulary, which includes instruction split words obtained by splitting the instruction description text of the vehicle instruction, such as: air conditioning, car window, large car screen, etc.; the vocabulary may also include words unrelated to the vehicle instruction, such as: user's mobile terminal, etc. It should be noted that the instruction split words are words in the directed acyclic graph of vehicle instructions.

[0095] In an embodiment of the present invention, a user's training experience description text and at least one training vehicle instruction corresponding to the training experience description text can be obtained, and the training experience description text and the training vehicle instruction are used to train a preset large language model to obtain a preset instruction model, which is a trained large language model.

[0096] In an embodiment of the present invention, the user's initial feeling description text can be input into the preset instruction model to obtain the first word of the target vehicle instruction. The first word is a word related to the control object extracted from the word list by the preset instruction model, such as car window, air conditioner, mobile phone, etc.

[0097] Step 103, determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge;

[0098] In an embodiment of the present invention, it can be determined whether the first word is the first node word in the preset vehicle instruction directed acyclic graph. It should be noted that the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge.

[0099] Step 104: if yes, then the first node word is merged with the initial feeling description text to obtain a merged feeling description text;

[0100] In an embodiment of the present invention, if the first word related to the control object extracted from the vocabulary by the preset instruction model is a word in the directed acyclic graph of the vehicle instruction, that is, the first word is an instruction split word obtained by splitting the instruction description text of the vehicle instruction, and is not a word unrelated to the vehicle instruction. In other words, the first word output by the preset instruction model is the first node word in the preset vehicle instruction directed acyclic graph, and the first node word can be fused with the initial feeling description text to obtain a fused feeling text.

[0101] In a specific example, the first node word may be “air conditioning”, the initial feeling description text may be “I am so hot”, and the fused feeling description text may be “I am so hot + air conditioning”.

[0102] In some embodiments of the present invention, the first node word includes a first target node word; and determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph includes:

[0103] Obtaining an equivalent probability that the first word is the first node word;

[0104] If the identical probability is greater than a preset probability, it is determined that the first word is a first target node word in a preset vehicle instruction directed acyclic graph.

[0105] In an embodiment of the present invention, the vehicle instruction directed acyclic graph includes at least one first node word, the preset instruction model generates at least one first word, and the first target node word can be determined from the at least one first word. For example: for the initial feeling description text of "I am so hot", the first words generated by the preset instruction model include: car window, air conditioner, mobile phone, etc. Among them, car window and air conditioner are instruction splitting words, and mobile phone is a word unrelated to vehicle instructions. The first node words include car window and air conditioner.

[0106] In an embodiment of the present invention, the user's initial feeling description text can be input into a preset instruction model, and the preset instruction model can generate an equivalent probability that the first word in the vocabulary is the first node word based on the vehicle instruction directed acyclic graph. The first word may include instruction splitting words and words unrelated to vehicle instructions. It should be noted that if the first word is a word unrelated to the vehicle instruction, that is, a word that does not belong to the vehicle instruction directed acyclic graph, the equivalent probability corresponding to the first word is 0.

[0107] If the preset instruction model is a trained large language model, the preset instruction model can output the equivalent probability corresponding to the first word according to the user's initial feeling description text. For example, if the initial feeling description text is "I am so hot", the first words include: car window, air conditioner, mobile phone, etc.; the equivalent probability corresponding to the first word of "air conditioner" can be 60%, the equivalent probability corresponding to the first word of "car window" can be 50%, and the equivalent probability corresponding to the first word of "mobile phone" is 0.

[0108] If the preset instruction model is an untrained large language model, the preset instruction model can set the probability of the first word unrelated to the vehicle instruction to 0 according to the vehicle instruction directed acyclic graph, and then obtain the user's initial feeling description text, the user's example feeling description text, and at least one example vehicle instruction corresponding to the example feeling description text. According to the feeling intensity of the initial feeling description text, the feeling intensity of the example feeling description text, and the adjustment intensity of the example vehicle instruction on the user's feelings, the equivalent probability corresponding to the first word belonging to the vehicle instruction directed acyclic graph can be determined.

[0109] Specifically, the example feeling description text has at least one corresponding example vehicle command, and different example vehicle commands have different adjustment strengths on the user's feelings. For example, if the example feeling description text is "I am too hot", then at least one example vehicle command may be: "Turn on the air conditioner" and "Open the window", and the adjustment strength of "Turn on the air conditioner" on the user's feelings is greater than that of "Open the window".

[0110] In the embodiment of the present invention, the feeling intensity of the user's initial feeling description text and the example feeling description text may be different. If the feeling intensity of the example feeling description text is "I am too hot" and the feeling intensity of the user's initial feeling description text is "I am really too hot", then the feeling intensity of the user's initial feeling description text is greater than that of the example feeling description text.

[0111] In an embodiment of the present invention, the feeling intensity of the initial feeling description text and the feeling intensity of the example feeling description text can be compared, and the adjustment intensity of at least one example vehicle instruction can be compared. Then, according to the first comparison result of the feeling intensity of the initial feeling description text and the feeling intensity of the example feeling description text and the second comparison result of the adjustment intensity of at least one example vehicle instruction, the probability of the example vehicle instruction becoming the target vehicle instruction is determined. Specifically, when the acquired user initial feeling description text is the example feeling description text, the preset instruction model can output the probability of the example vehicle instruction as 1. That is, if the user's initial feeling description text is "I'm too hot", the corresponding probability of at least one example vehicle instruction "turn on the air conditioner" and "open the window" can be 50% and 50%, and the probability of generating the example vehicle instruction is 1. If the user's initial feeling description text is "I'm really too hot", the feeling intensity of the user's initial feeling description text is greater than the example feeling description text. Since the adjustment intensity of "turn on the air conditioner" is greater than "open the window", the probability of "turn on the air conditioner" can be increased and the probability of "open the window" can be reduced.

[0112] In the embodiment of the present invention, according to the probability of the example vehicle command becoming the target vehicle command, the equivalent probability corresponding to the first word in the directed acyclic graph of vehicle commands can be determined. For example, if the probability of the vehicle command "turn on the air conditioner" is 60% and the probability of "open the window" is 40% for the user's initial feeling description text "I am really too hot", then the equivalent probability corresponding to "air conditioner" is 60% and the equivalent probability corresponding to "window" is 40%.

[0113] In an embodiment of the present invention, if the equivalent probability is greater than the preset probability, it is determined that the first word is the first target node word in the preset vehicle instruction directed acyclic graph. For example, the initial feeling description text is "I am so hot", the equivalent probability of the first word of "air conditioning" is 60%, the equivalent probability of the first word of "window" is 40%, and the equivalent probability of the first word of "mobile phone" is 0. The preset probability can be 55%, then the air conditioning is the first target node word in the preset vehicle instruction directed acyclic graph, that is, the words related to the control object in the target vehicle instruction are determined according to the vehicle instruction directed acyclic graph.

[0114] Step 105, inputting the fusion feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction;

[0115] In the embodiment of the present invention, the fused feeling description text can be input into the preset instruction model to obtain the second word of the target vehicle instruction. The second word is a word related to the control operation extracted from the vocabulary by the preset instruction model, such as open, increase volume, reduce temperature, close, reduce, etc.

[0116] Step 106, determining whether the second word is the second node word;

[0117] In an embodiment of the present invention, it is possible to determine whether the second word is the second node word in the vehicle instruction directed acyclic graph, that is, to determine whether the second word related to the control operation extracted from the vocabulary by the preset instruction model is a word unrelated to the vehicle instruction.

[0118] Step 107: if yes, generate the target vehicle instruction according to the first node word and the second node word.

[0119] In an embodiment of the present invention, if the second word related to the control operation extracted from the vocabulary by the preset instruction model is a word in the directed acyclic graph of vehicle instructions, that is, the second word is an instruction split word obtained by splitting the instruction description text of the vehicle instruction, and is not a word unrelated to the vehicle instruction. In other words, the second word output by the preset instruction model is the second node word in the preset vehicle instruction directed acyclic graph, and the target vehicle instruction can be generated based on the first node word and the second node word. For example: for the initial feeling description text of "I'm so hot", the first node word is "air conditioning" and the second node word is "turn on", then the target vehicle instruction can be "turn on the air conditioning".

[0120] In the embodiment of the present invention, the target vehicle instruction may also be generated according to the first target node word and the second node word.

[0121] In some embodiments of the present invention, the second node word includes a second target node word; and determining whether the second word is the second node word includes:

[0122] Obtaining the adjustment strength of each first node word corresponding to the second word;

[0123] If the matching degree between the adjustment strength and the first node word is greater than a preset matching degree, it is determined that the second word is a second target node word in the preset vehicle instruction directed acyclic graph.

[0124] In an embodiment of the present invention, the vehicle instruction directed acyclic graph includes at least one second node word, and the preset instruction model outputs at least one second word for the fusion feeling description text; the preset instruction model can determine the second target node word from the at least one second node word.

[0125] Specifically, the adjustment strength of the second word corresponding to each first node word can be obtained. For example: if the first node word is air conditioning, the adjustment strength of the second word corresponding to the first node word includes raising the temperature to 26 degrees Celsius, lowering the temperature to 16 degrees Celsius, and adjusting the gear to 4 gears, etc.; among which, raising the temperature to 26 degrees Celsius and lowering the temperature to 16 degrees Celsius match the first node word of air conditioning, and adjusting the gear to 4 gears does not match the first node word of air conditioning. Adjusting the gear to 4 gears can match the first node word of the fan.

[0126] In an embodiment of the present invention, if the adjustment strength and the first node word match degree are greater than the preset match degree, that is, the adjustment strength of the second word corresponding to the first node word matches the first node word, then the second word is determined to be the second target node word in the preset vehicle instruction directed acyclic graph.

[0127] Among them, the preset instruction model determines the first target node word based on the first node word, and then the preset instruction model can obtain the adjustment strength of the second word corresponding to the first target node word. Then, if the adjustment strength matches the first target node word more than the preset matching degree, the second word is the second target node word in the preset vehicle instruction directed acyclic graph.

[0128] In a specific example, for the initial feeling description text of "I'm so hot", the first target node word output by the preset instruction model is "air conditioning", and the second target node word is "lower the temperature to 16 degrees Celsius". The target vehicle instruction can be determined based on the first target node word and the second target node word, and the target vehicle instruction is "lower the air conditioning temperature to 16 degrees Celsius".

[0129] In an embodiment of the present invention, there may be a situation where the adjustment strength of multiple second words corresponding to the first target node words matches the first target node words. For example: for the first target node word "air conditioning", raising the temperature to 26 degrees Celsius and lowering the temperature to 16 degrees Celsius both match the first target node word of air conditioning. In this case, if the preset instruction model is a trained large language model, the preset instruction model can generate the probabilities of multiple second words, and the second words that exceed the preset probability can be used as the second target node words.

[0130] If the preset instruction model is an untrained large language model, the preset instruction model determines the probability of the example vehicle instruction becoming the target vehicle instruction by comparing the feeling intensity of the initial feeling description text and the feeling intensity of the example feeling description text, and comparing the adjustment intensity of at least one example vehicle instruction. According to the probability of the example vehicle instruction becoming the target vehicle instruction, the equivalent probability corresponding to the first word in the directed acyclic graph of the vehicle instruction can be determined, and then the first target node word is determined. For example, the initial feeling description text is "I am so hot", the probability of the example vehicle instruction "turn on the air conditioner" is 60%, and the probability of the example vehicle instruction "open the window" is 40%. Then, the equivalent probability of the first word of "air conditioner" is 60%, the equivalent probability of the first word of "window" is 40%, and the equivalent probability of the first word of "mobile phone" is 0. The preset probability can be 55%, and the air conditioner is the first target node word in the preset vehicle instruction directed acyclic graph. According to the vehicle command directed acyclic graph, the next second node words of the air conditioner include "open" and "close", and the second words generated by the preset command model include "open", "close", and "adjust the gear to 4th gear", among which "adjust the gear to 4th gear" does not match the air conditioner, and "open" and "close" match the air conditioner. According to the example vehicle command "turn on the air conditioner", it can be seen that the probability of the second node word "open" is 100%, the probability of "close" is 0, and the preset probability can be 50%, then the second target node word is "open".

[0131] In a specific example, the preset instruction model is an untrained large language model. When generating a word of the target vehicle instruction, a vector is first generated based on the example feeling description text and the example vehicle instruction corresponding to the example feeling description text. The vector includes the probability of each word in the vocabulary of the preset instruction model becoming a word of the target vehicle instruction. For example: the vocabulary of the preset instruction model contains 20,000 words, and the preset instruction model will generate a 20,000-dimensional vector. The data in this vector corresponds to the probability of all words in this vocabulary. The words to be output for the target vehicle instruction are selected based on the probability of each word in the vector:

[0132] The default command model is configured Figure 2The vehicle instruction directed acyclic graph is shown. When the user's initial feeling description text is "I'm so hot", after the preset instruction model generates the vector corresponding to the first word of the target vehicle instruction, it can be known through the vehicle instruction directed acyclic graph that the only first node words related to the control object that can be generated at present are "window" and "air conditioning". Then the preset instruction model sets the probability of the generated vector corresponding to other control object related words in the vehicle instruction directed acyclic graph to 0, and only "window" and "air conditioning" retain the probability. Then when generating the first target node word, only these two words can be selected. If the probability of "air conditioning" is greater, then continue to generate instructions. It can be known from the vehicle instruction directed acyclic graph that the next second target node word can only be selected from "open" and "close", and the probability of other control operation related words is set to 0, and so on.

[0133] In an embodiment of the present invention, the user's initial feeling description text is obtained; the initial feeling description text is input into a preset instruction model to obtain a first word of the target vehicle instruction; it is determined whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes a first node word and a second node word connected to the first node word by a directed edge; if so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text; the fused feeling description text is input into a preset instruction model to obtain a second word of the target vehicle instruction; it is determined whether the second word is a second node word; if so, the target vehicle instruction is generated according to the first node word and the second node word. All vehicle instructions are constructed into a vehicle instruction directed acyclic graph, and according to the vehicle instruction directed acyclic graph, a preset instruction model is used to generate a target vehicle instruction related to the user's initial feeling description text, so that the preset instruction model generates instructions existing on the vehicle instruction directed acyclic graph to improve the accuracy of the target vehicle instruction and ensure that the generated target vehicle instruction can be executed.

[0134] In the embodiment of the present invention, the probability of the preset instruction model outputting executable instructions is increased by setting the probability of the words in the vocabulary of the preset instruction model that do not belong to the vehicle instruction directed acyclic graph to 0. At the same time, it is ensured that the instructions generated by the preset instruction model are words on the vehicle instruction directed acyclic graph, that is, instructions that can definitely be executed, and no post-processing is required.

[0135] In an embodiment of the present invention, the preset instruction model can generate words of the target vehicle instruction one by one in the order of first node word-second node word, or first target node word-second target node word, thereby ensuring a streaming output method.

[0136] Reference Figure 3, shows a flowchart of the steps of another method for generating a vehicle instruction provided in an embodiment of the present invention, which may specifically include the following steps:

[0137] Step 301, start.

[0138] Step 302: User language input.

[0139] Step 303: Acquire text through ASR.

[0140] In an embodiment of the present invention, a voice assistant or microphone on a vehicle is used to receive a user's feeling description voice input, and the feeling description voice is converted into a feeling description text through ASR (Automatic Speech Recognition).

[0141] Step 304 , the preset instruction model generates instructions according to the vehicle instruction directed acyclic graph.

[0142] In an embodiment of the present invention, an initial feeling description text is input into a preset instruction model to obtain a first word of a target vehicle instruction; it is determined whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes a first node word and a second node word connected to the first node word by a directed edge; if so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text; the fused feeling description text is input into the preset instruction model to obtain a second word of the target vehicle instruction; it is determined whether the second word is a second node word; if so, the target vehicle instruction is generated according to the first node word and the second node word.

[0143] Step 305, stop.

[0144] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0145] Reference Figure 4 , shows a structural block diagram of a vehicle instruction generation device provided in an embodiment of the present invention, which may specifically include the following modules:

[0146] A text acquisition module 401 is used to acquire a user's initial feeling description text;

[0147] A first word obtaining module 402 is used to input the initial feeling description text into a preset instruction model to obtain a first word of the target vehicle instruction;

[0148] A first word determination module 403 is used to determine whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge;

[0149] A fusion module 404 is used to fuse the first node word with the initial feeling description text to obtain a fused feeling description text;

[0150] A second word obtaining module 405 is used to input the fusion feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction;

[0151] A second word determination module 406, configured to determine whether the second word is the second node word;

[0152] The target vehicle instruction generating module 407 is used to generate the target vehicle instruction according to the first node word and the second node word.

[0153] In an optional embodiment of the present invention, the device comprises:

[0154] An instruction conversion module, used for acquiring at least one vehicle instruction and converting the vehicle instruction into an instruction description text;

[0155] A splitting module is used to split the instruction description text into at least one instruction splitting word, and set the instruction splitting word on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

[0156] In an optional embodiment of the present invention, the first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

[0157] In an optional embodiment of the present invention, the instruction splitting words include: instruction triggering words and instruction ending words; the splitting module includes:

[0158] A first setting submodule, used for setting the instruction triggering word at the starting node of the directed path of the directed acyclic graph;

[0159] The second setting submodule is used to set the instruction end word at the terminal node of the directed path of the directed acyclic graph.

[0160] In an optional embodiment of the present invention, the first node word includes a first target node word; and the first word determination module includes:

[0161] A probability acquisition submodule, used to acquire the equivalent probability that the first word is the first node word;

[0162] The first word determination submodule is used to determine that the first word is a first target node word in a preset vehicle instruction directed acyclic graph if the equivalent probability is greater than a preset probability.

[0163] In an optional embodiment of the present invention, the second node word includes a second target node word; and the second word determination module includes:

[0164] An adjustment strength acquisition submodule, used to acquire the adjustment strength of each first node word corresponding to the second word;

[0165] The second word determination submodule is used to determine that the second word is a second target node word in a preset vehicle instruction directed acyclic graph if the matching degree between the adjustment strength and the first node word is greater than a preset matching degree.

[0166] In an optional embodiment of the present invention, the text acquisition module includes:

[0167] The voice acquisition submodule is used to acquire the user's feeling description voice;

[0168] The speech conversion submodule is used to convert the feeling description speech into the initial feeling description text.

[0169] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0170] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0171] Memory 503, used for storing computer programs;

[0172] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:

[0173] Obtain the user's initial feeling description text;

[0174] Inputting the initial feeling description text into a preset instruction model to obtain a first word of a target vehicle instruction;

[0175] Determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge;

[0176] If so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text;

[0177] Inputting the fused feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction;

[0178] Determining whether the second word is the second node word;

[0179] If so, the target vehicle instruction is generated according to the first node term and the second node term.

[0180] In an optional embodiment of the present invention, the method includes:

[0181] Obtain at least one vehicle command, and convert the vehicle command into a command description text;

[0182] The instruction description text is split into at least one instruction split word, and the instruction split word is set on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

[0183] In an optional embodiment of the present invention, the first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

[0184] In an optional embodiment of the present invention, the instruction splitting words include: instruction triggering words and instruction ending words; the instruction splitting words are set on each node of the directed acyclic graph, and each node is connected by a directed edge, including:

[0185] Setting the instruction trigger word at the starting node of the directed path of the directed acyclic graph;

[0186] The instruction end word is set at the terminal node of the directed path of the directed acyclic graph.

[0187] In an optional embodiment of the present invention, the first node word includes a first target node word; and the step of determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph includes:

[0188] Obtaining an equivalent probability that the first word is the first node word;

[0189] If the identical probability is greater than a preset probability, it is determined that the first word is a first target node word in a preset vehicle instruction directed acyclic graph.

[0190] In an optional embodiment of the present invention, the second node word includes a second target node word; and determining whether the second word is the second node word includes:

[0191] Obtaining the adjustment strength of each first node word corresponding to the second word;

[0192] If the matching degree between the adjustment strength and the first node word is greater than a preset matching degree, it is determined that the second word is a second target node word in the preset vehicle instruction directed acyclic graph.

[0193] In an optional embodiment of the present invention, the obtaining of the user's initial feeling description text includes:

[0194] Obtain the user's voice description of his / her feelings;

[0195] The feeling description speech is converted into the initial feeling description text.

[0196] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0197] The communication interface is used for communication between the above terminal and other devices.

[0198] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0199] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0200] like Figure 6 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 601 is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes a method for generating a vehicle instruction described in the above embodiment.

[0201] In another embodiment provided by the present invention, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer executes a method for generating a vehicle instruction described in the above embodiment.

[0202] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0203] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0204] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0205] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for generating a vehicle instruction, characterized in that: The method comprises: Obtain the user's initial feeling description text; Inputting the initial feeling description text into a preset instruction model to obtain a first word of a target vehicle instruction; Determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge; If so, the first node word is fused with the initial feeling description text to obtain a fused feeling description text; Inputting the fused feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction; Determining whether the second word is the second node word; If so, the target vehicle instruction is generated according to the first node term and the second node term.

2. The method according to claim 1, characterized in that The method comprises: Obtain at least one vehicle command, and convert the vehicle command into a command description text; The instruction description text is split into at least one instruction split word, and the instruction split word is set on each node of a directed acyclic graph. Each node is connected by a directed edge to obtain the vehicle instruction directed acyclic graph; the first node word is located at the starting point of the directed edge connection, and the second node word is located at the pointing point of the directed edge connection.

3. The method according to claim 2, characterized in that The first node word is a split word representing a control object of the vehicle instruction; and the second node word is a split word representing a control operation associated with the control object.

4. The method according to claim 2, characterized in that: The instruction splitting words include: instruction triggering words and instruction ending words; the instruction splitting words are set on each node of the directed acyclic graph, and each node is connected by a directed edge, including: Setting the instruction trigger word at the starting node of the directed path of the directed acyclic graph; The instruction end word is set at the terminal node of the directed path of the directed acyclic graph.

5. The method according to claim 1, characterized in that The first node word includes a first target node word; and the step of determining whether the first word is a first node word in a preset vehicle instruction directed acyclic graph includes: Obtaining an equivalent probability that the first word is the first node word; If the identical probability is greater than a preset probability, it is determined that the first word is a first target node word in a preset vehicle instruction directed acyclic graph.

6. The method according to claim 5, characterized in that The second node words include a second target node word; The determining whether the second word is the second node word comprises: Obtaining the adjustment strength of each first node word corresponding to the second word; If the matching degree between the adjustment strength and the first node word is greater than a preset matching degree, it is determined that the second word is a second target node word in the preset vehicle instruction directed acyclic graph.

7. The method according to claim 1, characterized in that The obtaining of the user's initial feeling description text includes: Obtain the user's voice description of his / her feelings; The feeling description speech is converted into the initial feeling description text.

8. A vehicle instruction generating device, characterized in that: The device comprises: A text acquisition module is used to obtain the user's initial feeling description text; A first word obtaining module, used for inputting the initial feeling description text into a preset instruction model to obtain a first word of the target vehicle instruction; A first word determination module is used to determine whether the first word is a first node word in a preset vehicle instruction directed acyclic graph; the preset vehicle instruction directed acyclic graph includes the first node word and a second node word connected to the first node word through a directed edge; a fusion module, configured to fuse the first node word with the initial feeling description text to obtain a fused feeling description text; A second word obtaining module, used for inputting the fusion feeling description text into the preset instruction model to obtain a second word of the target vehicle instruction; A second word determination module, used to determine whether the second word is the second node word; The target vehicle instruction generating module is used to generate the target vehicle instruction according to the first node word and the second node word.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. One or more computer-readable media having instructions stored thereon, which when executed by one or more processors cause the processors to perform the method according to any one of claims 1 to 7.