Semantic understanding method and device, computer readable storage medium and electronic equipment

By detecting the correlation between user command information and location search scenarios, and using the preset location search scenario semantic understanding model for semantic understanding, the problem of difficult to accurately understand user location search needs in the prior art is solved, and the user experience is improved.

CN119005197APending Publication Date: 2024-11-22NIO TECH ANHUI CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411024021.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing semantic understanding methods are difficult to accurately understand the user's location search needs in driving scenarios, resulting in poor user experience.

Method used

By obtaining user command information, detecting its correlation with the location search scene, and using the preset location search scene semantic understanding model for semantic understanding, obtaining the target semantic understanding results. The model is based on a large language model and is trained through a training sample set, including the user instruction sample information in the site search scenario.

Benefits of technology

It realizes an accurate understanding of user location search needs in driving scenarios, provides services that are more in line with user needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005197A_ABST
    Figure CN119005197A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of natural language processing, and particularly relates to a semantic understanding method and device, a computer readable storage medium and electronic equipment. The method comprises the following steps: acquiring user instruction information; detecting whether the user instruction information is related to a place retrieval scene or not; wherein the site retrieval scene is an application scene for retrieving a site; if the user instruction information is related to a site retrieval scene, performing semantic understanding on the user instruction information by utilizing a preset site retrieval scene semantic understanding model to obtain a target semantic understanding result; wherein the place retrieval scene semantic understanding model is a large language model for performing semantic understanding in a place retrieval scene, and the place retrieval scene semantic understanding model is obtained by training based on a preset place retrieval scene semantic understanding training sample set; the place retrieval scene semantic understanding training sample set comprises each piece of user instruction sample information in the place retrieval scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of natural language processing technology, and in particular, relates to a semantic understanding method, device, computer-readable storage medium and electronic device. Background Art

[0002] With the advancement of artificial intelligence technology, various voice interaction applications have gradually entered people's work and life; for example, users can already use voice interaction to navigate while driving, which greatly improves the user's driving experience. However, in driving scenarios, the user's interactive voice may be relatively generalized. When searching for places (such as parking lots, shopping malls, supermarkets, hospitals, etc.) by voice, existing semantic understanding methods often have difficulty in accurately understanding the user's location search needs, resulting in a poor user experience. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a semantic understanding method, device, computer-readable storage medium and electronic device to solve the problem that the semantic understanding method in the prior art is difficult to accurately understand the user's location retrieval needs, resulting in a poor user experience.

[0004] A first aspect of an embodiment of the present application provides a semantic understanding method, which may include:

[0005] Get user command information;

[0006] Detecting whether the user instruction information is related to a location search scenario; wherein the location search scenario is an application scenario for searching for a location;

[0007] If the user instruction information is related to the location search scenario, a preset location search scenario semantic understanding model is used to perform semantic understanding on the user instruction information to obtain a target semantic understanding result;

[0008] Among them, the location retrieval scene semantic understanding model is a large language model for semantic understanding in a location retrieval scenario. The location retrieval scene semantic understanding model is trained based on a preset location retrieval scene semantic understanding training sample set. The location retrieval scene semantic understanding training sample set includes sample information of each user instruction in the location retrieval scenario.

[0009] A second aspect of the embodiments of the present application provides a semantic understanding device, which may include:

[0010] User instruction information module, used to obtain user instruction information;

[0011] A scene relevance detection module, used to detect whether the user instruction information is related to a location search scene; wherein the location search scene is an application scene for searching for a location;

[0012] A model semantic understanding module is used to perform semantic understanding on the user command information if the user command information is related to a place retrieval scenario, using a preset place retrieval scene semantic understanding model to obtain a target semantic understanding result; wherein the place retrieval scene semantic understanding model is a large language model that performs semantic understanding in a place retrieval scenario, and the place retrieval scene semantic understanding model is trained based on a preset place retrieval scene semantic understanding training sample set, and the place retrieval scene semantic understanding training sample set includes each user command sample information in the place retrieval scenario.

[0013] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned semantic understanding methods are implemented.

[0014] The fourth aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned semantic understanding methods when executing the computer program.

[0015] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps of any one of the above-mentioned semantic understanding methods.

[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain user instruction information; detect whether the user instruction information is related to the location retrieval scenario; wherein the location retrieval scenario is an application scenario for retrieving locations; if the user instruction information is related to the location retrieval scenario, a preset location retrieval scenario semantic understanding model is used to perform semantic understanding on the user instruction information to obtain a target semantic understanding result; wherein the location retrieval scenario semantic understanding model is a large language model for performing semantic understanding in a location retrieval scenario, and the location retrieval scenario semantic understanding model is trained based on a preset location retrieval scenario semantic understanding training sample set, and the location retrieval scenario semantic understanding training sample set includes each user instruction sample information in the location retrieval scenario. In the embodiments of the present application, a large language model can be used to accurately understand user needs in a location retrieval scenario, so that services that better meet user needs can be provided based on the results of semantic understanding, bringing users a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 A schematic diagram of a voice interaction process in a driving scenario;

[0019] Figure 2 This is a flow chart of an embodiment of a semantic understanding method in an embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of the semantic analysis process;

[0021] Figure 4 Schematic diagram of the relevance detection process for the location retrieval scenario;

[0022] Figure 5 Schematic diagram of semantic understanding for place retrieval scenarios;

[0023] Figure 6 A schematic diagram of the location search and result display process;

[0024] Figure 7 This is a structural diagram of an embodiment of a semantic understanding device in an embodiment of the present application;

[0025] Figure 8 This is a schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0028] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0029] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0030] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0031] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0032] With the advancement of artificial intelligence technology, various voice interaction applications have gradually entered people's work and life; for example, users can already use voice interaction to navigate while driving a car, which greatly improves the user's driving experience. However, in driving scenarios, the user's interactive voice may be relatively generalized. When searching for places (such as parking lots, shopping malls, supermarkets, hospitals, etc.) by voice, existing semantic understanding methods often find it difficult to accurately understand the user's location search needs, and thus fail to provide search results that meet the user's expectations, resulting in a poor user experience.

