Data processing method and device, computer equipment, storage medium and program product

By converting voice commands into text information and using vector matching of preset action classification library to generate target action commands, the problem of low accuracy of user voice command processing in the prior art is solved, and more efficient voice command processing and recognition are achieved .

CN119207399AActive Publication Date: 2024-12-27GUANGZHOU XIAOPENG MOTORS TECH CO LTD

Patent Information

Application Number
CN202411259393.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-27
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

In the prior art, the user voice command processing method requires a predefined grammar rule tree and a normalized vocabulary list, which leads to errors when the user voice command exceeds the predefined range, and the model training cost is high, especially when many actions are executed, the large language model is The accuracy rate is reduced.

Method used

By converting voice instructions into text information, and determining the target action category based on the vector matching of the preset action classification library, generating responding target action instructions, avoiding the process of building a syntax rule tree and normalized vocabulary list, and using JSON format to organize data To improve accuracy.

Benefits of technology

It improves the accuracy and efficiency of voice command processing, avoids the problems caused by incomplete construction of grammar rule trees, and significantly improves the recognition rate and accuracy of voice commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207399A_ABST
    Figure CN119207399A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: receiving a voice instruction to be responded; converting the voice instruction into text information; based on the text information and a vector matching result described by a plurality of preset instructions in a preset action classification library, determining a target action category corresponding to the text information; generating a target action instruction responding to the voice instruction according to the text information and the target action category; wherein the preset action classification library is used for representing a first mapping relationship between a plurality of preset action categories and preset instruction description. Therefore, the action category of the target action is determined based on vector matching, the process of constructing a grammar rule tree and a normalized word list in related technologies is effectively avoided, the data processing time of the voice instruction is shortened, and the problem caused by incomplete construction of the grammar rule tree and the like is effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle intelligent interactive control, and in particular to a data processing method, device, computer equipment, storage medium and program product. Background Art

[0002] With the continuous development of artificial intelligence, common intelligent control centers such as smart speakers and vehicle hosts can connect to more and more devices, such as speakers, air conditioners, doors and windows, etc. Users can issue commands to the intelligent control center through voice, and then control the target device to perform specific operations in response to the user's voice, such as starting air conditioning and cooling.

[0003] However, the method for processing user voice commands in the related art requires pre-defining grammar rule trees, normalized vocabulary, etc. If the voice command issued by the user exceeds the predefined range, it is easy to cause errors in the processing of user voice commands, especially the processing method based on rule-driven classification of user commands. In addition, the method for processing user voice commands in the related art also requires manual construction of a large amount of training data to train the classification model of user commands, and the model needs to be retrained when the actions that the device can perform change. The model training cost is high, especially the classification model for classifying user commands. Furthermore, when using a large natural language model for classification, if the number of execution actions is too large, it is easy to cause the prompt word to be too long. When the semantics of different execution actions are similar, the accuracy of the large language model selection is reduced. Summary of the invention

[0004] In view of this, the present invention provides a data processing method, apparatus, computer device, storage medium and program product to solve or partially solve the problem of low accuracy in responding to user voice commands in the related art.

[0005] In a first aspect, the present invention provides a data processing method, the method comprising:

[0006] receiving a voice command to be responded to;

[0007] Convert voice commands into text messages;

[0008] Determine the target action category corresponding to the text information based on the vector matching results between the text information and multiple preset instruction descriptions in the preset action classification library;

[0009] generating a target action instruction in response to the voice instruction according to the text information and the target action category;

[0010] The preset action classification library is used to characterize a first mapping relationship between a plurality of preset action categories and preset instruction descriptions. Based on the vector matching results between the text information and the plurality of preset instruction descriptions in the preset action classification library, the target action category corresponding to the text information is determined, wherein the preset action classification library is used to characterize a first mapping relationship between a plurality of preset action categories and preset instruction descriptions.

[0011] The data processing method provided by the embodiment of the present invention receives a voice instruction to be responded to, converts the voice instruction into text information, performs vector matching on the text information and multiple preset instruction descriptions in the preset action classification library, and determines the target action category corresponding to the text information based on the vector matching result, and then generates a target action instruction in response to the voice instruction according to the text information and the target action category. Thus, the action category of the target action is determined based on vector matching, which effectively avoids the process of constructing a grammar rule tree and a normalized vocabulary in the related technology, improves the data processing time for the voice instruction, and effectively avoids the problem caused by the incomplete construction of the grammar rule tree, etc.

