Navigation route generation method and device, electronic equipment and storage medium
Through voice recognition and similarity calculation, navigation routes suitable for assisted driving are obtained or generated, which solves the problem that existing navigation software is not suitable for assisted driving, and improves the accuracy and user experience of navigation routes.
Patent Information
- Application Number
- CN202310805061.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
The navigation lines generated by the existing navigation software are not suitable for assisted driving functions, which makes it impossible for users to fully experience assisted driving functions.
By obtaining voice data for speech recognition, extracting voice clips outside the navigation keywords, and calculating similarity with voice data in historical assisted driving scenarios. If the similarity is greater than the preset threshold, the historical navigation route will be obtained; if the similarity is insufficient, Perform named entity recognition to generate navigation routes to adapt to the user's historical habits.
It realizes the generation of navigation routes suitable for assisted driving based on users' historical habits, improving the accuracy and user experience of navigation route generation.
Smart Images

Figure CN119223319A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of assisted driving, and in particular to a multi-dialect speech recognition method, device, vehicle computer and vehicle. Background Art
[0002] Vehicle navigation software is now very popular, but the existing navigation software is designed for drivers to drive vehicles, so the navigation routes it generates are also designed to meet the needs of drivers; however, with the widespread application of vehicle assisted driving technology, the navigation routes generated by the original navigation software may not be suitable for driving with assisted driving functions, resulting in users being unable to experience assisted driving functions well. Therefore, a navigation route generation method suitable for assisted driving is urgently needed. Summary of the invention
[0003] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a method, device, electronic device and storage medium for generating a navigation route.
[0004] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:
[0005] In a first aspect, the present disclosure provides a method for determining keywords in automotive field speech, comprising:
[0006] Acquiring voice data, and performing voice recognition on the voice data to obtain first text information;
[0007] If the first text information includes the navigation keyword, extracting a first voice segment from the voice data, the first voice segment including other text information except the navigation keyword;
[0008] Acquire historical voice data, and calculate the similarity between the first voice segment and the historical voice data, where the historical voice data is voice data input in a historical assisted driving scenario;
[0009] When the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained.
[0010] As an optional implementation of the present disclosure, the method further includes:
[0011] When the similarity between the first voice segment and the historical voice data is less than a preset threshold, inputting the first text information into an entity recognition model to obtain a first point of interest recognition result output by the entity recognition model;
[0012] The entity recognition model is a model that is trained and converged based on sample data and mask data; the sample data includes speech text information and search text information, and the mask data is a random masking process performed on other texts except the point of interest text based on the sample data;
[0013] A first navigation route is generated according to the first point of interest indicated by the first point of interest recognition result.
[0014] As an optional implementation of the present disclosure, the training process of the entity recognition model includes:
[0015] Obtain sample data, where both the voice text information and the search text information contain the point of interest text;
[0016] Randomly extract some text from other texts for masking to obtain mask data;
[0017] Input sample data and mask data into the initial model, and obtain the prediction results output by the initial model;
[0018] Calculate the loss function value between the prediction result and the sample data;
[0019] When the loss function value is greater than the preset loss threshold, the model parameters of the initial model are adjusted until the loss function value is less than or equal to the preset loss threshold, and the converged initial model is used as the entity recognition model.
[0020] As an optional implementation of the present disclosure, the method further includes:
[0021] When the similarity between the first voice segment and the historical voice data is less than a preset threshold, performing voice recognition on the first voice segment to obtain second text information;
[0022] Named entity recognition is performed on the second text information to obtain a second point of interest recognition result, and a second navigation route is generated according to the second point of interest indicated by the second point of interest recognition result.
[0023] As an optional implementation of the present disclosure, the method further includes: receiving an assisted driving instruction;
[0024] The assisted driving function is started in response to the assisted driving instruction, and assisted driving control is performed according to the historical navigation route.
[0025] As an optional implementation manner of the present disclosure, if the first text information contains a navigation keyword, extracting a first voice segment from the voice data includes:
[0026] removing the navigation keyword from the first text information to obtain reference text information;
[0027] Determining, according to the text position of the reference text information in the first text information, an audio position of a first voice segment corresponding to the reference text information in the voice data;
[0028] A first voice segment is obtained from the voice data according to the audio position.
[0029] As an optional implementation of the present disclosure, there is at least one voice segment corresponding to the historical voice data;
[0030] Acquiring historical voice data and calculating the similarity between the first voice segment and the historical voice data includes:
[0031] The similarities between the first speech segment and at least one speech segment are respectively calculated to obtain at least one similarity.
[0032] As an optional implementation manner of the present disclosure, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, obtaining a historical navigation route corresponding to the historical voice data includes:
[0033] Determining a second speech segment with the highest similarity from at least one similarity, and comparing the similarity corresponding to the second speech segment with a preset threshold;
[0034] When the similarity corresponding to the second voice segment is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained.
[0035] In a second aspect, a device for determining keywords of automotive field speech is provided, comprising:
[0036] An acquisition module, used to acquire voice data and perform voice recognition on the voice data to obtain first text information;
[0037] An extraction module, configured to extract a first voice segment from the voice data if the first text information contains a navigation keyword, the first voice segment containing other text information except the navigation keyword;
[0038] A calculation module, used to obtain historical voice data and calculate the similarity between the first voice segment and the historical voice data, where the historical voice data is voice data input in a historical assisted driving scenario;
[0039] The navigation module is used to obtain a historical navigation route corresponding to the historical voice data when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold.
[0040] As an optional implementation manner of the present disclosure, the navigation module is further used for:
[0041] When the similarity between the first voice segment and the historical voice data is less than a preset threshold, inputting the first text information into an entity recognition model to obtain a first point of interest recognition result output by the entity recognition model;
[0042] The entity recognition model is a model that is trained and converged based on sample data and mask data; the sample data includes speech text information and search text information, and the mask data is a random masking process performed on other texts except the point of interest text based on the sample data;
[0043] A first navigation route is generated according to the first point of interest indicated by the first point of interest recognition result.
[0044] As an optional implementation of the present disclosure, the navigation module is also used to train the entity recognition model:
[0045] Obtain sample data, where both the voice text information and the search text information contain the point of interest text;
[0046] Randomly extract some text from other texts for masking to obtain mask data;
[0047] Input sample data and mask data into the initial model, and obtain the prediction results output by the initial model;
[0048] Calculate the loss function value between the prediction result and the sample data;
[0049] When the loss function value is greater than the preset loss threshold, the model parameters of the initial model are adjusted until the loss function value is less than or equal to the preset loss threshold, and the converged initial model is used as the entity recognition model.
[0050] As an optional implementation of the present disclosure, the navigation module is further used to: when the similarity between the first voice segment and the historical voice data is less than a preset threshold, perform voice recognition on the first voice segment to obtain second text information;
[0051] Named entity recognition is performed on the second text information to obtain a second point of interest recognition result, and a second navigation route is generated according to the second point of interest indicated by the second point of interest recognition result.
[0052] As an optional implementation of the present disclosure, the navigation module is further used to: receive an assisted driving instruction;
[0053] The assisted driving function is started in response to the assisted driving instruction, and assisted driving control is performed according to the historical navigation route.
[0054] As an optional implementation of the present disclosure, the extraction module is specifically used to: remove navigation keywords from the first text information to obtain reference text information;
[0055] Determining, according to the text position of the reference text information in the first text information, an audio position of a first voice segment corresponding to the reference text information in the voice data;
[0056] A first voice segment is obtained from the voice data according to the audio position.
[0057] As an optional implementation of the present disclosure, there is at least one voice segment corresponding to the historical voice data;
[0058] The acquisition module acquires historical voice data and calculates the similarity between the first voice segment and the historical voice data, and is specifically used to: respectively calculate the similarity between the first voice segment and at least one voice segment to obtain at least one similarity.
[0059] As an optional implementation of the present disclosure, the navigation module, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, obtains a historical navigation route corresponding to the historical voice data, specifically for: determining a second voice segment with the highest similarity from at least one similarity, and comparing the similarity corresponding to the second voice segment with the preset threshold;
[0060] When the similarity corresponding to the second voice segment is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained.
[0061] In a third aspect, the present disclosure provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for generating a navigation route as described in the first aspect or any one of its optional embodiments is implemented.
[0062] In a fourth aspect, the present disclosure provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method for generating a navigation route as described in the first aspect or any optional embodiment thereof.
[0063] In a fifth aspect, the present disclosure provides a vehicle, comprising: a navigation route generating device as described in the second aspect or any optional embodiment thereof, or an electronic device as described in the third aspect.
[0064] In a sixth aspect, the present disclosure provides a computer program product, comprising: when the computer program product is run on a computer, the computer is enabled to implement the method for generating a navigation route as described in the first aspect or any optional embodiment thereof.
[0065] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating a navigation route, wherein the method acquires voice data, performs voice recognition to obtain first text information corresponding to the voice data, and when the first text information contains navigation keywords, it indicates that the user has navigation intention, and then determines the navigation route according to the voice data: firstly, a first voice segment corresponding to other text information except the navigation keywords is extracted from the voice data, and similarity is calculated with historical voice data in historical assisted driving scenarios, and then, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is acquired to match the user's historical habits for navigation. In the present disclosure, when the first voice segment in the voice data matches the historical voice data in the historical assisted driving scenario, the historical navigation route corresponding to the historical voice data is used to adapt the user's historical habits to generate a navigation route suitable for assisted driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0068] Figure 1 A flowchart of a method for generating a navigation route provided in an embodiment of the present disclosure;
[0069] Figure 2 The present disclosure provides a schematic diagram of the structure of a device for generating a navigation route;
[0070] Figure 3 A schematic structural diagram of an electronic device is provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION
[0071] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0072] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0073] At present, the vehicles with assisted driving functions on the market only have one or several driving assistance functions, and there is no auxiliary control of the vehicle according to the driver's navigation intention. The functions realized by assisted driving are relatively simple and limited. There is no navigation system product specifically for assisted driving, and it is even more impossible to match the user's habits for navigation for assisted driving. The grammatical rules used by traditional navigation system products when using speech recognition technology to convert human voice into input recognizable by the chip of the electronic device are to match a sentence in the voice command as a whole with all the contents in the model library. For example, if the voice command issued by the driver is "No. D, Road C, District B, City A", the existing grammatical rule is to match "No. D, Road C, District B, City A" as a whole with all possible place name combinations in the place name database ( / model library) at one time. Therefore, when the scale of the model library is large, the time for matching and identification will be very long, which seriously wastes system resources and time. Therefore, there is an urgent need for a navigation route generation method suitable for assisted driving.
[0074] In order to solve all or part of the above-mentioned technical problems, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating a navigation route. The method first acquires voice data, performs voice recognition to obtain first text information corresponding to the voice data, and when the first text information contains navigation keywords, it indicates that the user has navigation intention, and then determines the navigation route according to the voice data: first, extract the first voice segment corresponding to other text information except the navigation keywords from the voice data, and calculate the similarity with the historical voice data in the historical assisted driving scenario, and then, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, obtain the historical navigation route corresponding to the historical voice data, so as to match the user's historical habits for navigation, and realize assisted driving adapted to the user's habits.
[0075] In the case where the first voice segment in the voice data matches the historical voice data in the historical assisted driving scenario, the historical navigation route corresponding to the historical voice data is used to adapt to the user's historical habits; otherwise, named entity recognition is performed on the first text information corresponding to the voice data to accurately understand the user's navigation interest points, thereby generating an accurate navigation route based on the navigation interest points. This enables assisted driving to adapt to user habits and improves the accuracy of navigation route generation.
[0076] The method for generating a navigation route provided in the embodiment of the present disclosure may be implemented by a navigation route generation device or an electronic device, wherein the electronic device may include but is not limited to: a car machine, a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. Car machine. The operating system of the car machine may include Android (Android), a mobile operating system (iOS) developed by Apple, an operating system (Windows) developed by Microsoft Corporation of the United States, etc., and the embodiment of the present disclosure is not limited to this. The server includes but is not limited to a single network server, a server group consisting of multiple network servers, or a cloud composed of a large number of computers or network servers in cloud computing, wherein cloud computing is a kind of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. Among them, the electronic device can be operated alone to implement the present disclosure, or it can be connected to the network and implement the present disclosure through interactive operations with other electronic devices in the network. Among them, the network in which the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN) network, etc.
[0077] It should be noted that the protection scope of the method for generating a navigation route described in the embodiment of the present disclosure is not limited to the execution order of the steps listed in the present embodiment, and all solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present disclosure are included in the protection scope of the present disclosure.
[0078] like Figure 1 As shown, Figure 1 A flowchart of a method for generating a navigation route provided in an embodiment of the present disclosure is provided. The method comprises the following steps S101 to S104:
[0079] S101: Acquire voice data, and perform voice recognition on the voice data to obtain first text information.
[0080] The voice data is the voice data of the user inputting the voice command after the vehicle navigation function is started.
[0081] In some embodiments, the user can wake up the vehicle navigation function through voice wake-up or manual button pressing and obtain voice data.
[0082] The disclosed embodiment provides an implementation method, after the vehicle voice system is turned on, the user can first start the vehicle navigation application by manually pressing a button, thereby waking up the vehicle navigation function, and then input a voice command to the vehicle. For example, the user starts the vehicle by pressing a button, and then can start the vehicle navigation application by saying a sentence such as "open map" or "start navigation" through voice control, and then can input a voice command to the vehicle.
[0083] The disclosed embodiment provides another implementation method, after the car voice system is turned on, the user starts the car navigation function by voice control, inputs voice commands to the car, frees the user's hands, and is more convenient. Thus, different startup methods are provided to start voice control navigation, providing convenience for users.
[0084] In some embodiments, after acquiring the voice data, voice recognition is performed to realize voice-to-text conversion and convert the voice data into first text information. Among them, voice recognition (Automatic Speech Recognition, ASR) can recognize the voice data into text.
[0085] S102: If the first text information contains a navigation keyword, extract a first voice segment from the voice data.
[0086] The navigation keywords are pre-set words that represent the user's navigation intention, such as navigation, go, arrive, I want to go, etc.
[0087] The first voice segment contains other text information besides the navigation keyword, including a point of interest (POI), such as address information.
[0088] In some embodiments, after converting the voice data into the first text information, the first text information is segmented to obtain multiple segmentations contained in the first text information, the multiple segmentations are matched with the navigation keywords, and the similarity between each of the multiple segmentations and the navigation keywords is calculated. When the similarity is greater than a preset threshold, it is determined that the segmentation is a navigation keyword, indicating that there is an obvious user navigation intention in the voice data.
[0089] Further, in the case where the first text information includes the navigation keyword, a first voice segment is extracted from the voice data, the first voice segment including other text information except the navigation keyword. It is understandable that other voice segments except the voice segment corresponding to the navigation keyword are extracted from the voice data.
[0090] In some embodiments, in the process of extracting the first voice segment from voice data, the navigation keywords are first removed from the first text information to obtain reference text information, and then based on the correspondence between voice and text, the text position corresponding to the reference text information in the first text information is determined, and then the audio position of the first voice segment corresponding to the reference text information in the voice data is determined, and then the first voice segment is intercepted from the voice data according to the audio position.
[0091] Exemplarily, the first text information corresponding to the voice data is "Navigate to the shop", where "Navigate to" is a navigation keyword. It is removed from the first text information, and the reference text information obtained is "Shop". Each character in the first text information can correspond to a partial audio position in the voice data. After determining the text position corresponding to "Shop" in the first text information, the audio position of the first audio clip corresponding to "Shop" in the voice data can be determined, thereby obtaining the first audio clip from the voice data based on the audio position.
[0092] In another embodiment, in the process of extracting the first voice segment from the voice data, the text position of the navigation keyword in the first text information is first determined based on the correspondence between voice and text, and then the audio position in the voice data corresponding to the text position is determined, and the voice segment corresponding to the audio position is removed from the voice data to obtain the first voice segment.
[0093] In the above embodiment, when it is determined that the first text information contains navigation keywords and it is determined that the user has an obvious navigation intention, the first voice segment is extracted from the voice data, thereby further determining the navigation interest point to locate the effective information in the voice data, which is conducive to accurate navigation.
[0094] S103: Acquire historical voice data, and calculate the similarity between the first voice segment and the historical voice data.
[0095] The historical voice data is the voice data input in the historical assisted driving scenario, and is stored in the historical assisted driving database. The historical assisted driving database includes: the historical voice data input by the user in the assisted driving scenario, the voice segments corresponding to the historical voice data, and the historical navigation routes corresponding to the historical voice data.
[0096] In some embodiments, the first voice segment is queried in the historical assisted driving database to calculate the similarity between the first voice segment and the historical voice data in the database. Optionally, a dynamic time warping (DTW) algorithm can be used to calculate the similarity, or a clustering algorithm can be used to classify and determine whether the first voice segment and the historical voice data belong to the same category to reflect the similarity between the two. Other algorithms can also be used, and the present disclosure does not limit this.
[0097] In some embodiments, there is at least one voice segment corresponding to the historical voice data. In the process of calculating the similarity between the first voice segment and the historical voice data, the similarity between each audio segment in the at least one voice segment and the first audio segment is calculated to obtain at least one similarity. Optionally, a target similarity with the greatest similarity is determined from the at least one similarity and compared with a preset threshold. The preset threshold is a pre-set similarity threshold used to measure whether two voice segments are similar.
[0098] The above embodiment matches the first voice segment extracted from the current voice data with the historical voice data to determine whether the current navigation is the same as the route of a previous assisted driving navigation, so as to recommend a navigation route faster and more accurately according to user habits.
[0099] S104: When the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, obtain a historical navigation route corresponding to the historical voice data.
[0100] In some embodiments, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, it indicates that the user has navigated to the point of interest corresponding to the first voice segment in the historical assisted driving scenario. It can be understood that the historical assisted driving navigation has been to the same address, so the historical navigation route corresponding to the historical voice data is obtained. The historical navigation route conforms to the user's habits and is an assisted driving navigation route that is more suitable for the user.
[0101] In some embodiments, when the similarity between a first voice segment and a second voice segment in historical voice data is greater than or equal to a preset threshold, it indicates that the point of interest corresponding to the first voice segment is similar to the point of interest corresponding to the second voice segment, indicating that the user wants assisted driving navigation to an address that the user has visited in historical assisted navigation driving, thereby obtaining the historical navigation segment corresponding to the second voice segment in the historical voice data.
[0102] In the above embodiment, when it is determined that the first voice segment is similar to the historical voice data, a historical navigation route that meets the user's habits is obtained, so as to perform the assisted driving navigation in accordance with the user's requirements and improve the user's experience.
[0103] In other embodiments, when the similarity between the first voice segment and the historical voice data is less than a preset threshold, named entity recognition is performed on the first text information to obtain a first point of interest recognition result, and a first navigation route is generated based on the first point of interest indicated by the first point of interest recognition result.
[0104] When the similarity between the first voice segment and the historical voice data is less than a preset threshold, optionally, when the similarity corresponding to the second voice segment with the highest similarity to the first voice segment in the historical voice data is less than the preset threshold, it indicates that the address expected by the user this time is different from the address of the historical navigation route, and then named entity recognition (NER) is performed on the first text information to obtain a first point of interest recognition result, and a second navigation route is generated according to the first point of interest indicated by the first point of interest recognition result.
[0105] In some embodiments, when the similarity between the first voice segment and the historical voice data is less than a preset threshold, voice recognition is performed on the first voice segment to obtain second text information. The first voice segment is obtained after removing the voice segment corresponding to the navigation keyword, and the proportion of effective information is large, so that voice recognition can be performed on the points of interest of this navigation in a targeted manner, and then named entity recognition is performed on the second text information to obtain a second point of interest recognition result, thereby improving the accuracy of named entity recognition, and further generating a second navigation route according to the second point of interest indicated by the second point of interest recognition result.
[0106] In some embodiments, when the similarity between the first voice segment and the historical voice data is less than a preset threshold, voice recognition is performed on the first voice segment to obtain second text information, and then named entity recognition is performed on both the first text information and the second text information to obtain a third point of interest recognition result. The third point of interest recognition result is a comprehensive recognition result of the two types of text information, which is more accurate. Therefore, generating a third navigation route based on the third point of interest indicated by the third point of interest recognition result is more accurate.
[0107] In some embodiments, in the process of performing named entity recognition on text information, named entity recognition can be implemented through an entity recognition model. Optionally, the first text information and / or the second text information is used as input to the entity recognition model, and the interest point recognition results corresponding to the first text information and / or the second text information output by the entity recognition model are obtained from each other.
[0108] The entity recognition model is a model that is trained to converge based on sample data and mask data. The sample data (completion) includes voice text information and search text information, and the mask data (prompt) is a random masking process performed on the interest point text based on the sample data.
[0109] The voice text information is the text information corresponding to the voice data in the user log. The search text information is the text information corresponding to the address search in the user log. Optionally, the text is completed using the preset navigation sentence and address to obtain the complete search text information. Both the voice text information and the search text information contain the text of the point of interest, such as the address.
[0110] Based on the speech text information, for other texts except the point of interest (POI) text, some texts in other texts are randomly extracted for masking. The introduction of masking allows the model to only calculate the actual information, avoiding the waste of resources and time, avoiding the leakage or misidentification of sensitive information, improving the model's tolerance to noise and errors, avoiding overfitting and misjudgment, adapting to different types of input data, and improving the versatility and scalability of the model.
[0111] The following is an introduction to the training process of the entity recognition model:
[0112] (1) Obtain sample data.
[0113] In some embodiments, voice data in user log data is obtained, and the voice data is converted into text information to obtain voice text information; address search data in the user log data is obtained, and the addresses in the address search data are completed using preset navigation sentences to obtain search text information.
[0114] (2) Perform random masking on the sample data to obtain masked data.
[0115] In some embodiments, other texts in the speech text information and search text information except the points of interest are randomly masked. It can be understood that a portion of the text is randomly extracted from other texts and masked to obtain speech text information containing masks and search text information containing masks as mask data. Random masking is performed on the basis of sample data to obtain masked data, which improves the performance and efficiency of model training.
[0116] (3) Input the sample data and mask data into the initial model to obtain the prediction results output by the initial model.
[0117] Among them, the initial model (base model) can be a large model, which is a model with a very large number of model parameters in machine learning or deep learning. These models usually consist of millions or billions of parameters, can train and predict large amounts of data, and have good recognition effects and high accuracy. For example, the initial model is a model based on the Generative Pre-Training (GPT) framework, Curie, Babbage, Ada, etc. Curie is a medium-to-large language model that consists of 1.3 billion parameters and can be used for tasks such as natural language generation, answering questions, and text classification. Babbage is a medium-sized language model that consists of 600 million parameters and can be used for text generation, answering questions, and classification tasks. Ada is a large-scale, multi-task language model that can perform a variety of different natural language tasks, such as question answering, generation, and classification.
[0118] In some embodiments, before the sample data and the mask data are input into the initial model, the sample data and the mask data are used to construct the pre-fine-tuning data, and then the pre-fine-tuning data is converted into data in jsonl format. Thus, the data in jsonl format is used as the input of the initial model. Compared with the single-word sequence labeling method of traditional training data, using the data in jsonl format as the input of the initial model eliminates the sequence labeling work of the model training data, thereby saving manpower and improving the accuracy of the model.
[0119] Example of data in jsonl format:
[0120] {"prompt":"MASKGo to Beijing Railway Station Parking Lot->","completion":"Beijing Railway Station Parking Lot\n"}
[0121] {"prompt":"Open the map, MASK Beijing Railway Station->","completion":"Beijing Railway Station\n"}
[0122] (4) Adjust the model parameters of the initial model
[0123] After obtaining the prediction results output by the initial model, the loss function value between the prediction results and the sample data is calculated. When the loss function value is greater than the preset loss threshold, the model parameters of the initial model are adjusted.
[0124] When the loss function value is less than or equal to a preset loss threshold, it is determined that the initial model has converged, and the converged initial model is used as an entity recognition model for named entity recognition.
[0125] Furthermore, when the similarity between the first voice segment and the historical voice data is less than a preset threshold, the trained entity recognition model can be used to perform named entity recognition on the first text information to obtain a first point of interest recognition result, and then generate a first navigation route based on the first point of interest indicated by the first point of interest recognition result. The named entity recognition of other text information using the trained entity recognition model is similar to this, and the disclosure will not repeat it here.
[0126] In some embodiments, after executing the above step S104 and obtaining the historical navigation route or the first navigation route, an assisted driving instruction is received; the assisted driving function is started in response to the assisted driving instruction, and assisted driving control is performed according to the historical navigation route or the first navigation route. Thus, voice-controlled navigation realizes assisted driving, improving the safety and accuracy of assisted driving.
[0127] Optionally, the assisted driving instruction is a voice instruction. After receiving the assisted driving instruction, the sound source position is determined according to the sound phase and loudness of the assisted driving instruction, and it is judged whether the sound source position is the main driving position. If so, the assisted driving function is started in response to the assisted driving instruction, and the assisted driving control is performed according to the historical navigation route or the first navigation route. Otherwise, the driver is prompted by voice to confirm whether to start the assisted driving function, thereby ensuring the safety of assisted driving.
[0128] In summary, the embodiments of the present disclosure provide a method for generating a navigation route, which obtains voice data, performs voice recognition to obtain first text information corresponding to the voice data, and when the first text information contains navigation keywords, it indicates that the user has navigation intention, and then determines the navigation route according to the voice data: first, a first voice segment corresponding to text information other than the navigation keywords is extracted from the voice data, and a similarity calculation is performed with historical voice data in historical assisted driving scenarios, and then, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained to match the user's historical habits for navigation; and when the similarity between the first voice segment and the historical voice data is less than a preset threshold, named entity recognition is performed on the first text information corresponding to the voice data to obtain a first point of interest recognition result, so as to understand the user's navigation points according to the voice data, and then generate a second navigation route according to the first point of interest indicated by the first point of interest recognition result, so as to achieve accurate voice navigation. In the case where the first voice segment in the voice data matches the historical voice data in the historical assisted driving scenario, the historical navigation route corresponding to the historical voice data is used to adapt to the user's historical habits; otherwise, named entity recognition is performed on the first text information corresponding to the voice data to accurately understand the user's navigation interest points, thereby generating an accurate navigation route based on the navigation interest points. This enables assisted driving to adapt to user habits and improves the accuracy of navigation route generation.
[0129] like Figure 2 As shown, Figure 2 The present disclosure provides a schematic structural diagram of a device for generating a navigation route, the device comprising:
[0130] The acquisition module 201 is used to acquire voice data and perform voice recognition on the voice data to obtain first text information;
[0131] An extraction module 202 is configured to extract a first voice segment from the voice data if the first text information contains a navigation keyword, the first voice segment containing other text information except the navigation keyword;
[0132] A calculation module 203 is used to obtain historical voice data and calculate the similarity between the first voice segment and the historical voice data, where the historical voice data is voice data input in a historical assisted driving scenario;
[0133] The navigation module 204 is configured to obtain a historical navigation route corresponding to the historical voice data when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold.
[0134] As an optional implementation of the present disclosure, the navigation module 204 is further configured to: when the similarity between the first voice segment and the historical voice data is less than a preset threshold, input the first text information into the entity recognition model, and obtain a first point of interest recognition result output by the entity recognition model;
[0135] The entity recognition model is a model that is trained and converged based on sample data and mask data; the sample data includes speech text information and search text information, and the mask data is a random masking process performed on other texts except the point of interest text based on the sample data;
[0136] A first navigation route is generated according to the first point of interest indicated by the first point of interest recognition result.
[0137] As an optional implementation of the present disclosure, the navigation module 204 is also used to train the entity recognition model:
[0138] Obtain sample data, where both the voice text information and the search text information contain the point of interest text;
[0139] Randomly extract some text from other texts for masking to obtain mask data;
[0140] Input sample data and mask data into the initial model, and obtain the prediction results output by the initial model;
[0141] Calculate the loss function value between the prediction result and the sample data;
[0142] When the loss function value is greater than the preset loss threshold, the model parameters of the initial model are adjusted until the loss function value is less than or equal to the preset loss threshold, and the converged initial model is used as the entity recognition model.
[0143] As an optional implementation of the present disclosure, the navigation module 204 is further configured to: when the similarity between the first voice segment and the historical voice data is less than a preset threshold, perform voice recognition on the first voice segment to obtain second text information;
[0144] Named entity recognition is performed on the second text information to obtain a second point of interest recognition result, and a second navigation route is generated according to the second point of interest indicated by the second point of interest recognition result.
[0145] As an optional implementation of the present disclosure, the navigation module 204 is further used to: receive an assisted driving instruction;
[0146] The assisted driving function is started in response to the assisted driving instruction, and assisted driving control is performed according to the historical navigation route.
[0147] As an optional implementation of the present disclosure, the extraction module 202 is specifically used to: remove navigation keywords from the first text information to obtain reference text information;
[0148] Determining, according to the text position of the reference text information in the first text information, an audio position of a first voice segment corresponding to the reference text information in the voice data;
[0149] A first voice segment is obtained from the voice data according to the audio position.
[0150] As an optional implementation of the present disclosure, there is at least one voice segment corresponding to the historical voice data;
[0151] The acquisition module 201 acquires historical voice data and calculates the similarity between the first voice segment and the historical voice data, and is specifically used to: respectively calculate the similarity between the first voice segment and at least one voice segment to obtain at least one similarity.
[0152] As an optional implementation of the present disclosure, the navigation module 204, when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, obtains a historical navigation route corresponding to the historical voice data, specifically for: determining a second voice segment with the highest similarity from at least one similarity, and comparing the similarity corresponding to the second voice segment with the preset threshold;
[0153] When the similarity corresponding to the second voice segment is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained.
[0154] like Figure 3 As shown, Figure 3 The present disclosure provides a schematic diagram of the structure of an electronic device, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, each process of the method for generating a navigation route in the above method embodiment is implemented. The same technical effect can be achieved, and it will not be described here to avoid repetition.
[0155] The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the method for generating a navigation route in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0156] The computer readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0157] The disclosed embodiment provides a vehicle, which includes the aforementioned navigation route generation device, or the aforementioned electronic device, so as to implement the various processes of the navigation route generation method in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described here.
[0158] The embodiment of the present disclosure provides a computer program product, which stores a computer program. When the computer program is executed by a processor, the various processes of the method for generating a navigation route in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0159] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0160] In the present disclosure, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0161] In the present disclosure, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0162] In the present disclosure, computer-readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0163] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0164] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a navigation route, characterized in that: include: Acquiring voice data, and performing voice recognition on the voice data to obtain first text information; If the first text information includes a navigation keyword, extracting a first voice segment from the voice data, the first voice segment including other text information except the navigation keyword; Acquire historical voice data, and calculate the similarity between the first voice segment and the historical voice data, wherein the historical voice data is voice data input in a historical assisted driving scenario; When the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold, a historical navigation route corresponding to the historical voice data is obtained.
2. The method according to claim 1, characterized in that The method further comprises: When the similarity between the first voice segment and the historical voice data is less than a preset threshold, inputting the first text information into an entity recognition model to obtain a first point of interest recognition result output by the entity recognition model; The entity recognition model is a model that is trained to converge based on sample data and mask data; the sample data includes speech text information and search text information, and the mask data is a random masking process performed on other texts except the point of interest text based on the sample data; A first navigation route is generated according to the first point of interest indicated by the first point of interest recognition result.
3. The method according to claim 2, characterized in that The training process of the entity recognition model includes: Acquire the sample data, wherein both the voice text information and the search text information include point of interest text; Randomly extracting part of the text from the other texts to perform masking processing to obtain the mask data; Inputting the sample data and the mask data into an initial model, and obtaining a prediction result output by the initial model; Calculating a loss function value between the prediction result and the sample data; When the loss function value is greater than a preset loss threshold, the model parameters of the initial model are adjusted until the loss function value is less than or equal to the preset loss threshold, and the converged initial model is used as the entity recognition model.
4. The method according to claim 1, characterized in that The method further comprises: When the similarity between the first voice segment and the historical voice data is less than a preset threshold, performing voice recognition on the first voice segment to obtain second text information; Named entity recognition is performed on the second text information to obtain a second point of interest recognition result, and a second navigation route is generated according to the second point of interest indicated by the second point of interest recognition result.
5. The method according to claim 1, characterized in that The method further comprises: Receive assisted driving instructions; The assisted driving function is started in response to the assisted driving instruction, and assisted driving control is performed according to the historical navigation route.
6. The method according to claim 1, characterized in that If the first text information contains a navigation keyword, extracting a first voice segment from the voice data includes: removing the navigation keyword from the first text information to obtain reference text information; Determining, according to the text position of the reference text information in the first text information, an audio position of a first voice segment corresponding to the reference text information in the voice data; The first voice segment is obtained from the voice data according to the audio position.
7. The method according to claim 1, characterized in that The historical voice data corresponds to at least one voice segment; The acquiring of historical voice data and calculating the similarity between the first voice segment and the historical voice data includes: The similarities between the first speech segment and the at least one speech segment are respectively calculated to obtain at least one similarity.
8. The method according to claim 7, characterized in that The acquiring of the historical navigation route corresponding to the historical voice data when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold comprises: Determining a second speech segment with the highest similarity from the at least one similarity, and comparing the similarity corresponding to the second speech segment with the preset threshold; When the similarity corresponding to the second voice segment is greater than or equal to the preset threshold, the historical navigation route corresponding to the historical voice data is obtained.
9. A navigation route generating device, characterized in that: include: An acquisition module, used for acquiring voice data, and performing voice recognition on the voice data to obtain first text information; an extraction module, configured to extract a first voice segment from the voice data if the first text information contains a navigation keyword, the first voice segment containing other text information except the navigation keyword; a calculation module, configured to obtain historical voice data and calculate the similarity between the first voice segment and the historical voice data, wherein the historical voice data is voice data input in a historical assisted driving scenario; The navigation module is used to obtain a historical navigation route corresponding to the historical voice data when the similarity between the first voice segment and the historical voice data is greater than or equal to a preset threshold.
10. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method for generating a navigation route as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating a navigation route according to any one of claims 1 to 8 is implemented.
12. A vehicle, characterized in that: include: The device for generating a navigation route as claimed in claim 9, or the electronic device as claimed in claim 10.