[0033] In view of this, the embodiments of the present application provide a semantic understanding method, device, computer-readable storage medium and electronic device to solve the problem that the semantic understanding method in the prior art is difficult to accurately understand the user's location retrieval needs, resulting in a poor user experience.

[0034] It should be noted that the execution subject of the method of the present application is an electronic device, specifically, it can be any common computing device such as a vehicle-mounted terminal, a mobile terminal, a cloud server, a desktop computer, a notebook, a PDA, a workstation, a smart phone, etc., or it can be other computing devices; alternatively, the execution subject of the method of the present application may include two or more electronic devices, which execute the method of the present application in a collaborative manner; for example, the execution subject of the method of the present application may include two electronic devices, a mobile terminal and a cloud server, the mobile terminal executes a part of the process, and the cloud server executes another part of the process, and the two complete the method of the present application in a collaborative manner.

[0035] In actual application scenarios, users can use interactive voice to instruct electronic devices to search for locations when needed, such as Figure 1 As shown; for example, in a driving scenario, the user can use interactive voice to instruct the on-board terminal device to search for nearby parking lots, cinemas, hospitals, supermarkets and other places, so that the user can efficiently obtain the information he needs while ensuring driving safety, which helps to improve the user's driving experience.

[0036] See also Figure 2 In the embodiment of the present application, an embodiment of a semantic understanding method may include steps S201 to S203:

[0037] Step S201: Obtain user instruction information.

[0038] In an embodiment of the present application, if a user's interactive voice is received, the user's interactive voice can be converted into corresponding text using voice recognition technology, and the text can be used as user instruction information.

[0039] Taking into account that there may be multiple rounds of questions and answers during the voice interaction process, if there is a previous round of interactive voice, the user command information here may specifically include the user command information of the previous round, the reply information of the previous round and the user command information of the current round; if there is no previous round of interactive voice, the user command information here may only include the user command information of the current round.

[0040] Step S202: Detect whether the user instruction information is related to the location search scenario.

[0041] In actual driving scenarios, the user's interactive voice may be relatively broad; therefore, after obtaining the user's command information, it is possible to detect whether the user's command information is related to the location retrieval scenario to determine whether the user has a real need for location retrieval.

[0042] For example, if the user command information is "a non-three-dimensional parking lot 300 meters away from me", it can be considered that the user command information is related to the location retrieval scenario (specifically a parking lot retrieval scenario). At this time, the user has a real need for location retrieval; if the user command information is "how about the second parking lot", it can be considered that the user command information is actually an irrelevant statement during the user chat process. At this time, the user does not have a real need for location retrieval.

[0043] Among them, the location search scenario is an application scenario for searching for locations, such as an application scenario for searching for parking lots, an application scenario for searching for hospitals, an application scenario for searching for supermarkets, an application scenario for searching for shopping malls, etc.

[0044] In the embodiment of the present application, if it is detected that the user instruction information is related to the location search scenario, the user instruction information can be semantically understood to better perform subsequent search operations. If it is detected that the user instruction information is irrelevant to the location search scenario, there is no need to call the corresponding model to perform semantic understanding of the location search, and the processing flow of the embodiment of the present application can be directly terminated.

[0045] Based on this, user command information that is irrelevant to the location retrieval scenario can be filtered out, and application scenarios that are truly related to the location retrieval scenario can be accurately identified, thereby improving the user experience and reducing the calls to the corresponding semantic understanding model, saving computing resources.

[0046] In an embodiment of the present application, before detecting whether the user command information is related to the location retrieval scenario, the user command information can be semantically analyzed to obtain a target semantic analysis result of the user command information; then, based on the target semantic analysis result, it is determined whether the user command information is related to the location retrieval scenario; wherein the target semantic analysis result can specifically include the domain, intent and slot information in the user command information, the domain can represent the corresponding subject area in the user command information, the intent can represent the user intent and purpose revealed in the user command information, and the slot information can be important information in the user command information.

[0047] Specifically, a preset natural language understanding (NLU) module (referred to as NLU semantic understanding module) can be used to perform semantic analysis and understanding on user instruction information; wherein, the NLU semantic understanding module can include a grammar rule module (Gram module) and an NLU single-round module, the Gram module can perform rule matching and parsing on user instruction information to extract structured information, and the NLU single-round module can perform semantic modeling and information extraction on the information output by the Gram module to extract the target semantic analysis results of the domain, intent, and slot information in the user instruction information, such as Figure 3 shown.

[0048] As just an example, the target semantic analysis result corresponding to "find a non-stereoscopic parking lot 300 meters away from me" can be: domain = navigation; intent = poi_search; slot = {"distance":"300 meters","preference":"non-stereoscopic","tag":"parking lot"}. Among them, the domain ("domain") is "navigation", i.e., the navigation domain, the intent ("intent") is "poi_search", i.e., location search, and the slot information ("slot") includes the distance ("distance") being "300 meters", the user's preference ("preference") being "non-stereoscopic", and the tag ("tag") being "parking lot".

[0049] Afterwards, the preset NLU distribution module can be used to detect whether the user instruction information is related to the location retrieval scenario; specifically, the NLU distribution module can include a regular matching module and a relevance detection model; the regular matching module can perform regular matching on the target semantic analysis results with the preset location retrieval rules to preliminarily determine whether the user instruction information is related to the location retrieval scenario. Here, the corresponding location retrieval rules can be summarized based on the characteristics of each user instruction in the location retrieval scenario. For example, user instructions in the location retrieval scenario are likely to include location nouns such as "parking lot", "hospital", and "cinema", as well as distance description words such as "nearby" and "meters"; based on this, various location retrieval rules can be written (specifically, various regular expressions), and then the target semantic analysis results can be regularly matched with each location retrieval rule.