[0012] In an optional implementation, the preset action classification library is further used to characterize a second mapping relationship between multiple preset action categories and preset action attribute information; generating a target action instruction in response to the voice instruction according to the text information and the target action category, including:

[0013] Acquire at least one action attribute information corresponding to the target action category;

[0014] Generate target action instructions according to text information and action attribute information;

[0015] The action attribute information is used to characterize the action parameters for executing the target action.

[0016] The data processing method provided by the embodiment of the present invention obtains at least one action attribute information corresponding to the target action category, and generates a target action instruction according to the text information and the action attribute information. Based on the action category, the action attribute information corresponding to the target action instruction of the voice instruction is accurately obtained, and the target action instruction is generated based on the text information and the action attribute information of the voice instruction. The accuracy of the target action instruction in response to the voice instruction is significantly improved.

[0017] In an optional implementation, generating a target action instruction according to text information and action attribute information includes: converting at least one action attribute information combination into an executable target action instruction according to a set combination conversion rule.

[0018] The data processing method provided by the embodiment of the present invention determines the target action category based on the voice command, and then, for a target action category, according to the set combination conversion rule, combines and converts at least one action attribute information of the target action category into an executable target action instruction. Therefore, after determining the target action category, it is only necessary to combine and convert the action attribute information corresponding to the target action category according to the set combination conversion rule to obtain the executable target action instruction, avoiding the processing process based on the grammar rule tree and the normalized vocabulary, thereby effectively avoiding the problems caused by the imperfect construction of the grammar rule tree and the normalized vocabulary in the natural language understanding process in the related technology, thereby avoiding the problems such as the inability to recognize the voice command, and significantly improving the data processing efficiency and accuracy of the voice command.

[0019] In an optional implementation, according to a set combination conversion rule, at least one action attribute information is combined and converted into an executable target action instruction, including:

[0020] For the target action category, based on the set combination conversion rules, the action attribute information related to the target action category is extracted;

[0021] The extracted action attribute information is converted into a target action instruction in a set format.

[0022] The data processing method provided by the embodiment of the present invention extracts action attribute information and converts target action instructions for each target action category, and effectively identifies and processes multiple target action instructions in voice instructions.

[0023] In an optional implementation, the format is set to JSON format.

[0024] The data processing method provided in the embodiment of the present invention organizes data and standardizes output in JSON format, making full use of the strict hierarchical characteristics of the JSON format itself, and can better handle the hierarchical relationship between different contents of voice commands, effectively improving the accuracy of determined target action commands.

[0025] In an optional implementation, the text information is represented by an input vector, and the plurality of preset instruction descriptions are represented by preset description vectors;

[0026] Based on the vector matching results between the text information and multiple preset instruction descriptions in the preset action classification library, the target action category corresponding to the text information is determined, including:

[0027] Based on the vector similarities between the input vector and a plurality of preset description vectors, at least one action category whose vector similarity with the input vector meets a set similarity condition is determined as a target action category corresponding to the text information.

[0028] In one embodiment of the present invention, the method also includes: before receiving the voice command to be responded to, extracting core words of multiple preset actions based on the device that performs the preset action and / or the function that performs the preset action; and configuring a preset action classification library based on the core words.

[0029] The data processing method provided by the embodiment of the present invention determines the target action category based on the vector similarity between the input vector and multiple preset description vectors. There is no need to pre-build a grammar rule tree and a normalized vocabulary, etc., thereby fundamentally avoiding a series of problems caused by the imperfect construction of grammar tree rules, etc., thereby effectively improving the recognition rate and recognition accuracy of voice commands, thereby obtaining more accurate target action instructions.

[0030] In a second aspect, the present invention provides a data processing device, the device comprising:

[0031] A receiving module, used for receiving a voice command to be responded to;

[0032] A conversion module, used for converting voice commands into text information;

[0033] A matching module, used to determine a target action category corresponding to the text information based on a vector matching result between the text information and a plurality of preset instruction descriptions in a preset action classification library;

[0034] A generating module, for generating a target action instruction in response to a voice instruction according to the text information and the target action category;

