Travel strategy making method and device, electronic equipment and readable storage medium
Through the domain classification of voice commands and the determination of travel requirements, detailed travel strategies are generated, which solves the problems of time-consuming and labor-intensive development of travel strategies and information omissions in the existing technology, and improves the user experience.
Patent Information
- Application Number
- CN202310960007.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
The process of formulating existing travel guides is time-consuming and labor-intensive, which can easily lead to information omission and poor user experience.
By obtaining the user's voice commands, domain classification is carried out to determine the target field, and when traveling recommendation field, users' travel needs information are determined, and detailed travel guides are generated based on this information.
It has achieved a complete and detailed travel guide for users based on a voice command from the user, saving time and effort, avoiding information omissions, and improving user experience.
Smart Images

Figure CN119446129A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of travel strategy formulation, and more specifically, to a travel strategy formulation method, device, electronic device and readable storage medium in the field of travel strategy formulation. Background Art
[0002] As people's quality of life continues to improve, more and more people begin to like traveling. During the travel process, they can not only relax their body and mind, but also broaden their horizons and learn various humanities and geographical knowledge.
[0003] Currently, when a user wants to travel and makes a travel guide through an electronic device, the electronic device obtains the user's instructions. When the user's instructions include the name of a region, the electronic device will make travel recommendations based on the user's instructions. The travel recommendation results are simple and broad. If the user needs to further obtain a more detailed travel guide, the user needs to send multiple instructions to the electronic device to achieve the travel guide the user expects, which makes the travel guide formulation process time-consuming and labor-intensive, and easily causes information omissions, resulting in a poor user experience. Summary of the invention
[0004] The present application provides a travel strategy formulation method, device, electronic device and readable storage medium, which can solve the problems that the existing travel strategy formulation process is time-consuming and labor-intensive, easily causes information omissions, and has a poor user experience.
[0005] In a first aspect, a travel strategy formulation method is provided, the method comprising:
[0006] Get the user's voice command;
[0007] Performing domain classification on the voice command to obtain a target domain corresponding to the voice command;
[0008] In the case where the target area is a travel recommendation area, determining the user's travel demand information according to the voice instruction;
[0009] A target travel strategy is generated based on the travel demand information.
[0010] In the above technical scheme, by obtaining the user's voice command and performing domain classification on the voice command, the target domain corresponding to the voice command is obtained, so as to achieve accurate domain placement of the user's voice command, and avoid incorrect travel strategy formulation or inability to formulate a travel strategy due to errors in the domain placement of the voice command; when the target domain is a travel recommendation domain, the user's travel demand information is determined according to the voice command, and a target travel strategy is generated based on the travel demand information, so that a complete and detailed target travel strategy can be formulated for the user based on a voice command input by the user. The formulation process saves time and effort, and will not cause information omissions, and the user experience is good.
[0011] In conjunction with the first aspect, in some possible implementations, the performing domain classification on the voice instruction to obtain the target domain corresponding to the voice instruction includes:
[0012] Performing voice recognition on the voice command to obtain text data corresponding to the voice command;
[0013] Determine, according to the text data, a first text vector corresponding to the text data;
[0014] Determining a similarity between the first text vector and a second text vector, wherein the second text vector is a standard text vector in the travel recommendation field;
[0015] According to the similarity, a target domain corresponding to the voice instruction is determined.
[0016] In the above technical scheme, firstly, by performing speech recognition on the voice command, text data corresponding to the voice command is obtained, and based on the text data, a first text vector corresponding to the text data is determined; secondly, the similarity between the first text vector and the standard text vector of the travel recommendation field is determined; finally, based on the similarity between the first text vector and the standard text vector of the travel recommendation field, the target field to which the voice command corresponding to the first text vector belongs is determined, so as to achieve accurate targeting of the user's voice command.
[0017] In combination with the first aspect and the above implementation manner, in some possible implementation manners, determining the target domain corresponding to the voice instruction according to the similarity value includes:
[0018] When the similarity is greater than a preset similarity, determining that the target domain corresponding to the voice instruction is a travel recommendation domain;
[0019] When the similarity is less than or equal to the preset similarity, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
[0020] In the above technical scheme, when the similarity between the first text vector and the second text vector is greater than the preset similarity, it means that the first text vector and the standard text vector of the travel recommendation field have a high similarity, and the target field of the voice instruction corresponding to the first text vector can be determined to be the travel recommendation field; when the similarity between the first text vector and the second text vector is less than or equal to the preset similarity, it means that the first text vector and the standard text vector of the travel recommendation field have a low similarity, and the target field of the voice instruction corresponding to the first text vector can be determined to be a non-travel recommendation field, which can quickly identify whether the target field to which the voice instruction belongs is the travel recommendation field, thereby achieving accurate domain placement of the user's voice instruction.
[0021] In combination with the first aspect and the above implementation manner, in some possible implementation manners, the performing domain classification on the voice instruction to obtain the target domain corresponding to the voice instruction includes:
[0022] Performing voice recognition on the voice command to obtain text data corresponding to the voice command;
[0023] Performing word segmentation processing on the text data to obtain multiple word segments of the text data;
[0024] For each of the segmented words, if the segmented word is the same as a preset segmented word, the segmented word is determined as a valid segmented word, wherein the preset segmented word is a segmented word in the vocabulary of the travel recommendation field;
[0025] According to the number of valid participles in the plurality of participles, a target domain corresponding to the voice instruction is determined.
[0026] In the above technical solution, firstly, voice recognition is performed on the voice command to obtain text data corresponding to the voice command, and the text data is segmented to obtain multiple segmentations of the text data; secondly, for each segmentation, if the segmentation is the same as the preset segmentation, the segmentation is determined as a valid segmentation, and the preset segmentation is a segmentation in the vocabulary of the travel recommendation field; finally, according to the number of valid segmentations in the multiple segmentations, the target field corresponding to the voice command is determined to achieve accurate landing of the user's voice command.
[0027] In combination with the first aspect and the above implementation, determining the target domain corresponding to the voice instruction according to the number of valid participles in the multiple participles includes:
[0028] When the number of valid participles in the plurality of participles is greater than a preset number, determining that the target domain corresponding to the voice instruction is a travel recommendation domain;
[0029] When the number of valid participles in the multiple participles is less than or equal to a preset number, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
[0030] In the above technical solution, when the number of valid segmentations among multiple segmentations of text data is greater than a preset number, it is determined that the target field to which the voice instruction corresponding to the text data belongs is a travel recommendation field; when the number of valid segmentations among multiple segmentations of text data is less than or equal to a preset number, it is determined that the target field to which the voice instruction corresponding to the text data belongs is a non-travel recommendation field. This allows for quick identification of whether the target field to which the voice instruction belongs is a travel recommendation field, thereby achieving accurate targeting of the user's voice instruction.
[0031] In combination with the first aspect and the above implementation manner, in some possible implementation manners, when the target area is a travel recommendation area, determining the travel demand information of the user according to the voice instruction includes:
[0032] When the target area is a travel recommendation area, performing noise reduction processing on the voice instruction to obtain a voice instruction after the noise reduction processing;
[0033] Performing intention recognition on the voice instruction after the noise reduction processing to obtain intention information of the voice instruction after the noise reduction processing;
[0034] The user's travel demand information is determined based on the intention information and the voice instruction after the noise reduction processing.
[0035] In the above technical scheme, when the target area is the travel recommendation area, the voice instructions are firstly subjected to noise reduction processing to obtain the voice instructions after noise reduction processing, so as to avoid the noise information in the voice instructions affecting the intention recognition result of the voice instructions; secondly, the voice instructions after noise reduction processing are subjected to intention recognition to obtain the intention information of the voice instructions; finally, the user's travel demand information is determined based on the intention information and the voice instructions after noise reduction processing. The determination method is simple, convenient and highly accurate, and is easy to promote and use.
[0036] In combination with the first aspect and the above implementations, in some possible implementations, generating a target travel strategy according to the travel demand information includes:
[0037] According to the travel demand information and preset configuration rules, multiple slots to be configured in the preset travel recommendation template are configured to obtain a first travel strategy;.
[0038] The text of the first travel strategy is adjusted to obtain a target travel strategy.
[0039] In the above technical solution, multiple slots to be configured in the preset travel recommendation template are configured according to travel demand information and preset configuration rules to obtain a first travel strategy. The first travel strategy is generated based on the preset travel recommendation template. The content of the first travel strategy is complete and detailed, and the text of the first travel strategy is adjusted to obtain a target travel strategy, which effectively improves the quality of the target travel strategy.
[0040] In a second aspect, a travel strategy formulation device is provided, the device comprising:
[0041] An acquisition module is used to acquire the user's voice command;
[0042] A domain classification module, used to perform domain classification on the voice instruction to obtain a target domain corresponding to the voice instruction;
[0043] a determination module, configured to determine the user's travel demand information according to the voice instruction when the target area is a travel recommendation area;
[0044] A generation module is used to generate a target travel strategy according to the travel demand information.
[0045] In conjunction with the second aspect, in some possible implementations, the domain classification module is specifically configured to:
[0046] Performing voice recognition on the voice command to obtain text data corresponding to the voice command;
[0047] Determine, according to the text data, a first text vector corresponding to the text data;
[0048] Determining a similarity between the first text vector and a second text vector, wherein the second text vector is a standard text vector in the travel recommendation field;
[0049] According to the similarity, a target domain corresponding to the voice instruction is determined.
[0050] In combination with the second aspect and the above implementations, in some possible implementations, the domain classification module is specifically configured to:
[0051] When the similarity is greater than a preset similarity, determining that the target domain corresponding to the voice instruction is a travel recommendation domain;
[0052] When the similarity is less than or equal to the preset similarity, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
[0053] In combination with the second aspect and the above implementations, in some possible implementations, the domain classification module is specifically configured to:
[0054] Performing voice recognition on the voice command to obtain text data corresponding to the voice command;
[0055] Performing word segmentation processing on the text data to obtain multiple word segments of the text data;
[0056] For each of the segmented words, if the segmented word is the same as a preset segmented word, the segmented word is determined as a valid segmented word, wherein the preset segmented word is a segmented word in the vocabulary of the travel recommendation field;
[0057] According to the number of valid participles in the plurality of participles, a target domain corresponding to the voice instruction is determined.
[0058] In combination with the second aspect and the above implementations, in some possible implementations, the domain classification module is specifically configured to:
[0059] When the number of valid participles in the plurality of participles is greater than a preset number, determining that the target domain corresponding to the voice instruction is a travel recommendation domain;
[0060] When the number of valid participles in the multiple participles is less than or equal to a preset number, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
[0061] In combination with the second aspect and the foregoing implementation manner, in some possible implementation manners, the determining module is specifically configured to:
[0062] When the target area is a travel recommendation area, performing noise reduction processing on the voice instruction to obtain a voice instruction after the noise reduction processing;
[0063] Performing intention recognition on the voice instruction after the noise reduction processing to obtain intention information of the voice instruction after the noise reduction processing;
[0064] The user's travel demand information is determined based on the intention information and the voice instruction after the noise reduction processing.
[0065] In combination with the second aspect and the above implementation, in some possible implementations, the generating module is specifically used to:
[0066] According to the travel demand information and the preset configuration rules, multiple slots to be configured in the preset travel recommendation template are configured to obtain a first travel strategy;
[0067] The text of the first travel strategy is adjusted to obtain a target travel strategy.
[0068] In a third aspect, an electronic device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the method in the first aspect or any possible implementation of the first aspect.
[0069] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0070] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of an implementation environment of a travel strategy formulation method provided in an embodiment of the present application;
[0072] Figure 2 is a schematic flow chart of a travel strategy formulation method provided in an embodiment of the present application;
[0073] Figure 3 It is a structural schematic diagram of a travel strategy formulation device provided in an embodiment of the present application;
[0074] Figure 4 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0076] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0077] First, the terms involved in one or more embodiments of this specification are explained.
[0078] Intent refers to the electronic device's recognition of the user's actual or potential needs. Fundamentally, intent is a classifier that divides user needs into a previously defined type. Intent and slots together constitute "user actions". Electronic devices cannot directly understand natural language, so the role of intent recognition is to map natural language into structured semantic representations that machines can understand.
[0079] Intent recognition, also known as SUC (Spoken Utterance Classification), as the name implies, is to classify the natural language conversations input by the user, and the classified categories correspond to the user's intentions. For example, "How is the weather today?", its intention is "asking about the weather." Naturally, intent recognition can be regarded as a typical classification problem. Exemplarily, the classification and definition of intent can refer to the ISO-24617-2 standard, which has a total of 56 detailed definitions. The definition of intent has a lot to do with the positioning of the system itself and the knowledge base it possesses, that is, the definition of intent has a very strong domain relevance. It can be understood that in the embodiments of the present application, the classification and definition of intent are not limited to the ISO-24617-2 standard.
[0080] Slots are the parameters of an intent. An intent may correspond to several slots. For example, when asking for bus routes, you need to provide necessary parameters such as departure point, destination, time, etc. The above parameters are the slots corresponding to the intent "ask for bus routes".
[0081] For example, the main goal of the semantic slot filling task is to extract the value of the pre-defined semantic slot in the semantic frame from the input sentence, given the semantic frame of a specific domain or specific intent. To make a system work properly, you must first design the intent and slot. The intent and slot allow the system to know which specific task to perform and give the parameter type required to perform the task.
[0082] Next, the implementation environment of the technical solution provided in the embodiments of the present application is introduced. Figure 1 This is a schematic diagram of the implementation environment of a travel strategy formulation method provided in an embodiment of the present application, see Figure 1 The implementation environment may include a vehicle terminal 110 and a server 120 .
[0083] The vehicle terminal 110 is connected to the server 140 via a wireless network. The vehicle terminal 110 includes a voice recognition chip, which can collect voice commands issued by the driver or passengers. Accordingly, the vehicle terminal 110 also includes a processor and a memory. The memory is used to store the voice commands collected by the voice recognition chip, and the processor is used to process the voice commands stored in the memory. The vehicle terminal 110 is installed and runs an application that supports obtaining voice commands from the driver or passengers.
[0084] Server 140 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, distribution networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0085] After introducing the implementation environment provided by the embodiments of the present application, the application scenarios of the embodiments of the present application are introduced below.
[0086] The technical solution provided in the embodiments of the present application can be applied in various travel scenarios, for example, in an in-vehicle intelligent system that can provide personal travel strategy formulation.
[0087] Taking the application of the technical solution provided in the embodiment of the present application in an in-vehicle intelligent system that provides travel strategy formulation as an example, when using the travel strategy formulation function provided by the in-vehicle intelligent system, the in-vehicle terminal obtains the user's voice command, and domain-classifies the voice command to obtain the target field corresponding to the voice command. When the target field is a travel recommendation field, the user's travel demand information is determined according to the voice command, and a target travel strategy is generated based on the travel demand information, thereby achieving a complete and detailed travel strategy for the user through a voice command from the user.
[0088] After introducing the implementation environment and application scenarios of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below. Figure 2 , Figure 2 It is a schematic flowchart of a travel strategy formulation method provided in an embodiment of the present application. Taking the vehicle-mounted terminal of a vehicle as an example, the travel strategy formulation method 200 includes steps 201 to 204.
[0089] Step 201: The vehicle-mounted terminal obtains a user's voice command.
[0090] Before the vehicle terminal obtains the user's voice command, the user wakes up the voice assistant through a wake-up command so that the voice assistant obtains the user's voice command. The wake-up command can be the user's voice wake-up command, or the user inputs corresponding text on the interface of the vehicle terminal, or the user operates the touch screen of the vehicle terminal, which is not specifically limited in this embodiment.
[0091] For example, the wake-up instruction is a voice wake-up instruction of "Hello, Xiaoha" issued by the user.
[0092] Among them, after the vehicle terminal receives the voice wake-up command "Hello, Xiaoha" issued by the user, the voice assistant of the vehicle terminal is awakened, and the voice assistant of the vehicle terminal obtains the user's voice command, which is used to express the user's demand information.
[0093] In the embodiment of the present application, the user's voice command can be in the form of a short sentence or a long sentence; the user's voice command can be the voice information of one user or multiple users, and this embodiment does not make specific limitations on this.
[0094] Step 202: The vehicle-mounted terminal performs domain classification on the voice command to obtain a target domain corresponding to the voice command.
[0095] The vehicle-mounted terminal determines whether the user demand information expressed by the user's voice command belongs to the travel recommendation field or the non-travel recommendation field by domain classification of the voice command.
[0096] Step 203 : When the target area is a recommended travel area, the vehicle-mounted terminal determines the user's travel demand information according to the voice command.
[0097] The user's travel demand information includes at least one of the following: number of travelers, departure place, destination, travel date, travel budget, etc.
[0098] Step 204: the vehicle-mounted terminal generates a target travel strategy based on the travel demand information.
[0099] Among them, the in-vehicle terminal generates a target travel strategy for the user based on the user's travel demand information. The target travel strategy includes weather information of the destination, accommodation information of the destination, food information of the destination, travel methods and ticket prices of the travel methods, etc.
[0100] In the embodiment of the present application, after step 204, the method 200 further includes: the vehicle-mounted terminal voice broadcasts the content of the target travel guide.
[0101] In summary, the present application obtains the user's voice commands through the vehicle-mounted terminal, and domain-classifies the voice commands to obtain the target domain corresponding to the voice commands, thereby achieving accurate domain placement of the user's voice commands and avoiding incorrect travel strategy formulation or inability to formulate a travel strategy due to errors in the domain placement of voice commands; when the target domain is a travel recommendation domain, the vehicle-mounted terminal determines the user's travel demand information based on the voice commands, and generates a target travel strategy based on the travel demand information, thereby being able to formulate a complete and detailed target travel strategy for the user based on a voice command input by the user, and the formulation process saves time and effort, and will not cause information omissions, and the user experience is good.
[0102] In a possible implementation, step 202 , the vehicle-mounted terminal performs domain classification on the voice command to obtain a target domain corresponding to the voice command, which specifically includes steps 2021 to 2024 .
[0103] Step 2021: The vehicle-mounted terminal performs voice recognition on the voice command to obtain text data corresponding to the voice command.
[0104] Among them, step 2021, the vehicle-mounted terminal performs voice recognition on the voice command to obtain text data corresponding to the voice command, which specifically includes steps 20211 to 20213.
[0105] Step 20211, convert the voice command to obtain the phoneme information corresponding to the voice command.
[0106] Step 20212, determine multiple characters or words corresponding to the phoneme information.
[0107] Step 20213, calculate the probability that multiple characters or words are associated with each other to form a sentence, and decode and output the text data with the highest probability, that is, the text data corresponding to the voice command.
[0108] It should be noted that the executor of steps 20211 to 20213 is the speech recognition model of the vehicle-mounted terminal, which includes four major parts: an acoustic sub-model, a language sub-model, a dictionary and a decoder. The acoustic sub-model is used to identify a single phoneme model, which is the smallest speech unit in speech; the language sub-model is used to determine whether a sentence is reasonable; the dictionary defines the characters or words corresponding to the phoneme sequence; and the decoder is used to output the speech data processed by the acoustic sub-model, the dictionary and the language sub-model in text.
[0109] Specifically, the acoustic sub-model in the speech recognition process can be a hidden Markov model; the language sub-model can be an N-Gram language model, which can predict the nth word / character / phoneme based on the first (n-1) words / characters / phonemes, and generally n≤4.
[0110] In addition, the vehicle-mounted terminal may also use a speech recognition algorithm to locally recognize text data corresponding to the voice command, wherein the speech recognition algorithm includes but is not limited to a back propagation (BP) algorithm.
[0111] Step 2022: The vehicle-mounted terminal determines a first text vector corresponding to the text data based on the text data.
[0112] Among them, step 2022, the vehicle-mounted terminal determines the first text vector corresponding to the text data based on the text data, which specifically includes steps 20221 to 20223.
[0113] Step 20221, convert the text data to obtain the index vector corresponding to the text data.
[0114] Each index element in the index vector represents a corresponding single character in the text data or a complementary element used to meet the length limit of the index vector.
[0115] In the embodiment of the present application, the text data may be converted into an index vector using an embedding algorithm, and the text sample may also be converted into an index vector using other natural language processing (Neuro-Linguistic Programming, NLP) methods.
[0116] Step 20222, convert the index vector to obtain a text input matrix corresponding to the text data.
[0117] Among them, the index vector is converted into a text input matrix through the word vector matrix to obtain the text input matrix corresponding to the text data.
[0118] Step 20223, input the text input matrix into the text vector representation model to obtain the first text vector corresponding to the text data.
[0119] The text vector representation model is implemented based on the structure of a transformer encoder, and the first text vector includes semantic content of the text data.
[0120] In addition, the vehicle-mounted terminal can also use the RoFormer-Sim model to determine the first text vector corresponding to the text data based on the text data; the RoFormer-Sim model is trained based on multiple sets of first sample data, and the multiple sets of first sample data include sample text data and text vectors corresponding to the sample text data.
[0121] Step 2023: The vehicle terminal determines the similarity between the first text vector and the second text vector, wherein the second text vector is a standard text vector in the travel recommendation field. 。
[0122] The second text vector is a standard text vector of the travel recommendation field pre-stored in the memory of the vehicle-mounted terminal.
[0123] In step 2024, the vehicle terminal determines the target area corresponding to the voice command based on the similarity.
[0124] Among them, when the similarity is greater than the preset similarity, the vehicle terminal determines that the target area corresponding to the voice command is a travel recommendation area; when the similarity is less than or equal to the preset similarity, the vehicle terminal determines that the target area corresponding to the voice command is a non-travel recommendation area.
[0125] The preset similarity can be set by the developer, and this embodiment does not specifically limit this. For example, the preset similarity can be 85%.
[0126] For example, when the similarity between the first text vector and the second text vector is 90% and the preset similarity is 85%, it is determined that the target field to which the voice instruction corresponding to the first text vector belongs is the travel recommendation field.
[0127] For another example, when the similarity between the first text vector and the second text vector is 78% and the preset similarity is 85%, it is determined that the target area to which the voice instruction corresponding to the first text vector belongs is a non-travel recommendation area.
[0128] In an embodiment of the present application, when the similarity between the first text vector and the second text vector is greater than the preset similarity, it means that the first text vector and the standard text vector of the travel recommendation field have a high similarity, and the target field of the voice instruction corresponding to the first text vector can be determined to be the travel recommendation field; when the similarity between the first text vector and the second text vector is less than or equal to the preset similarity, it means that the first text vector and the standard text vector of the travel recommendation field have a low similarity, and the target field of the voice instruction corresponding to the first text vector can be determined to be a non-travel recommendation field, which can quickly identify whether the target field to which the voice instruction belongs is the travel recommendation field, thereby achieving accurate domain placement of the user's voice instruction.
[0129] In an embodiment of the present application, first, voice recognition is performed on the voice command to obtain text data corresponding to the voice command, and based on the text data, a first text vector corresponding to the text data is determined; secondly, the similarity between the first text vector and a standard text vector in the travel recommendation field is determined; finally, based on the similarity between the first text vector and the standard text vector in the travel recommendation field, the target field to which the voice command corresponding to the first text vector belongs is determined, thereby achieving accurate targeting of the user's voice command.
[0130] In a possible implementation, step 202 , the vehicle-mounted terminal performs domain classification on the voice command to obtain a target domain corresponding to the voice command, which specifically includes steps 2026 to 2029 .
[0131] Step 2026: The vehicle-mounted terminal performs voice recognition on the voice command to obtain text data corresponding to the voice command.
[0132] Among them, in step 2026, the method in which the vehicle-mounted terminal performs voice recognition on the voice command and obtains text data corresponding to the voice command is the same as the method in step 2021, and this embodiment will not be repeated here.
[0133] Step 2027: the vehicle-mounted terminal performs word segmentation processing on the text data to obtain multiple word segments of the text data.
[0134] Among them, step 2027, the vehicle-mounted terminal performs word segmentation processing on the text data to obtain multiple word segments of the text data, which specifically includes steps 20271 to 20275.
[0135] Step 20271, based on the forward dictionary tree, perform forward maximum matching word segmentation on the text data to obtain multiple forward word segmentation results of the text data.
[0136] Among them, the forward dictionary tree is constructed by constructing text data in order from front to back.
[0137] Step 20272, based on the backward dictionary tree, perform backward maximum matching word segmentation on the text data to obtain multiple backward word segmentation results for the text data.
[0138] Among them, the backward dictionary tree is constructed by constructing text data in order from back to front.
[0139] Step 20273, determine whether the number of words in the multiple forward word segmentation results of the text data is the same as the number of words in the multiple backward word segmentation results.
[0140] Among them, when the number of words in the multiple forward word segmentation results of the text data is the same as the number of words in the multiple backward word segmentation results, step 20274 is executed; when the number of words in the multiple forward word segmentation results of the text data is different from the number of words in the multiple backward word segmentation results, step 20275 is executed.
[0141] Step 20274, when the number of words in the multiple forward word segmentation results of the text data is the same as the number of words in the multiple backward word segmentation results, the multiple forward word segmentation results are used as the multiple word segmentations of the text data.
[0142] Among them, when the number of words in the forward word segmentation result is the same as the number of words in the backward word segmentation result, according to the grammatical habits of Chinese, the forward word segmentation result will be more accurate. Therefore, multiple forward word segmentation results are used as multiple word segmentations of text data.
[0143] Step 20275, when the number of words in the multiple forward word segmentation results of the text data is different from the number of words in the multiple backward word segmentation results, the word segmentation results with fewer words are used as the multiple word segmentations of the text data.
[0144] Among them, if the number of words in the forward word segmentation result is different from the number of words in the backward word segmentation result, the result with fewer words will have higher accuracy. Therefore, the word segmentation result with fewer words is used as multiple word segmentations of the text data.
[0145] In an embodiment of the present application, the vehicle-mounted terminal can also use the Python Chinese word segmentation group jieba to segment the text data corresponding to the voice command to obtain multiple word segments corresponding to the text data.
[0146] For example, the text data corresponding to the user's voice command is "I want to go to Beijing for three days, please help me make arrangements." Jieba performs word segmentation on the text data to obtain the word segmentation result of the text data. The word segmentation result of the text data includes 5 word segmentations, which are: "I", "want to go", "Beijing", "three days" and "arrange."
[0147] Step 2028: The vehicle-mounted terminal determines each segmentation as a valid segmentation if the segmentation is the same as a preset segmentation, wherein the preset segmentation is a segmentation in the vocabulary of the travel recommendation field.
[0148] Among them, the vocabulary in the field of travel recommendations includes multiple preset word segmentations, which cover the names of various cities, travel durations, travel objects, and words related to formulating travel strategies.
[0149] It should be noted that, for each segmentation, when the semantic features of the segmentation are the same as those of the preset segmentation, the segmentation can also be determined as a valid segmentation.
[0150] In the embodiment of the present application, the travel duration may include various durations such as one day, two days, three days, etc.; the travel objects may include various travel objects such as me, we, the three of us, etc.; and the words related to formulating a travel strategy may include words such as arrangement and planning.
[0151] Step 2029: The vehicle terminal determines the target area corresponding to the voice command based on the number of valid segmentations in the multiple segmentations.
[0152] Among them, when the number of valid participles among multiple participles is greater than a preset number, the target area corresponding to the voice instruction is determined to be a travel recommendation area; when the number of valid participles among multiple participles is less than or equal to a preset number, the target area corresponding to the voice instruction is determined to be a non-travel recommendation area.
[0153] The preset number can be set by the developer, and this embodiment does not specifically limit this. For example, the preset number can be 4.
[0154] For example, when the number of valid segmented words among the multiple segmented words of the text data is 5 and the preset number is 4, it is determined that the target field to which the voice instruction belongs is the travel recommendation field.
[0155] For another example, when the number of valid segmented words among the multiple segmented words in the text data is 3 and the preset number is 4, it is determined that the target area to which the voice command belongs is a non-travel recommendation area.
[0156] In an embodiment of the present application, when the number of valid participles among multiple participles of text data is greater than a preset number, it is determined that the target field to which the voice instruction corresponding to the text data belongs is a travel recommendation field; when the number of valid participles among multiple participles of text data is less than or equal to a preset number, it is determined that the target field to which the voice instruction corresponding to the text data belongs is a non-travel recommendation field. This allows for quick identification of whether the target field to which the voice instruction belongs is a travel recommendation field, thereby enabling accurate targeting of the user's voice instruction.
[0157] In an embodiment of the present application, first, voice recognition is performed on the voice command to obtain text data corresponding to the voice command, and the text data is segmented to obtain multiple segmentations of the text data; secondly, for each segmentation, if the segmentation is the same as a preset segmentation, the segmentation is determined as a valid segmentation, and the preset segmentation is a segmentation in the vocabulary of the travel recommendation field; finally, based on the number of valid segmentations in the multiple segmentations, the target field corresponding to the voice command is determined to achieve accurate targeting of the user's voice command.
[0158] In a possible implementation, step 203 , when the target area is a recommended travel area, the vehicle-mounted terminal determines the user's travel demand information according to the voice instruction, which specifically includes steps 2031 to 2033 .
[0159] Step 2031: When the target area is a recommended travel area, the vehicle-mounted terminal performs noise reduction processing on the voice command to obtain the voice command after the noise reduction processing.
[0160] It is understandable that there may be ambient noise in the surrounding environment. Therefore, in order to ensure the clarity of the voice commands issued by the user, after obtaining the sound signal of the surrounding environment, the sound signal can also be processed by a noise reduction algorithm to filter out the ambient noise in the sound signal and finally obtain the voice of the speaking user.
[0161] It should be noted that the above-mentioned noise reduction algorithm can be understood as an audio noise reduction algorithm, such as sampling denoising method, noise gate, etc., among which the sampling denoising method can be understood as sampling the waveform samples of environmental noise, and then analyzing the waveform of the collected surrounding sound signal and the sampled noise samples to automatically remove the noise in the sound signal; the above-mentioned noise gate sets a threshold value of a level, and all signal levels below this threshold are filtered out, and all signal levels above the threshold value are passed.
[0162] Step 2032: the vehicle-mounted terminal performs intent recognition on the voice command after the noise reduction processing to obtain intent information of the voice command after the noise reduction processing.
[0163] Among them, step 2032, the vehicle-mounted terminal performs intent recognition on the voice command after noise reduction processing to obtain the intention information of the voice command, which specifically includes steps 20321 to 20326.
[0164] Step 20321: the vehicle-mounted terminal performs sequence extraction processing on the voice command after the noise reduction processing to obtain a voice feature sequence corresponding to the voice command after the noise reduction processing.
[0165] The sequence extraction process refers to the operation of extracting a speech feature sequence containing sound information from the speech instruction after the noise reduction process.
[0166] In the embodiment of the present application, the speech feature sequence is an MFCC feature sequence. In other embodiments, a filter bank (Filter BANK, FBANK) feature sequence can also be used as the input of the model.
[0167] Among them, the general extraction steps of FBANK feature sequence include: pre-emphasis, framing, windowing, short-time Fourier transform (STFT), Mel filtering, de-averaging, etc. The FBank feature sequence is very close to the response characteristics of the human ear, but it has the following shortcomings: adjacent features of the FBank feature sequence are highly correlated (adjacent filter groups overlap).
[0168] By performing discrete cosine transform (DCT) on the FBANK feature sequence, the Mel-scale Frequency Cepstral Coefficients (MFCC) feature sequence can be obtained. DCT is a variant of Fourier transform. The advantage is that the result after DCT is a real number without an imaginary part. Another feature of DCT is that for general speech signals, the first few coefficients of the result are particularly large, while the following coefficients are relatively small and can be ignored. In practice, generally only the first 12 to 20 are retained as MFCC coefficients, which further compresses the data. The essence of DCT is to remove the correlation between signals of different dimensions and map the signals to a low-dimensional space. Therefore, the MFCC feature sequence has better discrimination.
[0169] Step 20322: The vehicle-mounted terminal determines a text feature vector corresponding to the speech feature sequence based on the speech feature sequence.
[0170] Among them, the vehicle terminal includes a feature extraction module, which is used to extract the text feature vector, rhythm feature vector and intention category feature vector corresponding to the voice instruction according to the voice instruction; the feature extraction module includes a speech recognition model, a speech rhythm model and a speech intention classification model.
[0171] In this embodiment, the vehicle terminal extracts the part of the speech feature sequence that is highly relevant to the text information, namely the text feature vector, through the speech recognition model; classifies the speech according to the text feature vector, and predicts the characters or words that may be contained in the speech.
[0172] Step 20323: The vehicle-mounted terminal determines a prosodic feature vector corresponding to the speech feature sequence based on the speech feature sequence.
[0173] Among them, the vehicle terminal extracts the part of the speech feature sequence that is highly correlated with the prosodic information, namely the prosodic feature vector, through the speech prosodic model; classifies the speech according to the prosodic feature vector, and predicts the long and short sounds, tones, stress, intonation, etc. that may be contained in the voice command.
[0174] Step 20324: Determine the intention category feature vector corresponding to the speech feature sequence based on the speech feature sequence.
[0175] Among them, the vehicle terminal extracts the part of the voice feature sequence that is highly relevant to the intent category, namely the intent category feature vector, through the voice intention classification model, classifies the voice command according to the intent category vector, and predicts the intent category to which the intent to be expressed by the voice command may belong.
[0176] Step 20325: The vehicle-mounted terminal performs feature fusion on the text feature vector, the rhythm feature vector and the intention category feature vector to obtain the intention feature vector.
[0177] Among them, since the speech recognition model, speech rhythm model and speech intention classification model respectively examine the impact of a certain factor in the voice command on the intention in isolation, for example, the intention classification prediction process of the speech intention classification model directly inputs the speech feature sequence and outputs the prediction result of the intention classification, and does not involve any speech factors, it is necessary to fuse the text feature vector, the rhythm feature vector and the intention category feature vector to extract the intention feature vector. The intention feature vector integrates the text information, rhythm information and user intention category of the voice command, and comprehensively considers the above three factors that have a strong correlation with the user intention.
[0178] Step 20326, determining the intention information of the voice command after noise reduction processing based on the intention feature vector.
[0179] The discrete probability distribution of each intention that the voice command may express is calculated based on the intention feature vector, and the intention with the highest probability is used as the intention information of the voice command after noise reduction processing.
[0180] In the embodiment of the present application, it should be noted that the vehicle-mounted terminal performs intent recognition on the voice command after noise reduction processing, and obtains intent information corresponding to the voice command after noise reduction processing, and the intent information is a travel recommendation.
[0181] Step 2033: The vehicle-mounted terminal determines the user's travel demand information based on the intention information and the voice command after noise reduction processing.
[0182] It should be noted that intent information in different fields corresponds to different preset slots, and the information set of multiple preset slots corresponding to each intent information is the user's demand information.
[0183] For example, when the intent information is "ask about the weather", the intent information belongs to the weather field, and the preset slots corresponding to the intent information include a first preset slot and a second preset slot, wherein the first preset slot is: a time slot, and the second preset slot is: a location slot.
[0184] For another example, when the intent information is "travel recommendation", the intent information belongs to the travel field, and the number of preset slots corresponding to the intent information is at least four, and the four preset slots are: the number of travelers slot, the departure slot, the destination slot, and the travel duration slot. In addition, the preset slots corresponding to the intent information may also include: the departure time slot, the travel budget slot, etc.
[0185] Among them, step 2033, the vehicle terminal determines the user's travel demand information based on the intention information and the voice command after noise reduction processing, which specifically includes step 20331 and step 20332.
[0186] Step 20331: The vehicle-mounted terminal processes the voice instruction after the noise reduction processing to obtain a text sequence corresponding to the voice instruction after the noise reduction processing.
[0187] Among them, the method in step 20331 is the same as that in step 2021, and will not be repeated in this embodiment.
[0188] Step 20332: the vehicle-mounted terminal extracts features from the text sequence to obtain information about a preset slot corresponding to the intent information.
[0189] Among them, when the intention information corresponding to the voice instruction after noise reduction processing is travel recommendation, and the text sequence corresponding to the voice instruction after noise reduction processing is "I want to go to Beijing for three days with a friend of mine", feature extraction is performed on the text sequence "I want to go to Beijing for three days with a friend of mine", and the extracted character features are used as the number slot information corresponding to the intention information. If the character features are "me and a friend of mine", the number slot is two people; the region name in the extracted first regional feature is used as the departure slot information corresponding to the intention information, wherein the first regional feature is a combination of the region name and the first fixed word, and the first fixed word can be "departure" or "from"; the region name in the extracted second regional feature is used as the destination slot information corresponding to the intention information, wherein the second regional feature is a combination of the region name and the second fixed word, and the second fixed word can be "to" or "go", and the second regional feature is "go to Beijing", then the destination slot information is Beijing; the extracted time period feature is used as the travel duration slot information corresponding to the intention information, and if the time period feature is "play for three days", then the travel duration slot information is three days.
[0190] It should be noted that, when the vehicle terminal does not extract the first region feature from the text sequence, the vehicle terminal uses the current location information detected by the vehicle GPS as the departure slot information. For example, if the current location detected by the vehicle GPS is Xi'an, the departure slot information is Xi'an. In this example, the user's travel demand information is "two people go from Xi'an to Beijing for three days".
[0191] In an embodiment of the present application, when the target area is a travel recommendation area, the vehicle-mounted terminal first performs noise reduction processing on the voice command to obtain the voice command after noise reduction processing, so as to avoid the noise information in the voice command affecting the intention recognition result of the voice command; secondly, the voice command after noise reduction processing is subjected to intention recognition to obtain the intention information of the voice command after noise reduction processing; finally, the user's travel demand information is determined based on the intention information and the voice command after noise reduction processing. The determination method is simple, convenient and highly accurate, and is easy to promote and use.
[0192] In a possible implementation, in step 204 , the vehicle-mounted terminal generates a target travel strategy based on the travel demand information, which specifically includes steps 2041 and 2042 .
[0193] Step 2041, the vehicle terminal configures multiple slots to be configured in the preset travel recommendation template according to the travel demand information and the preset configuration rules to obtain a first travel strategy.
[0194] The preset travel recommendation templates have been pre-set by the developer and stored in the vehicle terminal. The preset travel recommendation templates are:
[0195] [Place of departure] I will depart from [XX].
[0196] [Destination] I want to travel to [AA].
[0197] [Travel duration] I will be traveling for [BB] days.
[0198] [Transportation - Airplane] It costs [CC] yuan to travel by plane.
[0199] [Transportation - Train] The train fare is [DD] yuan.
[0200]
Destination Weather
EE
[0201]
Destination Attractions
FF
[0202] [Nearby delicacies] [AA] Nearby delicacies include [GG].
[0203]
Hotel Accommodation
FF
HH
[0204] Among them, the preset configuration rules are used to specify the way to obtain the slot information of the slot to be configured in the preset travel recommendation template.
[0205] It should be noted that in the above preset travel recommendation template, [XX], [AA], [BB], [CC], [DD], [EE], [FF] and [HH] are all slots to be configured.
[0206] In the embodiment of the present application, step 2041, the vehicle terminal configures multiple slots to be configured in the preset travel recommendation template according to the travel demand information and the preset configuration rules to obtain the first travel strategy, which specifically includes steps 20411 to 20415.
[0207] Step 20411: The vehicle terminal determines, for each slot to be configured in the preset travel recommendation template, whether there is a preset slot in the travel demand information that is the same as the slot to be configured.
[0208] Step 20412: When the slot to be configured is the same as the preset slot, the slot information of the preset slot is used as the slot information of the slot to be configured.
[0209] For example, if the slot to be configured [Place of Departure] in the travel recommendation template is the same as the slot of the place of departure in the travel demand information, the slot information of the place of departure Xi'an will be used as the slot information of the slot to be configured [Place of Departure].
[0210] Step 20413: When the slot to be configured is different from the preset slot, determine the feature information of the sentence where the slot to be configured is located.
[0211] For example, if the slot to be configured [destination weather] in the travel recommendation template is different from the preset slot in the travel demand information, the characteristic information of the weather [EE] is determined.
[0212] Step 20414: Determine the recommendation type corresponding to the slot to be configured based on the feature information of the sentence where the slot to be configured is located.
[0213] For example, the sentence where the slot to be configured is located is weather [EE], and the feature information of the sentence where the slot to be configured is located is weather, then the recommended type corresponding to the slot to be configured is weather.
[0214] Step 20415: Determine the slot information of the slot to be configured according to the recommended type and preset configuration rule corresponding to the slot to be configured.
[0215] Among them, the preset configuration rule stipulates that when the recommended type is weather, the destination weather information is obtained by calling the data of the weather APP, and the destination weather information is used as the slot information of the slot to be configured.
[0216] In an embodiment of the present application, the vehicle-mounted terminal configures multiple slots to be configured in a preset travel recommendation template according to the user's travel demand information and preset configuration rules to obtain a first travel strategy. The first travel strategy is based on the preset travel recommendation template and is obtained after configuring multiple slots to be configured in the preset travel recommendation template.
[0217] Step 2042: The vehicle-mounted terminal adjusts the text of the first travel strategy to obtain a target travel strategy.
[0218] Among them, step 2042, the vehicle-mounted terminal adjusts the text of the first travel strategy to obtain a target travel strategy, which specifically includes steps 20421 to 20423.
[0219] Step 20421: The vehicle-mounted terminal encodes the text content of the first travel strategy to obtain a vector representation corresponding to the first travel strategy.
[0220] Among them, the vehicle-mounted terminal can use a text encoding module to encode the text content of the first travel guide. The text encoding module can be an encoder based on a Transformer structure or an encoder with other structures, which is not specifically limited in this embodiment.
[0221] Step 20422: The vehicle-mounted terminal predicts a technique difference signal corresponding to the text content of the first travel strategy.
[0222] The vehicle-mounted terminal may use a difference signal prediction module to predict the technique difference signal corresponding to the text content of the first travel guide. The difference signal prediction module may be a difference signal predictor based on a multilayer perceptron (MLP).
[0223] In the embodiment of the present application, the technique difference signal can represent the technique polishing direction and the degree of technique polishing. The technique polishing direction refers to clearly defining what technique to use for polishing, for example, some sentences are suitable for personification techniques, and some sentences are suitable for metaphors; the degree of technique polishing refers to the degree of polishing relative to the original sentence, for example, if the original sentence is already very beautiful, the degree of technique polishing can be relatively low, and if the original sentence is not beautiful enough, the degree of technique polishing is relatively high.
[0224] Step 20423: The vehicle-mounted terminal encodes the technique difference signal corresponding to the text content of the first travel strategy to obtain a technique difference vector corresponding to the first travel strategy.
[0225] Among them, a difference signal encoding module can be used to encode the technical difference signal of the first travel strategy.
[0226] Step 20424: The vehicle-mounted terminal performs text decoding on the vector representation corresponding to the first travel strategy and the technique difference vector corresponding to the first travel strategy to obtain a target travel strategy corresponding to the first travel strategy.
[0227] Among them, the vehicle-mounted terminal can use the text decoding module to obtain the target travel strategy corresponding to the first travel strategy. The text decoding module can be a decoder based on the Transformer structure or a decoder of other structures. This embodiment does not make specific limitations on this.
[0228] In an embodiment of the present application, the vehicle-mounted terminal configures multiple slots to be configured in the preset travel recommendation template according to travel demand information and preset configuration rules to obtain a first travel guide. The first travel guide is generated based on the preset travel recommendation template. The content of the first travel guide is complete and detailed. The text of the first travel guide is adjusted to obtain a target travel guide, which effectively improves the quality of the target travel guide.
[0229] Figure 3 This is a schematic diagram of the structure of a travel strategy formulation device provided in an embodiment of the present application, see Figure 3 The travel strategy formulation device 300 includes: an acquisition module 301, a domain classification module 302, a determination module 303 and a generation module 304.
[0230] The acquisition module 301 is used to acquire the user's voice command;
[0231] A domain classification module 302 is used to perform domain classification on the voice instruction to obtain a target domain corresponding to the voice instruction;
[0232] A determination module 303, for determining the user's travel demand information according to the voice instruction when the target area is a travel recommendation area;
[0233] The generating module 304 is used to generate a target travel strategy according to the travel demand information.
[0234] In one possible implementation, the domain classification module 302 is specifically used to: perform speech recognition on the voice instruction to obtain text data corresponding to the voice instruction; determine a first text vector corresponding to the text data based on the text data; determine the similarity between the first text vector and the second text vector, wherein the second text vector is a standard text vector of the travel recommendation field; and determine a target field corresponding to the voice instruction based on the similarity.
[0235] In a possible implementation, the domain classification module 302 is specifically used to: when the similarity is greater than a preset similarity, determine that the target domain corresponding to the voice instruction is a travel recommendation domain; when the similarity is less than or equal to the preset similarity, determine that the target domain corresponding to the voice instruction is a non-travel recommendation domain.
[0236] In a possible implementation, the domain classification module 302 is specifically used to: perform speech recognition on the voice command to obtain text data corresponding to the voice command; perform word segmentation processing on the text data to obtain multiple word segments of the text data; for each word segmentation, if the word segmentation is the same as a preset word segmentation, determine the word segmentation as a valid word segmentation, wherein the preset word segmentation is a word segmentation in the vocabulary of the travel recommendation field; and determine the target field corresponding to the voice command based on the number of valid word segments in the multiple word segmentations.
[0237] In a possible implementation, the domain classification module 302 is specifically used to: when the number of valid participles in multiple participles is greater than a preset number, determine that the target domain corresponding to the voice instruction is a travel recommendation domain; when the number of valid participles in multiple participles is less than or equal to a preset number, determine that the target domain corresponding to the voice instruction is a non-travel recommendation domain.
[0238] In a possible implementation, the determination module 303 is specifically used to: when the target area is a travel recommendation area, perform noise reduction processing on the voice instructions to obtain the voice instructions after the noise reduction processing; perform intention recognition on the voice instructions after the noise reduction processing to obtain the intention information of the voice instructions after the noise reduction processing; and determine the user's travel demand information based on the intention information and the voice instructions after the noise reduction processing.
[0239] In a possible implementation, the generation module 304 is specifically used to: configure multiple slots to be configured in a preset travel recommendation template according to travel demand information and preset configuration rules to obtain a first travel strategy; and perform text adjustment on the first travel strategy to obtain a target travel strategy.
[0240] It should be noted that: the travel strategy formulation device provided in the above embodiment only uses the division of the above functional modules as an example when formulating the travel strategy. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the travel strategy formulation device provided in the above embodiment and the travel strategy formulation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0241] Through the technical solution provided in the embodiment of the present application, the user's voice command is obtained, and the voice command is domain-classified to obtain the target domain corresponding to the voice command, so as to achieve accurate domain placement of the user's voice command, and avoid the wrong travel strategy or the inability to formulate a travel strategy due to errors in the domain placement of the voice command; when the target domain is a travel recommendation domain, the user's travel demand information is determined according to the voice command, and a target travel strategy is generated according to the travel demand information, so that a complete and detailed target travel strategy can be formulated for the user based on a voice command input by the user, and the formulation process saves time and effort, does not cause information omissions, and provides a good user experience.
[0242] Figure 4 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.
[0243] For example, Figure 4 As shown, the vehicle 400 includes: a memory 401 and a processor 402, wherein the memory 401 stores an executable program code 4011, and the processor 402 is used to call and execute the executable program code 4011 to perform a travel strategy formulation method provided in a method embodiment of the present application.
[0244] In addition, an embodiment of the present application also protects a travel strategy formulation device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute a travel strategy formulation method provided in an embodiment of the present application.
[0245] In this embodiment, the travel strategy formulation device can be divided into functional modules according to the above method example. For example, each functional module can be corresponded to, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0246] In the case of dividing each functional module into corresponding functional modules, the travel strategy formulation device may also include an acquisition module, a domain classification module, a determination module, and a generation module. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0247] It should be understood that the travel strategy formulation device provided in this embodiment is used to execute the above-mentioned travel strategy formulation method, and thus can achieve the same effect as the above-mentioned implementation method.
[0248] In the case of an integrated unit, the travel strategy formulation device may include a processing module and a storage module. When the travel strategy formulation device is applied to a vehicle, the processing module may be used to control and manage the vehicle's actions. The storage module may be used to support the vehicle in executing mutual program codes, etc.
[0249] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0250] In addition, the travel strategy formulation device provided in the embodiments of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a travel strategy formulation method provided in the above embodiments.
[0251] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a travel strategy formulation method provided in the above embodiment.
[0252] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a travel strategy formulation method provided in the above embodiment.
[0253] Among them, the travel strategy formulation device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0254] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0255] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0256] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A travel strategy formulation method, characterized in that: The method comprises: Get the user's voice command; Performing domain classification on the voice command to obtain a target domain corresponding to the voice command; In the case where the target area is a travel recommendation area, determining the user's travel demand information according to the voice instruction; A target travel strategy is generated based on the travel demand information.
2. The method according to claim 1, characterized in that The performing domain classification on the voice instruction to obtain a target domain corresponding to the voice instruction includes: Performing voice recognition on the voice command to obtain text data corresponding to the voice command; Determine, according to the text data, a first text vector corresponding to the text data; Determining a similarity between the first text vector and a second text vector, wherein the second text vector is a standard text vector in the travel recommendation field; According to the similarity, a target domain corresponding to the voice instruction is determined.
3. The method according to claim 2, characterized in that Determining the target domain corresponding to the voice instruction according to the similarity value includes: When the similarity is greater than a preset similarity, determining that the target domain corresponding to the voice instruction is a travel recommendation domain; When the similarity is less than or equal to the preset similarity, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
4. The method according to claim 1, characterized in that The performing domain classification on the voice instruction to obtain a target domain corresponding to the voice instruction includes: Performing voice recognition on the voice command to obtain text data corresponding to the voice command; Performing word segmentation processing on the text data to obtain multiple word segments of the text data; For each of the segmented words, if the segmented word is the same as a preset segmented word, the segmented word is determined as a valid segmented word, wherein the preset segmented word is a segmented word in the vocabulary of the travel recommendation field; According to the number of valid participles in the plurality of participles, a target domain corresponding to the voice instruction is determined.
5. The method according to claim 4, characterized in that The determining, according to the number of valid participles in the plurality of participles, a target domain corresponding to the voice instruction includes: When the number of valid participles in the plurality of participles is greater than a preset number, determining that the target domain corresponding to the voice instruction is a travel recommendation domain; When the number of valid participles in the multiple participles is less than or equal to a preset number, it is determined that the target area corresponding to the voice instruction is a non-travel recommendation area.
6. The method according to claim 1, characterized in that When the target area is a travel recommendation area, determining the travel demand information of the user according to the voice instruction includes: When the target area is a travel recommendation area, performing noise reduction processing on the voice instruction to obtain a voice instruction after the noise reduction processing; Performing intent recognition on the voice instruction after the noise reduction processing to obtain intent information of the voice instruction after the noise reduction processing; The user's travel demand information is determined based on the intention information and the voice instruction after the noise reduction processing.
7. The method according to claim 1, characterized in that Generating a target travel strategy according to the travel demand information includes: According to the travel demand information and the preset configuration rules, multiple slots to be configured in the preset travel recommendation template are configured to obtain a first travel strategy; The text of the first travel strategy is adjusted to obtain a target travel strategy.
8. A travel strategy formulation device, characterized in that: The device comprises: An acquisition module is used to acquire the user's voice command; A domain classification module, used to perform domain classification on the voice instruction to obtain a target domain corresponding to the voice instruction; a determination module, configured to determine the user's travel demand information according to the voice instruction when the target area is a travel recommendation area; A generation module is used to generate a target travel strategy according to the travel demand information.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.