[0050] If the target semantic analysis result fails to match any location search rule, it can be considered that the user instruction information is irrelevant to the location search scenario, and no subsequent process is required.

[0051] If the matching target semantic analysis result successfully matches at least one location search rule, a preset relevance detection model can be used to further detect whether the user instruction information is relevant to the location search scenario.

[0052] The relevance detection model is a pre-trained large language model (LLM) for relevance detection of location retrieval scenarios. Using the relevance detection model, it is possible to accurately detect whether the target semantic analysis result of the user instruction information is relevant to the location retrieval scenario.

[0053] In the embodiment of the present application, a correlation detection model may be first trained and then applied to correlation detection in an actual location retrieval scenario.

[0054] The following is a detailed introduction to the training process of the correlation detection model.

[0055] In an embodiment of the present application, a correlation detection training sample set for training a correlation detection model can be constructed. Among them, the correlation detection training sample set can include a second number of semantic analysis result samples and corresponding correlation result labels. The specific value of the second number can be set according to the actual task difficulty, and the embodiment of the present application does not limit this; for example, if the difficulty of the correlation detection task is high, the second number can be set to a larger value, so that the correlation detection model can better understand and learn the correlation detection task during the training process, and improve the performance of the correlation detection model; if the difficulty of the correlation detection task is low, the second number can be set to a smaller value to increase the training speed of the correlation detection model and save computing resources. Preferably, the second number in the embodiment of the present application can be set to 500.

[0056] Here, the semantic analysis result samples may include positive samples and negative samples; the positive samples are semantic analysis result samples related to the location retrieval scenario, and the negative samples are semantic analysis result samples that are not related to the location retrieval scenario. For example, the positive samples may be semantic analysis result samples related to parking lot retrieval, and the negative samples may be semantic analysis result samples related to weather retrieval.

[0057] In an embodiment of the present application, after obtaining a semantic analysis result sample, the semantic analysis result sample can be labeled to obtain a corresponding relevance result label; the relevance result label of the semantic analysis result sample can be used to indicate whether the semantic analysis result sample is related to a location retrieval scenario; specifically, the relevance result label can include a first result label and a second result label; wherein, the relevance result label of the positive sample can be the first result label, and the relevance result label of the negative sample can be the second result label; the first result label can be used to indicate that the semantic analysis result sample is related to the location retrieval scenario, and the second result label can be used to indicate that the semantic analysis result sample is not related to the location retrieval scenario.

[0058] In a specific implementation, each interactive speech in an actual location search application scenario and each interactive speech in other application scenarios except the location search application scenario can be collected, and semantic analysis can be performed on the collected interactive speech, and the semantic analysis result sample corresponding to the location search application scenario is used as a positive sample, and the semantic analysis result sample corresponding to other application scenarios is used as a negative sample; thereafter, the relevance result label of the positive sample can be set as the first result label, and the relevance result label of the negative sample can be set as the second result label. For example, each interactive speech in scenarios such as parking lot search and hospital search can be collected, and semantic analysis can be performed on the collected interactive speech to obtain a semantic analysis result sample, which can be used as a positive sample, and the relevance result label of the semantic analysis result sample can be set as the first result label; for another example, each interactive speech in scenarios such as weather search, music search, and film and television search can be collected, and semantic analysis can be performed on the collected interactive speech to obtain a semantic analysis result sample, which can be used as a negative sample, and the relevance result label of the semantic analysis result sample can be set as the second result label.

[0059] In another specific implementation, relevant generative models can be used to construct semantic analysis result samples and corresponding relevance result labels in various application scenarios. The generative model can be any common generative language model in the prior art, which is not limited in the embodiments of the present application. For example, the generative model can be ChatGPT or BERT. For example, ChatGPT can be used to construct semantic analysis result samples and corresponding relevance result labels for location search scenarios such as parking lot search and hospital search, as well as other search scenarios such as weather search, music search, and film and television search.

[0060] In a specific implementation, in order to streamline the model output, the relevance result label can be set to a specific value. Specifically, the first result label and the second result label can be set to different values ​​to concisely indicate whether the semantic analysis result sample is relevant to the location retrieval scenario; wherein, the specific value corresponding to the relevance result label can be concretized and situationalized according to actual needs, and the embodiments of the present application are not limited to this. Here, the first result label can be set to 1, and the second result label can be set to 0. Accordingly, by streamlining the output of the model, the latency of the relevance detection of the location retrieval scenario can be reduced.

[0061] Based on the second number of semantic analysis result samples and the corresponding relevance result labels, a relevance detection training sample set can be constructed.

[0062] Optionally, each semantic analysis result sample and the corresponding correlation result label can be manually reviewed to screen out the semantic analysis result samples and the corresponding correlation result labels that meet the requirements, and a correlation detection training sample set can be constructed based on the semantic analysis result samples and the corresponding correlation result labels that meet the requirements.

[0063] Afterwards, the initial second largest language model can be trained with each semantic analysis result sample as input and the corresponding correlation result label as expected output; wherein the second largest language model can be set with reference to any large language model in the prior art, and the embodiment of the present application does not specifically limit this. For example, the second largest language model can be an artificial intelligence model of a Transformer structure including a preset number of layers.

[0064] During the training process, for each semantic analysis result sample in the relevance detection training sample set, the second largest language model can be used to perform relevance detection on the semantic analysis result sample for the location retrieval scene, and the actual relevance detection result output by the second largest language model can be obtained. After that, the training loss value can be calculated using a preset loss function, the relevance result label of the semantic analysis result sample, and the actual relevance detection result. Among them, the loss function can be set according to the actual situation, for example, the loss function can be a cross entropy loss function, a mean square error loss function, or a logarithmic loss function, etc.