[0035] The preset action classification library is used to represent a first mapping relationship between a plurality of preset action categories and preset instruction descriptions.

[0036] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data processing method of the first aspect or any corresponding embodiment thereof.

[0038] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data processing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;

[0041] Figure 2 is a flow chart of another data processing method according to an embodiment of the present invention;

[0042] Figure 3 is a flowchart of a specific application example of the data processing method according to an embodiment of the present invention;

[0043] Figure 4 is a structural block diagram of a data processing device according to an embodiment of the present invention;

[0044] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0046] At present, the application of intelligent devices to recognize the user's voice commands and automatically perform corresponding actions is becoming more and more widespread, for example: controlling the air conditioner switch, air conditioner temperature adjustment, lamp switch and lamp brightness adjustment through the smart speaker of the smart home system, and controlling the vehicle's audio, air conditioning, doors and windows through the vehicle's host system. For smart speaker applications in smart homes, vehicle host systems, etc., the probability of updating the devices that can be controlled and the actions that can be performed by the devices is high. In order to avoid retraining the model or supplementing the predefined grammatical rule tree, normalized vocabulary and other contents when the devices controlled by the device or system and the actions that can be performed by the device change. At the same time, avoid using the natural language large language model for classification. If the number of execution actions is too large, it is easy to cause the prompt word to be too long. When the semantics of different execution actions are similar, the accuracy of the large language model selection is reduced. An embodiment of the present invention provides a data processing method.

[0047] According to an embodiment of the present invention, a data processing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. The method can be configured in a cloud server, and the voice collection device of the user end such as the user's car end or the smart speaker receives the user's voice command and sends the voice command to the server.

[0048] In this embodiment, a data processing method is provided, which can be used for the above-mentioned server, etc. Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0049] Step S101, receiving a voice instruction to be responded to.

[0050] In this embodiment of the present invention, the user's voice command can be received by a user terminal such as a smart speaker or a voice collection device of the vehicle. For example: Xiao P, please turn on the air conditioner.

[0051] Step S102: converting the voice command into text information.

[0052] In this embodiment of the present invention, technologies such as natural language understanding and natural language recognition can be used to convert voice instructions into text information.

[0053] Step S103, determining the target action category corresponding to the text information based on the vector matching results between the text information and multiple preset instruction descriptions in the preset action classification library, wherein the preset action classification library is used to characterize a first mapping relationship between multiple preset action categories and preset instruction descriptions.

[0054] In some optional implementations, multiple action categories of the preset action classification library can be determined based on the execution device that executes the preset action and the function or effect brought about by the execution of the preset action. For example: in the instructions for the vehicle, the action category of air conditioning temperature adjustment, the instructions whose execution device is air conditioning and the effect of the execution action is temperature change are uniformly classified as "air conditioning temperature adjustment". In this way, when generating or determining the execution action, the rules for generating the target action instruction can be configured based on the common characteristics such as the equipment or parameters that need to be determined for this action category, so as to quickly and accurately generate the target action instruction.

[0055] In some optional implementations, the text information is represented by an input vector, and the plurality of preset instruction descriptions are represented by preset description vectors. The above step S103 may include:

[0056] Step S1031, based on the vector similarities between the input vector and a plurality of preset description vectors, at least one action category whose vector similarity with the input vector meets a set similarity condition is determined as a target action category corresponding to the text information.

[0057] Specifically, the plurality of preset action categories may be represented by core words corresponding to the action categories. Table 1 below shows an example of a first mapping relationship for representing the plurality of preset action categories and preset instruction descriptions.

[0058] In order to illustrate the scheme here, multiple preset instruction descriptions are shown in text. In actual applications, in the first mapping relationship, multiple preset instruction descriptions can also be directly represented in the form of vectors. It is also possible to add preset description vector representations of multiple preset instruction descriptions while retaining the preset instruction descriptions in text form, so as to more conveniently update and maintain the preset action classification library. Here, a preset action category can correspond to multiple preset instruction descriptions. The preset action library can include multiple action categories. When the equipment such as air conditioners controlled by smart devices such as smart speakers and the actions they perform change, it is only necessary to update the preset instruction descriptions and the corresponding action categories in the preset action classification library.

[0059] Table 1 Example of the first mapping relationship

[0060]

[0061] Furthermore, when determining the target action category, the vector similarity between the input vector used to represent the text information and multiple preset description vectors can be determined first, and then the action category corresponding to at least one preset description vector whose vector similarity with the input vector meets the set similarity condition can be determined as the target action category corresponding to the text information.

[0062] Specifically, here, the vector similarities between the input vector and multiple preset description vectors can be sorted, and a set number of action categories can be taken as target action categories according to the order of vector similarities from large to small. For example, 3. It is also possible to take only the action category corresponding to the preset description vector with the highest vector similarity to the input vector as the target action category. It is also possible to take the action category with a vector similarity greater than a set value to the input vector as the target action category. The number of target action categories is not limited here, and can be 1 or more.

[0063] Step S104: generating a target action instruction in response to the voice instruction according to the text information and the target action category.

[0064] In some optional implementations, the multiple action categories of the preset action classification library are mainly determined based on the execution device that executes the preset action and the function or effect brought about by the execution of the preset action. For example: in the instructions for the vehicle, the action category of air conditioning temperature adjustment, the instructions whose execution device is air conditioning and the effect of the execution action is temperature change are uniformly classified as "air conditioning temperature adjustment". Therefore, when generating or determining the execution action, the rules for generating the target action instruction can be configured based on the common characteristics such as the equipment or parameters that need to be determined for this action category, so as to quickly and accurately generate the target action instruction.

[0065] For example, for a voice command with the action category of "light switch", when generating the target action command, the large language model can be used to determine that the execution device of the execution command is the light, and further extract the headlight, clearance light, automatic headlight and other information used to characterize the position of the light from the text information converted from the voice command, so as to accurately determine the target execution action. For other action categories, the corresponding rules can also be configured in the large language model used to generate the target action command, so as to quickly and accurately generate the target action command.

[0066] The data processing method provided by the embodiment of the present invention receives a voice instruction to be responded to, converts the voice instruction into text information, performs vector matching on the text information and multiple preset instruction descriptions in the preset action classification library, and determines the target action category corresponding to the text information based on the vector matching result, and then generates a target action instruction in response to the voice instruction according to the text information and the target action category. Thus, the action category of the target action is determined based on vector matching, which effectively avoids the process of constructing a grammar rule tree and a normalized vocabulary in the related technology, improves the data processing time for the voice instruction, and effectively avoids the problem caused by the incomplete construction of the grammar rule tree, etc.

[0067] In this embodiment, a data processing method is provided, which can be used for the above-mentioned server, etc. Figure 2 is a flow chart of a data processing method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0068] Step S201 : extracting core words of a plurality of preset actions based on a device that performs the preset action and / or a function that performs the preset action.

[0069] In an optional embodiment of the present invention, in order to solve the problem that there may be a large number of actions involved in the execution of voice instructions, and the functional effects of some executed actions are difficult to distinguish. When configuring the preset action classification library, the core words of multiple preset actions can be extracted based on the device that executes the preset action and / or the function that executes the preset action. Then, based on the determined core words, the preset action classification library is further configured.

[0070] In an optional implementation of the present invention, core words of multiple preset actions may be extracted based on at least one of a device for performing the preset action and a function for performing the preset action.

[0071] Specifically, the actions that can be performed by smart devices that can be connected and controlled by communication, such as smart speakers and vehicle control systems, can be predetermined. Therefore, here we can first classify based on the execution devices of multiple preset actions. For example: car lights, air conditioners, car doors, etc. For preset actions that do not have specific execution devices, such as driving modes. Virtual devices can be used as execution devices for preset actions, and then the preset actions can be classified according to the different functions of the devices.

[0072] For example, the execution device of the preset action "turn on the air conditioner" is the air conditioner, and the function of turning on the air conditioner is the switch. The execution device of the preset action "turn off the air conditioner" is also the air conditioner, and the function of turning off the air conditioner is also the switch. Therefore, these two preset actions can be classified into the same action category.

[0073] The action category can be represented in the form of a core word, and the numbering of the action category can also be added. In order to ensure the recognizability of the action classification, the preset actions are classified according to the execution devices and functions of multiple preset actions, and the core words of the preset actions are extracted based on the execution devices and functions of multiple preset actions. Furthermore, in order to ensure the distinction of the action classification, it is guaranteed to the maximum extent that the voice instructions can match the reasonable action category. Here, for each action category, an instruction description is also added, and the specific execution degree, effect, and alias of the function of the preset action can be added to the preset instruction description. For example: the execution device of the preset action is air conditioning, and the function of executing the preset action is temperature adjustment. The preset instruction description may include a specific temperature range or specific effects of temperature adjustment such as temperature increase and temperature reduction. An example of the core word extraction basis and extraction results is shown in Table 2 below.