[0065] After the training loss value is calculated, the model parameters of the second largest language model can be adjusted according to the training loss value. In the embodiment of the present application, it is assumed that in the initial state, the model parameter in the second largest language model is W1, and the model parameter W1 of the second largest language model is modified by back propagation according to the training loss value to obtain the modified model parameter W2 of the second largest language model. After modifying the parameters, continue to execute the next training process. In this training process, recalculate the training loss value, and modify the model parameter W2 of the second largest language model according to the training loss value by back propagation to obtain the modified model parameter W3 of the second largest language model. Repeat the above process by analogy. The model parameters can be modified in each training process until the preset training conditions are met. The training condition can be that the number of trainings reaches a preset number threshold. The number threshold can be set according to the actual situation. For example, it can be set to thousands, tens of thousands, hundreds of thousands or even larger values; the training condition can also be that the second largest language model converges; because the number of trainings may not reach the number threshold, but the second largest language model has converged, it may cause unnecessary work to be repeated; or the second largest language model cannot converge all the time, which may cause an infinite loop and the training process cannot be ended. Based on the above two situations, the training condition can also be that the number of trainings reaches the number threshold or the second largest language model converges. When the training conditions are met, the correlation detection model of the embodiment of the present application can be obtained.

[0066] In a specific implementation, the correlation detection training sample set can be divided into a training sample set and a test sample set according to a preset division ratio. For example, 80% of the correlation detection training sample set can be used as the training sample set, and the remaining 20% ​​of the correlation detection training sample set can be used as the test sample set; the training sample set can be used to perform the above-mentioned model training, and the test sample set can be used to perform model testing; after the second largest language model is trained using the training sample set, the trained second largest language model can be model tested based on the test sample set to verify the performance of the trained second largest language model; and the accuracy of the second largest language model in the test sample set being greater than a preset accuracy threshold can be used as a training condition. When the second largest language model meets the training condition, it can be determined that the model training is completed, and the trained second largest language model is used as the correlation detection model of the embodiment of the present application.

[0067] In another specific implementation, parameter-efficient fine-tuning technology (PEFT) can be used to fine-tune a small part of the model parameters in the second largest language model, while most of the remaining model parameters can remain unchanged. Specifically, each group of hyperparameter combinations of the second largest language model can be searched, and for each group of hyperparameter combinations, low-rank adaptation (LoRA) can be used to fine-tune the model parameters based on the training loss value to obtain the second largest language model after each parameter is fine-tuned; then, the second largest language model with the highest detection accuracy can be selected from the second largest language models after each parameter is fine-tuned as the correlation detection model of the embodiment of the present application.

[0068] After the correlation detection model of the embodiment of the present application is trained, it can be applied to the correlation detection of the actual location retrieval scenario.

[0069] In the embodiment of the present application, if the target semantic analysis result successfully matches at least one location search rule, the target semantic analysis result can be used as the input of the relevance detection model to obtain the output result label of the result label relevance detection model, such as Figure 4 shown.

[0070] If the output result label corresponding to the target semantic analysis result is the same as the second result label, it can be considered that the target semantic analysis result is irrelevant to the location search scenario. At this time, there is no need to continue the subsequent process.

[0071] If the output result label corresponding to the target semantic analysis result is the same as the first result label, then it can be considered that the target semantic analysis result is related to the location search scenario. At this time, step S203 can be executed.

[0072] Step S203: If the user instruction information is related to the location search scenario, a preset location search scenario semantic understanding model is used to perform semantic understanding on the user instruction information to obtain a target semantic understanding result.

[0073] In an embodiment of the present application, the user instruction information may be matched with each location scene data in a preset semantic vector library to obtain a corresponding data matching degree; wherein the location scene data may include user instruction examples in a location retrieval scenario.

[0074] For example, in a real location search scenario, the user instructs the electronic device to search for underground parking lots with an interactive voice message "Which underground parking lot has the fastest walking time to the destination?", and the text information corresponding to "Which underground parking lot has the fastest walking time to the destination" can be used as a user instruction example. For another example, in a real location search scenario, the user instructs the electronic device to search for underground parking lots with an interactive voice message "The destination does not need an underground parking lot", and the text information corresponding to "The destination does not need an underground parking lot" can be used as a user instruction example.

[0075] In a specific implementation, the location scene data in the semantic vector library can be updated regularly to better meet the current needs of users.

[0076] In another specific implementation, the location scene data in the semantic vector library can be expressed in the form of a vector. Before the user command information is matched with each location scene data respectively, the user command information can be converted into a vector form and then matched with each location scene data respectively.

[0077] In an embodiment of the present application, after matching the user instruction information with the various location scene data in the semantic vector library and obtaining the corresponding data matching degrees, a target prompt word template can be determined from the preset prompt word templates based on the various data matching degrees; wherein the target prompt word template is a prompt word template for requesting a location retrieval scene semantic understanding model; the prompt word template is a preset format or framework (Prompt template) for guiding the location retrieval scene semantic understanding model to generate a target semantic understanding result.

[0078] If there is at least one data matching degree greater than the preset matching degree threshold, it can be considered that the semantic vector library matches data that is relatively similar to the user instruction information. At this time, the matching data can be used as a reference example for semantic understanding (few shot example), wherein the matching data is the location scene data whose data matching degree is greater than the matching degree threshold. The specific value of the matching degree threshold can be set according to actual needs, and the embodiment of the present application does not limit this. Preferably, the matching degree threshold can be set to 0.9. Afterwards, the preset first prompt word template can be determined as the target prompt word template, and the matching data and user instruction information can be filled into the first prompt word template. Among them, the first prompt word template can include a user instruction information filling module and a matching data filling module, the user instruction information filling module can be used to fill the user instruction information, and the matching data filling module can be used to fill the matching data.