[0074] Step S202: configuring a preset action classification library based on the core words.

[0075] In an optional embodiment of the present invention, a sentence vector model can be used to convert core words of all action categories and preset instruction descriptions into vectors for storage, so as to facilitate the calculation of the vector similarity between the input vector and the preset instruction description.

[0076] The data processing method provided by the embodiment of the present invention determines the target action category based on the vector similarity between the input vector and multiple preset description vectors. There is no need to pre-build a grammar rule tree and a normalized vocabulary, etc., thereby fundamentally avoiding a series of problems caused by the imperfect construction of grammar tree rules, etc., thereby effectively improving the recognition rate and recognition accuracy of voice commands, thereby obtaining more accurate target action instructions.

[0077] Table 2 Core word extraction basis and extraction result examples

[0078]

[0079] Step S203, receiving a voice instruction to be responded to.

[0080] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0081] Step S204: convert the voice command into text information.

[0082] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0083] Step S205, based on the vector matching results between the text information and multiple preset instruction descriptions in the preset action classification library, determine the target action category corresponding to the text information, wherein the preset action classification library is used to characterize a first mapping relationship between multiple preset action categories and preset instruction descriptions.

[0084] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0085] Step S206: Generate a target action instruction in response to the voice instruction according to the text information and the target action category.

[0086] In some optional implementations, the preset action classification library is further used to characterize a second mapping relationship between multiple preset action categories and preset action attribute information, and the above step S206 may include:

[0087] Step S2061: Acquire at least one piece of action attribute information corresponding to the target action category, wherein the action attribute information is used to characterize action parameters for executing the target action.

[0088] In an optional embodiment of the present invention, action attribute information is pre-configured based on each action category. For example, if the action category is a window switch, then when executing the action, it is necessary to determine the device that executes the action, the position of the window, the opening ratio, etc. The action parameters for executing these target actions are referred to as action attribute information. For multiple preset action categories, action attribute information and the correspondence between the action attribute information and the action category are pre-configured. Table 3 below is an exemplary description of a preset action classification library, showing the relationship between multiple preset action categories and preset action attribute information. Furthermore, in Table 3, specific action execution instructions are also shown in the form of samples.

[0089] After determining the action category corresponding to the text information of the voice command, at least one action attribute information included in the action category can be determined based on the pre-configured preset action classification library. It should be noted that the action attribute information in the preset action classification library can be shown as parameter names or options, for example, "device": ["window"], "position": ["driver", "passenger", "left rear", "right rear"], "opening ratio": ["full open", "full closed", "value of 0-100"], etc.

[0090] Table 3 Examples of preset action classification libraries

[0091]

[0092]

[0093] In order to better explain the above Table 3, the following Figure 4 The definitions of "core words of action categories", "preset instruction descriptions", "action attribute information" and "samples" in the preset action classification library are explained, as well as the reasons for configuring the above contents.

[0094] Table 4 Content definition and content configuration reasons of the preset action classification library

[0095]

[0096] Step S2062: Generate a target action instruction according to the text information and action attribute information.

[0097] Based on the action attribute information determined in step S2062, the specific value corresponding to each action attribute information is obtained from the text information. For example, the value of the attribute information of the opening ratio of the window switch is 50%. Here, the specific values ​​of "50%" can be determined based on the pre-configured text information recognition rules. For example: if the text information is "open the right rear window halfway", the opening ratio is recognized as 50%, and if the text information is "open the right rear window slightly", the opening ratio is recognized as 30%. These detailed rules can be selectively configured according to actual conditions.

[0098] In an optional implementation, at least one action attribute information combination may be converted into an executable target action instruction according to a set combination conversion rule.

[0099] Specifically, for the target action category, based on the set combination conversion rule, action attribute information related to the target action category can be extracted, and the extracted action attribute information can be converted into a target action instruction in a set format.

[0100] For example, the execution device of the target action instruction in the text information can be extracted first, and then other attribute information can be extracted. The combination conversion rules set here can include the extraction order of action attribute information, and the common part rules for multiple action categories can be set. For example: for the location information involved in "window switch" and "air conditioning switch", it can be configured as a "common part" extraction rule.

[0101] In an optional implementation, the format is set to JSON format. And the target action instructions in JSON format and the actions that can be executed by the device can be pre-configured. For example, the corresponding relationship between the JSON action instructions and the executable actions is shown in Table 5 below.

[0102] Table 5: Correspondence between JSON action instructions and executable actions.

[0103]

[0104] The data processing method provided in the embodiment of the present invention organizes data and standardizes output in JSON format, making full use of the strict hierarchical characteristics of the JSON format itself, and can better handle the hierarchical relationship between different contents of voice commands, effectively improving the accuracy of determined target action commands.

[0105] The above specific process of generating target action instructions can be trained and applied in the form of a large language model. The core words of the above action categories, preset instruction descriptions, action attribute information and examples can all be used as prompt words for the large language model.

[0106] For example, the following is a specific example of extracting a prompt word list for generating a target action instruction based on a set combination conversion rule. The example is shown in Python format.

[0107] As an intelligent voice assistant, you need to complete the following steps. You are processing a vehicle-related command.

[0108] 1. Select a function: Please select a function from ["window switch", "air conditioning switch", "light switch"]. You are not allowed to generate your own function, and it is not allowed to be empty.

[0109] The functional differences are as follows:

[0110] "Window switch": The window switch can control the raising and lowering of all vehicle windows, including the driver's seat, co-driver's seat, left rear and right rear windows.

[0111] "Air conditioning switch": turn the air conditioning on or off, and control the air conditioning of the entire vehicle at the same time, including the air conditioning in the driver's seat, co-driver's seat, left rear, and right rear seats.

[0112] "Headlight switch": The headlight switch controls the switches of the headlights, car lights, width lights and low beam lights.

[0113] 2. Based on your selection in the previous step, complete the following steps:

[0114] ”'

[0115] -If you select "Window switches", make the following selections:

[0116] 1. Select "Device": The fixed value is: "Window".

[0117] 2. Select "Position": Refer to the <Door Position> extraction rules in the [Public Section].

[0118] 3. Select "Open ratio": select one from ['Full open', 'Full closed', 'Value between 0-100']. You are not allowed to generate it yourself, and it is not allowed to be empty.

[0119] 4. The output is in JSON format, using the selected capabilities such as "device" and "location" as keys and the extracted content as values.

[0120] -If you select "Air conditioning switch", please make the following selections:

[0121] 1. Select "Equipment": the fixed value is: "Air Conditioning".

[0122] 2. Select "Action": refer to the <Action> extraction rules in the [Public Section].

[0123] 3. The output format is JSON, using the selected capabilities such as "device" and "action" as keys and the extracted content as values.

[0124] -If you select "Light switch", please make the following selections:

[0125] 1. Select "Equipment": Select one from ['Headlight', 'Low Beam', 'Width Light', 'Automatic Headlight']. You are not allowed to generate it yourself, and it is not allowed to be empty.

[0126] 2. Select "Action": refer to the <Action> extraction rules in the [Public Section].

[0127] 3. The output format is JSON, using the selected capabilities such as "device" and "action" as keys and the extracted content as values.

[0128] ”'

[0129] 3. [Public Part]:

[0130] -Extraction rules for <door position>:

[0131] ”'

[0132] Please select one from the following list first, ["Driver", "Passenger", "Left rear", "Right rear"]

[0133] If none of the above options are suitable, select one from ["whole car","front row","back row","left side","right side","any position"]

[0134] You must select from the above two lists. You are not allowed to generate your own. It can be empty.

[0135] ”'

[0136] -Extraction rules for <action>:

[0137] ”'

[0138] Select one from ["Open", "Close"]. It is not allowed to generate by yourself or leave it blank.

[0139] ”'

[0140] Here is an example:

[0141] ”'

[0142] Command: "Open the driver's window"

[0143] Output: "{'device':'window','position':'driver','opening ratio':'full open'}"

[0144] Command: "Turn on the air conditioner"

[0145] Output: "{'device':'air conditioner','action':'open'}"

[0146] Command: "Turn on low beam"