[0079] If the matching degree of each data is less than or equal to the matching degree threshold, it can be considered that no data similar to the user instruction information is matched in the semantic vector library. At this time, the preset second prompt word template can be determined as the target prompt word template, and the user instruction information can be filled into the second prompt word template. The second prompt word template can include a user instruction information filling module.

[0080] In addition, other modules may be provided in the first prompt word template and the second prompt word template according to actual needs. For example, a fixed text module for describing a location search scenario may be provided.

[0081] Based on the target prompt word template, the location retrieval scene semantic understanding model can be used to semantically understand the user instruction information and obtain the target semantic understanding result, such as Figure 5 As shown in the figure, the target semantic understanding result is the search condition information for location search included in the user instruction information. Based on this, the target prompt word template can be determined based on the specific situation of data matching to make model requests, thereby avoiding unnecessary template parsing and improving the efficiency of semantic understanding; at the same time, selecting a reasonable prompt word template based on the specific situation of data matching can better guide the location retrieval scene semantic understanding model to perform semantic understanding and improve the accuracy of semantic understanding.

[0082] In the embodiment of the present application, the location retrieval scene semantic understanding model is a large language model for semantic understanding in the location retrieval scene, and the location retrieval scene semantic understanding model can be trained based on a preset location retrieval scene semantic understanding training sample set. The location retrieval scene semantic understanding training sample set may include a first number of user instruction sample information in the location retrieval scene and corresponding semantic understanding result labels.

[0083] In a specific implementation, each user instruction information in a location retrieval scenario can be collected and used as an instruction sample; then, the instruction sample can be matched with the location scene data in the semantic vector library. If the matching data can be successfully matched, the instruction sample and the matching data can be filled into a preset first prompt word template, and then the filled first prompt word template can be used as the user instruction sample information; if the matching data cannot be successfully matched, the instruction sample can be filled into a preset second prompt word template, and then the filled second prompt word template can be used as the user instruction sample information.

[0084] Afterwards, a corresponding semantic understanding result label can be set for the user instruction sample information; wherein, the semantic understanding result label corresponding to the user instruction sample information can at least include retrieval type information, location type information, location distance type information, location distance information, location screening distance type, related topic information or keyword information.

[0085] The search type information may be used to indicate a specific type of location search, for example, a specific type of location search such as a parking lot search, a hospital search, or a supermarket search.

[0086] The location type information can be used to indicate the specific type of the location. For example, in the application scenario of parking lot retrieval, the location type information can be the specific type of parking lot, such as ground parking lot, underground parking lot, multi-story parking lot, mechanical parking lot, and roadside parking lot. Optionally, the value of the location type information can be expressed in numerical form. For example, the value corresponding to the ground parking lot is 1, the value corresponding to the underground parking lot is 2, the value corresponding to the multi-story parking lot is 3, the value corresponding to the mechanical parking lot is 4, and the value corresponding to the roadside parking lot is 5.

[0087] The location distance type information may indicate the type of distance information, which may be the vehicle distance or the destination distance. If the location distance type information is the vehicle distance, it indicates that the distance information in the instruction sample describes the distance between the vehicle itself and the location; if the location distance type information is the destination distance, it indicates that the distance information in the instruction sample describes the distance between the destination and the location. For example, in the instruction sample of "parking lots within 300 meters from me", the distance information describes the distance between the vehicle itself and the location (parking lot), so the corresponding location distance type information is the vehicle distance; for another example, in the instruction sample of "parking lots within 300 meters from home", the distance information describes the distance between the destination (home) and the location (parking lot), so the corresponding location distance type information is the destination distance.

[0088] The location distance information may represent specific distance information, which may be in the form of a numerical value. For example, in the instruction sample "parking lots within 300 meters from me", the specific distance information is 300 meters, and the corresponding location distance information is 300.

[0089] The location filtering distance type can represent the type of distance or time when filtering locations. For example, in the application scenario of parking lot search, the location filtering distance type can include the default type (which can be set according to actual needs), the straight-line distance from the vehicle, the walking distance from the destination, and the walking time from the destination. The value of the location filtering distance type can be expressed in numerical form. For example, the value corresponding to the default type is 1, the value corresponding to the straight-line distance from the vehicle is 2, the value corresponding to the walking distance from the destination is 3, and the value corresponding to the walking time from the destination is 4.

[0090] The related topic information may represent other related descriptions of the location. For example, in the instruction sample of "parking lots near me", the corresponding related topic information may be "parking lots near me".

[0091] The keyword information may represent the keywords included in the instruction. For example, in the instruction sample of "parking lot near me", the corresponding keyword information may be "parking lot".

[0092] The specific composition of the semantic understanding result label can also be set according to actual needs, and this application does not limit this.

[0093] As just an example, the semantic understanding result label corresponding to the instruction "underground parking lot 300 meters away from me" can be:

[0094]

[0095] Among them, "type" is the search type information, and its value is "park_search", indicating that the specific type of location search is parking lot search; "value" includes the specific values ​​of location type information, location distance type information, location distance information, related subject information and keyword information; "searchType" is the location type information, and its value is "2.0", indicating that the specific type of parking lot is underground parking lot; "filterCondition" is the filtering condition information, which specifically includes location distance type information, location distance information and location filtering distance type; "toSelfDistance" in "filterCondition" indicates that the location distance type information is self-vehicle distance, and its value is "300", indicating that the distance information is 300; "type" in "filterCondition" indicates the location filtering distance type, and its value is "[2]", indicating that the distance type during filtering is the straight-line distance from the self-vehicle; "liveTitle" indicates the related subject information, and its value is "nearby parking lots"; "keyword" indicates the keyword information, and its value is "parking lot".