[0147] Output: "{'device':'low beam','action':'turn on'}"

[0148] ”'

[0149] Please refer to the above steps and examples to extract and output JSON for the following instructions. Please output the JSON format that can be parsed:

[0150] ”'

[0151] Command: "Open the driver's window"

[0152] Output: ''

[0153] The data processing method provided by the embodiment of the present invention extracts action attribute information and converts target action instructions for each target action category, and effectively identifies and processes multiple target action instructions in voice instructions.

[0154] The data processing method provided by the embodiment of the present invention determines the target action category based on the voice command, and then, for a target action category, according to the set combination conversion rule, combines and converts at least one action attribute information of the target action category into an executable target action instruction. Therefore, after determining the target action category, it is only necessary to combine and convert the action attribute information corresponding to the target action category according to the set combination conversion rule to obtain the executable target action instruction, avoiding the processing process based on the grammar rule tree and the normalized vocabulary, thereby effectively avoiding the problems caused by the imperfect construction of the grammar rule tree and the normalized vocabulary in the natural language understanding process in the related technology, thereby avoiding the problems such as the inability to recognize the voice command, and significantly improving the data processing efficiency and accuracy of the voice command.

[0155] In this embodiment, a specific application example of a data processing method is provided, which can be used in a server, etc. Figure 3 is a flowchart of a specific application example of the data processing method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0156] Step S301, pre-configure a preset action classification library.

[0157] Specifically, the above step S301 includes:

[0158] Step S3011, classify multiple preset actions.

[0159] Step S3012, determining the action category corresponding to each preset action, the core word of the action category and the preset instruction description of the action category.

[0160] Step S3013, determining a preset description vector of a preset instruction description.

[0161] Step S3014, determining the action attribute information of each action category.

[0162] Step S3015: pre-configure large language model prompt words of action categories.

[0163] Step S302: pre-search instruction.

[0164] Specifically, step S302 includes:

[0165] Step S3021, receiving a voice instruction to be responded to, and converting the voice instruction into text information.

[0166] Step S3022, converting the text information into an input vector.

[0167] Step S3023, determining the vector similarity between the text information and the preset description vectors of the plurality of preset instruction descriptions in the preset action classification library.

[0168] Step S303, based on large model reasoning, obtain the target action instruction.

[0169] Specifically, step S303 may include:

[0170] Step S3031, based on the vector similarity, determine the target action category corresponding to the voice instruction.

[0171] Step S3032: Determine the prompt word of the large language model based on the determined action category.

[0172] Step S3033: Generate an executable target action instruction based on the prompt word and text information.

[0173] For other implementation details of steps S301 to S303, see Figure 1 and Figure 2 The relevant implementation details will not be repeated here.

[0174] The present invention adopts the method of action category pre-retrieval to effectively extract the effective information of the voice instruction before generating the executable target action instruction based on the large language model, and effectively shorten the length of the prompt word of the large language model. In addition, vectors are used to represent the semantics of the voice instruction, and the semantic similarity is measured by vector similarity, which avoids the construction of grammar rule trees and normalized vocabulary, and effectively avoids the error of not being able to recognize instructions due to imperfect rule construction. Furthermore, through the reasonable configuration of action attribute information, the problem of recognition errors of multiple actions can be avoided.

[0175] In the present embodiment, a data processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0176] This embodiment provides a data processing device, such as Figure 4 As shown, including:

[0177] Receiving module 401, used for receiving a voice instruction to be responded to;

[0178] A conversion module 402, used to convert the voice command into text information;

[0179] A matching module 403, for determining a target action category corresponding to the text information based on a vector matching result between the text information and a plurality of preset instruction descriptions in a preset action classification library;

[0180] A generating module 404, for generating a target action instruction in response to the voice instruction according to the text information and the target action category;

[0181] The preset action classification library is used to represent a first mapping relationship between a plurality of preset action categories and preset instruction descriptions.

[0182] In some optional implementations, the preset action classification library is further used to characterize a second mapping relationship between multiple preset action categories and preset action attribute information; the generation module 404 includes:

[0183] An attribute acquisition unit, used to acquire at least one action attribute information corresponding to the target action category;

[0184] A generating unit, used for generating a target action instruction according to the text information and the action attribute information;

[0185] The action attribute information is used to characterize the action parameters for executing the target action.

[0186] In an optional implementation, the generating unit includes:

[0187] The combination conversion subunit is used to convert at least one action attribute information into an executable target action instruction according to a set combination conversion rule.

[0188] In an optional implementation, the combination conversion subunit converts at least one action attribute information into an executable target action instruction according to a set combination conversion rule, including:

[0189] For the target action category, based on the set combination conversion rules, the action attribute information related to the target action category is extracted;

[0190] The extracted action attribute information is converted into a target action instruction in a set format.

[0191] In an optional implementation, the format is set to JSON format.

[0192] In an optional implementation, the text information is represented by an input vector, and the plurality of preset instruction descriptions are represented by preset description vectors;

[0193] The matching modules include:

[0194] The similarity matching unit is used to determine at least one action category whose vector similarity with the input vector meets the set similarity condition as the target action category corresponding to the text information based on the vector similarity between the input vector and multiple preset description vectors.

[0195] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0196] The data processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0197] The embodiment of the present invention also provides a computer device having the above Figure 4 The data processing device shown.

[0198] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0199] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0200] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0201] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0202] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0203] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0204] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0205] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0206] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data processing method, characterized in that: The method comprises: receiving a voice command to be responded to; Converting the voice command into text information; Determining a target action category corresponding to the text information based on a vector matching result between the text information and a plurality of preset instruction descriptions in a preset action classification library; generating a target action instruction in response to the voice instruction according to the text information and the target action category; The preset action classification library is used to characterize a first mapping relationship between a plurality of preset action categories and preset instruction descriptions.

2. The method according to claim 1, characterized in that The preset action classification library is also used to characterize a second mapping relationship between a plurality of preset action categories and preset action attribute information; The step of generating a target action instruction in response to the voice instruction according to the text information and the target action category includes: Acquire at least one action attribute information corresponding to the target action category; Generate the target action instruction according to the text information and the action attribute information; The action attribute information is used to characterize the action parameters for executing the target action.

3. The method according to claim 2, characterized in that The step of generating the target action instruction according to the text information and the action attribute information includes: According to the set combination conversion rule, at least one of the action attribute information is combined and converted into the executable target action instruction.

4. The method according to claim 3, characterized in that The step of converting at least one action attribute information into an executable target action instruction according to a set combination conversion rule includes: For a target action category, based on the set combination conversion rule, extracting action attribute information related to the target action category; The extracted action attribute information is converted into a target action instruction in a set format.

5. The method according to claim 4, characterized in that The setting format is JSON format.

6. The method according to claim 1, characterized in that The text information is represented by an input vector, and the plurality of preset instruction descriptions are represented by preset description vectors; The determining the target action category corresponding to the text information based on the vector matching result between the text information and a plurality of preset instruction descriptions in a preset action classification library comprises: Based on the vector similarity between the input vector and the plurality of preset description vectors, at least one action category whose vector similarity with the input vector meets a set similarity condition is determined as a target action category corresponding to the text information.

7. The method according to any one of claims 1 to 6, characterized in that Before receiving the voice instruction to be responded to, the method further includes: Extracting a plurality of core words of the preset actions based on a device that performs the preset actions and / or a function that performs the preset actions; Based on the core words, the preset action classification library is configured.

8. A data processing device, characterized in that: The device comprises: A receiving module, used for receiving a voice command to be responded to; A conversion module, used to convert the voice command into text information; A matching module, configured to determine a target action category corresponding to the text information based on a vector matching result between the text information and a plurality of preset instruction descriptions in a preset action classification library; A generating module, configured to generate a target action instruction in response to the voice instruction according to the text information and the target action category; The preset action classification library is used to characterize a first mapping relationship between a plurality of preset action categories and preset instruction descriptions.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data processing method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data processing method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Voice instruction recognition method, electronic equipment and non-transient computer readable storage medium

    CN115039169A

  • Voice interaction method and device, model training method, vehicle and storage medium

    CN117690433A

  • Equipment control method and device based on voice instruction and electronic equipment

    CN117789725A

  • Conversational recovery for voice user interface

    US10762903B1

  • Man-machine interaction method and apparatus, and man-machine interaction terminal

    WO2018219198A1

Cited By

  • Voice interaction method, server and computer readable storage medium

    CN119993148A