[0096] Based on the first number of user instruction sample information in the location retrieval scenario and the corresponding semantic understanding result labels, a location retrieval scenario semantic understanding training sample set can be constructed.

[0097] Afterwards, the initial first large language model can be trained with each user instruction sample information as input and the corresponding semantic understanding result label as the expected output; wherein the initial first large language model can be set with reference to any large language model in the prior art, and the embodiment of the present application does not specifically limit this. For example, the first large language model can be a large language model of a Transformer structure including a preset number of layers.

[0098] During the training process, for each user instruction sample information in the location retrieval scene semantic understanding training sample set, the first language model can be used to perform semantic understanding of the location retrieval scene on the user instruction sample information, and the actual semantic understanding result output by the first language model can be obtained. After that, the training loss value can be calculated using a preset loss function, the semantic understanding result label of the user instruction sample information, and the actual semantic understanding result. Among them, the loss function can be set according to the actual situation, for example, the loss function can be a cross entropy loss function, a mean square error loss function, or a logarithmic loss function, etc.

[0099] After the training loss value is calculated, the model parameters of the first largest language model can be adjusted according to the training loss value. In the embodiment of the present application, it is assumed that in the initial state, the model parameter in the first largest language model is W1, and the model parameter W1 of the first largest language model is modified by back propagation according to the training loss value to obtain the modified model parameter W2 of the first largest language model. After modifying the parameters, continue to execute the next training process. In this training process, recalculate the training loss value, and modify the model parameter W2 of the first language model according to the training loss value by back propagation to obtain the modified model parameter W3 of the first language model. Repeat the above process and so on. The model parameters can be modified in each training process until the preset training conditions are met. The training condition can be that the number of training times reaches a preset number threshold. The number threshold can be set according to the actual situation. For example, it can be set to thousands, tens of thousands, hundreds of thousands or even larger values; the training condition can also be that the first language model converges; because the number of training times may not reach the number threshold, but the first language model has converged, it may cause unnecessary work to be repeated; or the first language model cannot converge all the time, which may cause an infinite loop and the training process cannot be ended. Based on the above two situations, the training condition can also be that the number of training times reaches the number threshold or the first language model converges. When the training conditions are met, the location retrieval scene semantic understanding model of the embodiment of the present application can be obtained.

[0100] In a specific implementation, the location retrieval scene semantic understanding training sample set can be divided into a training sample set and a test sample set according to a preset division ratio. For example, 80% of the location retrieval scene semantic understanding training sample set is used as the training sample set, and the remaining 20% ​​of the location retrieval scene semantic understanding training sample set is used as the test sample set; the training sample set can be used for the above-mentioned model training, and the test sample set can be used for model testing; after the first largest language model is trained using the training sample set, the model can be tested based on the test sample set to verify the performance of the trained first largest language model; and the accuracy of the first largest language model in the test sample set being greater than a preset accuracy threshold can be used as a training condition. When the first largest language model meets the training condition, it can be determined that the model training is completed, and the trained first largest language model is used as the location retrieval scene semantic understanding model of an embodiment of the present application.

[0101] In another specific implementation, parameter-efficient fine-tuning technology (PEFT) can be used to fine-tune a small part of the model parameters in the first language model, while most of the remaining model parameters can remain unchanged. Specifically, each group of hyperparameter combinations of the first language model can be searched, and for each group of hyperparameter combinations, low-rank adaptation (LoRA) can be used to fine-tune the model parameters based on the training loss value to obtain a large language model after each parameter is fine-tuned; then, the first language model with the highest detection accuracy can be selected from the first language models after each parameter is fine-tuned as the location retrieval scene semantic understanding model of the embodiment of the present application.

[0102] After the location retrieval scene semantic understanding model is trained, it can be applied to the semantic understanding of actual location retrieval scenes.

[0103] In the embodiment of the present application, the target prompt word template can be used to request the location search scene semantic understanding model to obtain the target semantic understanding result. The specific composition of the target semantic understanding result is the same as the semantic understanding result label in the location search scene semantic understanding training sample set, and can at least include retrieval type information, location type information, location distance type information, location distance information, location screening distance type, related topic information or keyword information. The target semantic understanding result can be used as a retrieval condition in the subsequent location search process.

[0104] As just an example, the user instruction information is "roadside parking lot 500 meters away from me". The location retrieval scene semantic understanding model is used to perform semantic understanding on the user instruction information, and the target semantic understanding result obtained can be:

[0105]

[0106] Among them, "type" is the search type information, and its value is "park_search", indicating that the specific type of location search is parking lot search; "value" includes the specific values ​​of location type information, location distance type information, location distance information, related subject information and keyword information; "searchType" is the location type information, and its value is "5.0", indicating that the specific type of parking lot is roadside parking lot; "filterCondition" is the filtering condition information, which specifically includes location distance type information, location distance information and location filtering distance type; "toSelfDistance" in "filterCondition" indicates that the location distance type information is self-vehicle distance, and its value is "500", indicating that the distance information is 500; "type" in "filterCondition" indicates the location filtering distance type, and its value is "[2]", indicating that the distance type during filtering is the straight-line distance from the self-vehicle; "liveTitle" indicates the related subject information, and its value is "nearby parking lots"; "keyword" indicates the keyword information, and its value is "parking lot".

[0107] Compared with the process in the prior art that requires first generating target semantic analysis results of domain, intent, and slot and then encoding the target semantic analysis results, the embodiment of the present application can generate target semantic understanding results (i.e., end-to-end results) based on user command information with the help of a location retrieval scene semantic understanding model, without the need to generate intermediate result information of domain, intent, and slot. Accordingly, the process can be greatly simplified and the efficiency of semantic understanding can be improved.

[0108] In a specific implementation of the embodiment of the present application, after obtaining the target semantic understanding result, a location search can be performed based on the target semantic understanding result, and the location search result can be displayed as a result, such as Figure 6As shown. Specifically, a preset candidate location information set can be obtained, wherein the candidate location information set can include each candidate location information, and the candidate location information can be obtained through a preset navigation service interface. For example, the candidate location information may include location information such as parking lot information, hospital information, and supermarket information. Afterwards, each target location information that matches the target semantic understanding result can be retrieved from the candidate location information set; after each target location information is retrieved, each target location information can be displayed on a preset display interface; for example, after each target location information is retrieved, each target location information can be displayed on the display interface of the vehicle-mounted terminal; and the display order of the target location information can be set with reference to the prior art, and the present application does not make specific limitations on this. For example, each target location information can be displayed on the display interface in order of distance from near to far.

[0109] In summary, the embodiment of the present application obtains user command information; detects whether the user command information is related to a location retrieval scenario; wherein the location retrieval scenario is an application scenario for retrieving locations; if the user command information is related to the location retrieval scenario, a preset location retrieval scenario semantic understanding model is used to perform semantic understanding on the user command information to obtain a target semantic understanding result; wherein the location retrieval scenario semantic understanding model is a large language model for performing semantic understanding in a location retrieval scenario, and the location retrieval scenario semantic understanding model is trained based on a preset location retrieval scenario semantic understanding training sample set, and the location retrieval scenario semantic understanding training sample set includes each user command sample information in the location retrieval scenario. In the embodiment of the present application, a large language model can be used to accurately understand user needs in a location retrieval scenario, so that services that better meet user needs can be provided based on the results of semantic understanding, bringing users a better user experience.

[0110] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0111] Corresponding to a semantic understanding method described in the above embodiment, Figure 7 A structural diagram of an embodiment of a semantic understanding device provided in an embodiment of the present application is shown.

[0112] In an embodiment of the present application, a semantic understanding device may include:

[0113] User instruction information module 701, used to obtain user instruction information;

[0114] A scene relevance detection module 702 is used to detect whether the user instruction information is related to a location search scene; wherein the location search scene is an application scene for searching for a location;

[0115] The model semantic understanding module 703 is used to perform semantic understanding on the user command information by using a preset place retrieval scene semantic understanding model if the user command information is related to the place retrieval scenario, so as to obtain a target semantic understanding result; wherein the place retrieval scene semantic understanding model is a large language model for performing semantic understanding in a place retrieval scenario, and the place retrieval scene semantic understanding model is trained based on a preset place retrieval scene semantic understanding training sample set, and the place retrieval scene semantic understanding training sample set includes each user command sample information in the place retrieval scenario.

[0116] In a specific implementation of the embodiment of the present application, the model semantic understanding module includes:

[0117] A data matching submodule, for performing data matching on the user instruction information and each location scene data in a preset semantic vector library to obtain a corresponding data matching degree if the user instruction information is related to the location search scenario; wherein the location scene data includes user instruction examples in the location search scenario;

[0118] A target prompt word template determination submodule is used to determine a target prompt word template from preset prompt word templates based on the matching degree of each of the data;

[0119] The model semantic understanding submodule is used to perform semantic understanding on the user instruction information based on the target prompt word template and using the location retrieval scene semantic understanding model to obtain the target semantic understanding result.

[0120] In a specific implementation of the embodiment of the present application, the target prompt word template determination submodule includes:

[0121] a target prompt word template determining first unit, configured to determine the target prompt word template from a preset first prompt word template if at least one of the data matching degrees is greater than a preset matching degree threshold; wherein the first prompt word template includes a user instruction information filling module and a matching data filling module;

[0122] The target prompt word template determines the second unit, which is used to determine the target prompt word template with a preset second prompt word template if the matching degree of each of the data is less than or equal to the matching degree threshold; wherein the second prompt word template includes the user instruction information filling module. In a specific implementation of the embodiment of the present application, the semantic understanding device also includes:

[0123] A location search scenario semantic understanding training sample set acquisition module, used to acquire the location search scenario semantic understanding training sample set; wherein the semantic understanding training sample set includes a first number of user instruction sample information and corresponding semantic understanding result labels in the location search scenario;

[0124] The first model training module is used to train the initial first language model with each of the user instruction sample information as input and the corresponding semantic understanding result label as expected output to obtain the location retrieval scene semantic understanding model.

[0125] In a specific implementation of the embodiment of the present application, the scene correlation detection module includes:

[0126] A semantic analysis submodule, used to perform semantic analysis on the user instruction information to obtain a target semantic analysis result of the user instruction information;

[0127] A regular matching submodule, used for performing regular matching between the target semantic analysis result and each preset location search rule;

[0128] The scene relevance detection submodule is used to detect whether the target semantic analysis result is relevant to the place retrieval scene by using a preset relevance detection model if the target semantic analysis result successfully matches at least one of the place retrieval rules; wherein the relevance detection model is a large language model pre-trained for relevance detection of place retrieval scenes.

[0129] In a specific implementation of the embodiment of the present application, the semantic understanding device further includes:

[0130] A correlation detection training sample set acquisition module, used to acquire a preset correlation detection training sample set; wherein the correlation detection training sample set includes a second number of semantic analysis result samples and corresponding correlation result labels, the semantic analysis result samples include positive samples and negative samples, the positive samples are the semantic analysis result samples related to the location retrieval scenario, and the negative samples are the semantic analysis result samples unrelated to the location retrieval scenario;

[0131] The second model training module is used to train the initial second largest language model with each of the semantic analysis result samples as input and the corresponding relevance result label as expected output to obtain the relevance detection model.

[0132] In a specific implementation of the embodiment of the present application, the semantic understanding device further includes:

[0133] A candidate location information set acquisition module, used to acquire a preset candidate location information set;

[0134] A location retrieval module, used to retrieve the candidate location information set based on the target semantic understanding result to obtain each target location information; wherein the target location information is the candidate location information in the candidate location information set that matches the target semantic understanding result;

[0135] The location information display module is used to display the target location information on a preset display interface.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] Figure 8 A schematic block diagram of an electronic device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0139] like Figure 8 As shown, the electronic device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned various semantic understanding method embodiments are implemented, for example Figure 2 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 7 The functions of modules 701 to 703 are shown.

[0140] Exemplarily, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the electronic device 8.

[0141] Those skilled in the art will understand that Figure 8It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 8 may also include input and output devices, network access devices, buses, etc.

[0142] The processor 80 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 any conventional processor, etc.

[0143] The memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the electronic device 8. The memory 81 may also be used to temporarily store data that has been output or is to be output.

[0144] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0145] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0146] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0147] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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.

[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0150] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0151] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

[0152] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0153] The user personal information processed by the applicant will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, which may involve the user's account information, device information, driving information, vehicle information or other related information. The applicant will treat the user's personal information and its processing with a high degree of diligence.

[0154] The Applicant attaches great importance to the security of user personal information and has adopted reasonable and feasible security protection measures that comply with industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

Claims

1. A semantic understanding method, characterized in that: include: Get user command information; Detecting whether the user instruction information is related to a location search scenario; wherein the location search scenario is an application scenario for searching for a location; If the user instruction information is related to the location search scenario, a preset location search scenario semantic understanding model is used to perform semantic understanding on the user instruction information to obtain a target semantic understanding result; Among them, the location retrieval scene semantic understanding model is a large language model for semantic understanding in a location retrieval scenario. The location retrieval scene semantic understanding model is trained based on a preset location retrieval scene semantic understanding training sample set. The location retrieval scene semantic understanding training sample set includes sample information of each user instruction in the location retrieval scenario.

2. The semantic understanding method according to claim 1, characterized in that: If the user instruction information is related to the location search scenario, a preset location search scenario semantic understanding model is used to perform semantic understanding on the user instruction information to obtain a target semantic understanding result, including: If the user instruction information is related to the location search scenario, the user instruction information is matched with each location scene data in the preset semantic vector library to obtain the corresponding data matching degree; wherein the location scene data includes user instruction examples in the location search scenario; Based on the matching degree of each data, determining a target prompt word template from preset prompt word templates; Based on the target prompt word template, the location retrieval scene semantic understanding model is used to perform semantic understanding on the user instruction information to obtain the target semantic understanding result.

3. The semantic understanding method according to claim 2, characterized in that: The step of determining a target prompt word template from preset prompt word templates based on the matching degree of each data includes: If there is at least one data matching degree greater than a preset matching degree threshold, the preset first prompt word template is used to determine the target prompt word template; wherein the first prompt word template includes a user instruction information filling module and a matching data filling module; If the matching degree of each of the data is less than or equal to the matching degree threshold, the preset second prompt word template is used to determine the target prompt word template; wherein the second prompt word template includes the user instruction information filling module.

4. The semantic understanding method according to claim 3, characterized in that: The training process of the location retrieval scene semantic understanding model includes: Acquire the semantic understanding training sample set of the location retrieval scenario; wherein the semantic understanding training sample set includes a first number of user instruction sample information and corresponding semantic understanding result labels in the location retrieval scenario; Taking each of the user instruction sample information as input and the corresponding semantic understanding result label as expected output, the initial first language model is trained to obtain the location retrieval scene semantic understanding model.

5. The semantic understanding method according to claim 1, characterized in that: The detecting whether the user instruction information is related to the location search scenario includes: Performing semantic analysis on the user instruction information to obtain a target semantic analysis result of the user instruction information; Regularly matching the target semantic analysis result with the preset location search rules; If the target semantic analysis result successfully matches at least one of the location search rules, then using a preset relevance detection model to detect whether the target semantic analysis result is relevant to the location search scenario; The relevance detection model is a pre-trained large language model used for relevance detection in location retrieval scenarios.

6. The semantic understanding method according to claim 5, characterized in that: The training process of the correlation detection model includes: Obtain a preset relevance detection training sample set; wherein the relevance detection training sample set includes a second number of semantic analysis result samples and corresponding relevance result labels, the semantic analysis result samples include positive samples and negative samples, the positive samples are the semantic analysis result samples related to the location retrieval scenario, and the negative samples are the semantic analysis result samples unrelated to the location retrieval scenario; Taking each of the semantic analysis result samples as input and the corresponding relevance result label as expected output, the initial second largest language model is trained to obtain the relevance detection model.

7. The semantic understanding method according to any one of claims 1 to 6, characterized in that: After the preset location retrieval scene semantic understanding model is used to perform semantic understanding on the user instruction information and a target semantic understanding result is obtained, the method further includes: Obtain a preset candidate location information set; Based on the target semantic understanding result, the candidate location information set is searched to obtain each target location information; wherein the target location information is the candidate location information in the candidate location information set that matches the target semantic understanding result; The target location information is displayed on a preset display interface.

8. A semantic understanding device, characterized in that: include: User instruction information module, used to obtain user instruction information; A scene relevance detection module, used to detect whether the user instruction information is related to a location search scene; wherein the location search scene is an application scene for searching for a location; A model semantic understanding module is used to perform semantic understanding on the user command information if the user command information is related to a place retrieval scenario, using a preset place retrieval scene semantic understanding model to obtain a target semantic understanding result; wherein the place retrieval scene semantic understanding model is a large language model that performs semantic understanding in a place retrieval scenario, and the place retrieval scene semantic understanding model is trained based on a preset place retrieval scene semantic understanding training sample set, and the place retrieval scene semantic understanding training sample set includes each user command sample information in the place retrieval scenario.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the semantic understanding method according to any one of claims 1 to 7 are implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the semantic understanding method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Air conditioner ecosystem interaction method and device, air conditioner ecosystem model training method and device, medium and equipment

    CN121278093A