Interactive content generation methods, vehicles and storage media
By dynamically adjusting the probability value of interactive content in in-vehicle scenarios, the problem of high repetition rate of interactive content is solved, thereby improving user experience and content diversity.
Patent Information
- Application Number
- CN202611324869.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, interactive content generation methods suffer from a high rate of repetition, especially in in-vehicle scenarios, which negatively impacts user experience.
After receiving an interaction trigger request, candidate content and its probability value are obtained from the interaction content library based on preset matching rules. The probability value of the candidate content is dynamically adjusted in combination with the matching of historical interaction content to reduce the possibility of duplicate output.
It effectively reduces the probability of the same or similar content being repeatedly output in a short period of time, and improves the user interaction experience and content diversity.
Smart Images

Figure CN123115818A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart cockpit technology, and in particular to an interactive content generation method, a vehicle, and a storage medium. Background Technology
[0002] With the development of large-scale interactive technology, natural language interaction has become an important human-computer interaction method, allowing users to converse with smart terminals via voice or text. Taking in-vehicle scenarios as an example, in addition to performing functional operations such as navigation and vehicle control through the in-vehicle system, users are increasingly using it to access entertainment content, such as telling jokes or chatting, to enhance the interactive experience and emotional comfort during driving.
[0003] In related technologies, after a user triggers a request to obtain interactive content, the system usually uses a random output method, randomly selecting one piece of interactive content from a preset content library for output, resulting in a high repetition rate. Summary of the Invention
[0004] This application provides an interactive content generation method, a vehicle, and a storage medium to reduce the repetition rate of interactive content output.
[0005] In a first aspect, embodiments of this application provide an interactive content generation method, including: Receive interactive trigger requests; Based on at least one preset matching rule, obtain the corresponding candidate interactive content from the preset interactive content library, as well as the interaction probability value corresponding to each candidate interactive content; Obtain historical interaction content within a preset time period and determine the matching status between the historical interaction content and each candidate interaction content; Based on the matching results, the interaction probability values corresponding to each candidate interaction content are adjusted; Based on the adjusted interaction probability values of each candidate interaction content, the target interaction content is determined from the candidate interaction content.
[0006] Based on the above technical content, upon receiving an interaction trigger request, this embodiment of the application obtains candidate interaction content and its corresponding interaction probability value from a preset interaction content library based on at least one preset matching rule. Since the candidate interaction content originates from at least one matching rule, different matching rules can obtain corresponding candidate interaction content from different dimensions, effectively improving the diversity of candidate interaction content and avoiding the content homogenization problem caused by a single source. Furthermore, by obtaining historical interaction content within a preset time period and determining the matching situation between the historical interaction content and each candidate interaction content, the interaction probability value of each candidate interaction content is adjusted based on the matching situation. Finally, based on the adjusted interaction probability value, the target interaction content is determined from each candidate interaction content. Here, since the matching situation between historical interaction content and each candidate interaction content can reflect whether content identical or similar to the candidate interaction content has been output recently, the interaction probability value of each candidate interaction content is dynamically adjusted based on this matching situation. This makes the adjustment process of the interaction probability value highly targeted and reasonable, thereby reducing the possibility of identical or similar content being output again in a short period of time, effectively reducing the duplication rate of output content, and improving the user interaction experience.
[0007] In one possible implementation, the interaction probability value corresponding to each candidate interaction content is adjusted based on the matching results, including: For each candidate interaction content, if the matching situation is that there is a target historical interaction content that matches the candidate interaction content in the historical interaction content, then the decay coefficient is obtained; the decay coefficient is used to characterize the reduction of the interaction probability value corresponding to the candidate interaction content. Based on the decay coefficient, the interaction probability value corresponding to the candidate interaction content that matches the target historical interaction content is reduced.
[0008] In this embodiment, when there is target historical interaction content that matches the candidate interaction content in the historical interaction content, since the target historical interaction content has been output within a preset time period, and the candidate interaction content matches the target historical interaction content, in other words, the same or similar content has been received by the user recently, if the candidate interaction content is output again, there will be a problem of duplicate output. Therefore, the interaction probability value of the candidate interaction content is reduced by the attenuation coefficient, which reduces the probability that the candidate interaction content is selected as the target interaction content, and reduces the probability that the system will repeatedly output the same or similar content to the user within a preset time period, thereby improving the user experience.
[0009] In one possible implementation, obtaining the attenuation coefficient includes: For candidate interaction content that matches the target historical interaction content, obtain the historical time when the target historical interaction content was last output; The interval output duration is obtained based on historical time and current time; The corresponding attenuation coefficient is determined based on the interval output duration and the preset time period.
[0010] Based on the above technical content, since the interval output duration reflects the time elapsed since the last output of the target historical interaction content, a longer interval output duration indicates that the target historical interaction content was output a long time ago, the less clear the user's memory of it is, and the lower the negative experience caused by repeated output. Conversely, a shorter interval output duration indicates that the target historical interaction content was just output, the user has a fresh memory of it, and outputting the same or similar content again in a short period of time will significantly affect the user experience. Therefore, by dynamically determining the attenuation coefficient through the interval output duration and the preset time period, the reduction of the interaction probability value can be precisely controlled through this attenuation coefficient. This effectively controls the repetition rate of the output content and avoids excessive reduction of the interaction probability value, which would lead to long-term waste of content resources.
[0011] In one possible implementation, at least one matching rule includes a random matching rule and a semantic matching rule; the candidate interaction content includes a first candidate interaction content and a second candidate interaction content. Based on at least one preset matching rule, corresponding candidate interactive content and an interaction probability value corresponding to each candidate interactive content are obtained from a preset interactive content library, including: Based on the random matching rules, at least one first candidate interactive content is randomly selected from the corresponding preset interactive content library, and the preset basic probability value is used as the interaction probability value corresponding to each first candidate interactive content. The system obtains the input information corresponding to the semantic matching rule, and based on the input information, obtains at least one second candidate interactive content that matches the input information from the corresponding preset interactive content library through the semantic matching rule, as well as the semantic similarity between each second candidate interactive content and the input information, and determines the corresponding interaction probability value according to the semantic similarity corresponding to each second candidate interactive content.
[0012] In this embodiment, a first candidate interactive content is randomly selected from a preset interactive content library based on a random matching rule and assigned a uniform preset base probability value. Since random selection is not limited by input information, it ensures that a certain proportion of random content exists among the candidate interactive content, thereby guaranteeing the diversity of the output content. Furthermore, a semantic matching rule obtains the corresponding input information and, based on this input information, retrieves a second candidate interactive content from the preset interactive content library that matches it. Because the semantic matching rule can determine the interaction probability value based on the semantic similarity between the input information and the second candidate interactive content, it ensures the relevance of the second candidate interactive content to the user's current scene or context. Through the synergistic effect of the random matching rule and the semantic matching rule, both the semantic relevance of the candidate interactive content and the diversity of the candidate interactive content are guaranteed.
[0013] In one possible implementation, the input information includes scene information and / or historical dialogue information of a preset number of times; the second candidate interaction content includes scene candidate interaction content and / or dialogue candidate interaction content. Based on the input information, at least one second candidate interactive content that matches the input information is obtained from the corresponding preset interactive content library through semantic matching rules, along with the semantic similarity between each second candidate interactive content and the input information, including: The scene information is converted into a natural language string and concatenated to obtain a scene information string. Then, the scene information string is matched with each preset interactive content in the corresponding preset interactive content library according to semantic matching rules to obtain at least one scene candidate interactive content and the semantic similarity of each scene candidate interactive content. And / or, The historical dialogue information of a preset number of times is converted into natural language strings and concatenated to obtain a dialogue information string. Then, the dialogue information string is matched with each preset interaction content in the corresponding preset interaction content library according to semantic matching rules to obtain at least one dialogue candidate interaction content and the semantic similarity corresponding to each dialogue candidate interaction content.
[0014] Here, since scene information reflects the user's current physical environment and state, converting the scene information into natural language strings and then performing semantic matching ensures that the obtained candidate interaction content is semantically relevant to the current scene, thus achieving scene-based adaptation. Similarly, since historical dialogue information reflects the user's recent interaction context and interests, converting historical dialogue information into natural language strings and then performing semantic matching ensures that the obtained candidate dialogue content is semantically relevant to the historical dialogue context, thereby improving the coherence between candidate interaction content and the user's dialogue history. By introducing scene information and / or historical dialogue information, semantic matching rules can capture the user's current needs from different dimensions, further improving the matching accuracy between candidate interaction content and the user's actual needs.
[0015] In one possible implementation, the corresponding interaction probability value is determined based on the semantic similarity of each second candidate interaction content, including: Obtain the preset weight value corresponding to the second candidate interaction content; Based on the preset weight values and the semantic similarity of each second candidate interaction content, the interaction probability value corresponding to each second candidate interaction content is obtained.
[0016] Based on the aforementioned technical content, since the semantic similarity determined by semantic matching rules differs from the preset basic probability value corresponding to random matching rules in terms of numerical magnitude and distribution range, a preset weight value is used to process the semantic similarity. This allows the interaction probability values of candidate interaction content from different matching rules to be compared and fused on the same numerical scale, thereby achieving a unified scoring expression for multi-source candidates. This unified scoring mechanism lays the foundation for unified probability adjustment and sampling of each candidate interaction content in subsequent steps, avoiding systemic bias caused by inconsistent scoring scales from different sources.
[0017] In one possible implementation, the target interaction content is determined from the candidate interaction content based on the adjusted interaction probability values of each candidate interaction content, including: The adjusted interaction probability values of each candidate interaction content are normalized to obtain the probability distribution; Based on the probability distribution, random sampling is performed from each candidate interactive content to obtain the target interactive content.
[0018] In this embodiment, the probability distribution is obtained by normalizing the adjusted interaction probability values of each candidate interaction content. Based on the probability distribution, random sampling is performed on each candidate interaction content to obtain the target interaction content. This approach not only follows the output priority based on probability, ensuring the output advantage of highly adaptable and high-probability candidate interaction content, but also retains the output possibility of low-probability candidate interaction content, thus balancing the adaptability and randomness of the interaction content.
[0019] In one possible implementation, determining the matching status between historical interaction content and each candidate interaction content includes: For each candidate interaction content, obtain the similarity between the candidate interaction content and each historical interaction content; If there is a similarity score greater than the preset similarity threshold among the various similarity scores, then it is determined that there is a target historical interaction content in the historical interaction content that matches the candidate interaction content. If all similarities are less than or equal to the preset similarity threshold, it is determined that there is no target historical interaction content that matches the candidate interaction content in the historical interaction content.
[0020] In this embodiment, for each candidate interaction content, all historical interaction content is traversed and the corresponding similarity is calculated. The similarity is used as a unified comparison benchmark and compared with a preset similarity threshold. When the similarity is greater than the preset similarity threshold, it can be determined that there is a target historical interaction content that matches the candidate interaction content. The judgment logic is simple and unified, ensuring the efficiency and accuracy of target historical interaction content screening.
[0021] Secondly, embodiments of this application provide an interactive content generation apparatus, including: The receiving module is used to receive interactive trigger requests; The processing module is used to obtain corresponding candidate interactive content and the interaction probability value corresponding to each candidate interactive content from a preset interactive content library based on at least one preset matching rule. The processing module is also used to obtain historical interaction content within a preset time period and determine the matching status between the historical interaction content and each candidate interaction content. The processing module is also used to adjust the interaction probability value corresponding to each candidate interaction content based on the matching results; The processing module is also used to determine the target interaction content from among the candidate interaction content based on the adjusted interaction probability value of each candidate interaction content.
[0022] Thirdly, embodiments of this application provide a vehicle including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the interactive content generation method as described in any of the first aspects.
[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the interactive content generation method as described in any of the first aspects.
[0024] It is understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application; Figure 2 This is a flowchart illustrating an embodiment of the interactive content generation method provided in this application; Figure 3 This is a flowchart illustrating an interactive content generation method provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of an interactive content generation device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a vehicle provided in one embodiment of this application. Detailed Implementation
[0028] The present application will be described more clearly below with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the function of the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0029] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0030] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0031] In the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0032] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0033] Furthermore, the term "multiple" mentioned in the embodiments of this application should be interpreted as two or more.
[0034] For tasks involving generating entertaining interactive content such as "telling jokes," one related technology uses a random output method, randomly selecting one item from a preset content library containing a certain number of interactive content items for output. This results in a high repetition rate, which negatively impacts the user experience.
[0035] Another related technology can generate interactive content directly based on a large language model. While the content generated by a large language model has a certain degree of randomness, it is easy to sample the same token under similar prompts, resulting in a high repetition rate of the output content. In addition, when the user specifies a specific topic, the content generated by the large language model usually relies on semantic templates, which can easily lead to problems such as stiff expression, unnaturalness, or lack of interest.
[0036] Another related technique involves generating interactive content based on Retrieval-Augmented Generation (RAG). This method performs semantic analysis on user input, retrieves the most semantically relevant content from an external content knowledge base, and then outputs it to the model. However, it still tends to have content concentrated on a few highly similar jokes, resulting in a relatively high repetition rate.
[0037] In the context of in-vehicle scenarios, the high frequency of interaction and the long duration of user use amplify the aforementioned repetition issues, thus significantly impacting the user's interactive experience.
[0038] The applicant has found that, in order to reduce the duplication rate of output content, it is necessary to consider a new method for generating interactive content.
[0039] To reduce the probability of identical or similar interactive content being repeatedly output within a short period of time, thereby reducing the output repetition rate, the embodiments of this application, after obtaining candidate interactive content and its corresponding interactive probability value, can acquire historical interactive content within a preset time period and determine the matching status between historical interactive content and each candidate interactive content. Since the matching status between historical interactive content and each candidate interactive content can reflect whether content identical or similar to the candidate interactive content has been output recently, the interactive probability value of each candidate interactive content can be dynamically adjusted based on the matching status. This makes the adjustment process of the interactive probability value more targeted and reasonable, thereby reducing the possibility of identical or similar content being output again within a short period of time, effectively reducing the repetition rate of output content, and improving the user interaction experience.
[0040] First refer to Figure 1 , Figure 1 The illustration shows an application scenario diagram provided according to an embodiment of this application, in which the device involved includes a microphone, a processor, and a speaker.
[0041] The microphone is used to collect the user's voice input and transmit the voice signal to the processor.
[0042] After receiving a voice signal, the processor can convert the voice signal into text using speech recognition technology, and then perform natural language understanding on the text to identify the user's interaction intent. If the user's interaction intent is identified as obtaining interactive content, such as telling jokes or stories, a corresponding interaction trigger request is generated to initiate the interactive content generation process of this application, obtain the target interactive content, and send the target interactive content to the speaker for playback.
[0043] The following is combined Figure 1 Application scenarios, refer to Figures 2-3 This application describes an interactive content generation method provided according to exemplary embodiments. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.
[0044] It should be noted that the embodiments of this application can be applied to vehicles, and the vehicle can be a server or a host of the vehicle, that is, the interactive content generation method provided by the exemplary embodiments of this application can be executed on the server or the host of the vehicle.
[0045] The server can be a monolithic server or a distributed server spanning multiple computers or computer data centers. Servers can also be of various categories, such as, but not limited to, web servers, application servers, database servers, or proxy servers.
[0046] Optionally, a server may include hardware, software, or embedded logic components for performing suitable functions supported or implemented by the server, or a combination of two or more such components. For example, a server may be a blade server, a cloud server, or a server group consisting of multiple servers, which may include one or more of the above-mentioned categories of servers, etc.
[0047] It should be noted that the interactive content generation method provided according to the exemplary embodiments of this application can be executed on the same device or on different devices.
[0048] refer to Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the interactive content generation method provided in this application. Figure 2 As shown, the method in the embodiments of this application may include: Step 201: Receive the interaction trigger request.
[0049] An interaction trigger request is a user's instruction to the interaction system to initiate the process of generating interactive content. This request carries the type of interactive content, which may include, but is not limited to, jokes, stories, news broadcasts, and music. For example, if a user sends the interaction trigger request "Tell me a joke," the system uses natural language understanding technology to semantically analyze the request, identify the user's intent and desired type of interactive content, and then selects a corresponding preset interactive content library for pre-processing to improve the match between the generated interactive content and the user's expectations.
[0050] Interaction trigger requests can be in the form of voice or text; this application does not limit the type of interaction trigger request. For voice-based interaction trigger requests, the user's voice signal can be collected by a voice acquisition device, converted into text by speech recognition technology, and then input into the interaction system. Taking an in-vehicle scenario as an example, the voice acquisition device can be an in-vehicle microphone, and the interaction system can be an in-vehicle intelligent cockpit system.
[0051] Step 202: Based on at least one preset matching rule, obtain the corresponding candidate interactive content and the interaction probability value corresponding to each candidate interactive content from the preset interactive content library.
[0052] The pre-built interactive content library is a content database that is pre-built and stored locally or in the cloud, containing several interactive content items. In one implementation scenario, each interactive content item is stored in text format, and the text format conforms to the characteristics of voice playback. The pre-built interactive content library can be self-written or purchased, and this application does not limit its construction method.
[0053] Matching rules are the basis for obtaining candidate interactive content from a preset interactive content library. In one implementation scenario, at least one matching rule may include random matching rules and semantic matching rules. The random matching rule refers to randomly selecting at least one interactive content as candidate interactive content from the preset interactive content library.
[0054] Semantic matching rules are rules for obtaining candidate interactive content based on the semantic similarity between input information and interactive content in a pre-defined interactive content library. In one implementation scenario, obtaining candidate interactive content through semantic matching rules can be achieved using vector retrieval models, keyword retrieval models, or large language models.
[0055] The vector retrieval model encodes the input information and each interactive content in the preset interactive content library into text vectors, calculates the cosine similarity between two text vectors as semantic similarity, and thus filters candidate interactive content.
[0056] The keyword retrieval model extracts keywords from the input information, matches the extracted keywords with each interactive content in a pre-defined interactive content library, and obtains semantic similarity based on the degree of matching.
[0057] The large language model performs semantic understanding and relevance judgment on the input information and the various interactive contents in the pre-set interactive content library, and outputs a relevance score as semantic similarity.
[0058] It should be noted that different matching rules may correspond to the same preset interactive content library or different preset interactive content libraries; this application does not impose any restrictions on this.
[0059] In one implementation scenario, for in-vehicle scenarios, a further distinction can be made between driving scenarios and stationary scenarios. In driving scenarios, since drivers need to focus their attention on road conditions, it is a high-attention scenario. If a user requests a "tell a joke" interaction, overly humorous or funny content could easily trigger an excessive emotional reaction from the driver, thus distracting their attention and increasing the risk of accidents. Therefore, in driving scenarios, the interactive content selected by the system from its preset interactive content library should be manually reviewed to remove content that may cause excessive emotional reactions, ensuring driving safety.
[0060] In static scenarios, such as when parking and resting or waiting to charge, users are relatively relaxed and have a higher tolerance for the humor and safety risks of interactive content. Optionally, the interactive system can switch to a richer and more humorous library of interactive content to meet users' entertainment needs while resting, thereby improving the user experience.
[0061] The interaction probability value represents the probability that a candidate interaction content will be selected as the target interaction content. A higher interaction probability value indicates a greater probability of the candidate interaction content being selected. Optionally, for candidate interaction content obtained through semantic matching rules, the corresponding interaction probability value can be determined based on the semantic similarity between the candidate interaction content and the input information. Higher semantic similarity results in a higher interaction probability value, ensuring that candidate interaction content with a higher relevance to the input information has a higher selection probability.
[0062] For candidate interactive content obtained through random matching rules, since its selection does not depend on the semantic matching of input information, the interaction probability value of the candidate interactive content can be based on a preset basic probability value to ensure that the probability of each randomly selected candidate interactive content being selected as the target interactive content is equal.
[0063] Step 203: Obtain historical interaction content within a preset time period and determine the matching status between the historical interaction content and each candidate interaction content.
[0064] Historical interaction content refers to the collection of interactive content that has been delivered to the user within a preset time period prior to the current interaction moment. For example, if the preset time period is 30 days, the historical interaction content would be the collection of interactive content delivered within the last 30 days. The preset time period is a time window used to limit the effective scope of the historical interaction content, and can be set according to actual needs; this application does not impose any limitations on it.
[0065] In one possible implementation, the interactive system can maintain a queue of historical interaction content to store historical interaction content within a preset time period, as well as the time when each historical interaction content was output. When the time when historical interaction content was output is more than the preset time period from the current time, the historical interaction content is removed from the queue.
[0066] The matching result is used to characterize whether there is a target historical interaction content that matches the candidate interaction content in the historical interaction content. In one possible implementation, for each candidate interaction content, the content repetition rate or semantic similarity between the candidate interaction content and each historical interaction content can be obtained. Based on the content repetition rate or the semantic similarity between the candidate interaction content and each historical interaction content, it is determined whether there is a target historical interaction content that matches the candidate interaction content in the historical interaction content. The number of target historical interaction content can be one or more.
[0067] Step 204: Adjust the interaction probability value corresponding to each candidate interaction content according to the matching results.
[0068] As can be seen from the above, if there is a target historical interaction content that matches the candidate interaction content in the historical interaction content, since the target historical interaction content has been output within a preset time period, if the candidate interaction content is output again, there will be a problem of duplicate output. Therefore, in order to avoid duplicate output of the same interaction content, the interaction probability value corresponding to the candidate interaction content that matches the target historical interaction content can be reduced.
[0069] In another implementation scenario, if there is no target historical interaction content that matches the candidate interaction content in the historical interaction content, it means that the candidate interaction content or its related interaction content has not been output within the preset time period. Therefore, there will be no problem of duplicate output when outputting the candidate interaction content. In this case, there is no need to reduce the interaction probability value of the candidate interaction content. Specifically, the interaction probability value of the candidate interaction content can be kept unchanged, or the interaction probability value of the candidate interaction content can be increased.
[0070] Step 205: Based on the adjusted interaction probability values of each candidate interaction content, determine the target interaction content from each candidate interaction content.
[0071] In one implementation scenario, the adjusted interaction probability values of each candidate interaction content can be compared, and the candidate interaction content with the highest interaction probability value can be taken as the target interaction content.
[0072] In another implementation scenario, the adjusted interaction probability values of each candidate interaction content can be normalized to obtain a probability distribution. Then, random sampling can be used to randomly sample from each candidate interaction content to obtain the target interaction content. This makes it more likely that candidate interaction content with a higher interaction probability value will be selected as the target interaction content, but candidate interaction content with a lower interaction probability value still has a certain probability of being selected as the target interaction content, which helps to ensure the diversity of interaction content.
[0073] In some embodiments, after determining and outputting the target interaction content, the target interaction content can be written into the historical interaction content queue as new historical interaction content, and the output time of the target interaction content can be recorded for subsequent user-triggered new interaction requests to determine the corresponding target interaction content.
[0074] In this embodiment, upon receiving an interaction trigger request, candidate interaction content and its corresponding interaction probability value are obtained from a preset interaction content library based on at least one preset matching rule. Since the candidate interaction content originates from at least one matching rule, different matching rules can obtain corresponding candidate interaction content from different dimensions, effectively improving the diversity of candidate interaction content and avoiding content homogenization caused by a single source. Based on this, historical interaction content within a preset time period is obtained, and the interaction probability value of each candidate interaction content is adjusted according to the matching situation between historical interaction content and each candidate interaction content. Finally, the target interaction content is determined from the candidate interaction content based on the adjusted interaction probability value. Here, since the matching situation between historical interaction content and each candidate interaction content reflects whether content identical or similar to the candidate interaction content has been output recently, the interaction probability value of each candidate interaction content is dynamically adjusted based on this matching situation. This makes the adjustment process of the interaction probability value highly targeted and reasonable, thereby reducing the possibility of identical or similar content being output again in a short period of time, effectively reducing the duplication rate of output content, and improving the user interaction experience.
[0075] In addition, when adjusting the interaction probability value corresponding to each candidate interaction content based on the matching of historical interaction content and each candidate interaction content in the embodiments of this application, it is also necessary to consider how to determine the adjustment range of the interaction probability value so as to realize a differentiated probability adjustment strategy and avoid applying the same reduction force to the candidate interaction content that matches the historical interaction content, which would result in the problem of the reduction range being too large or too small. Figure 3 This is a flowchart illustrating an interactive content generation method provided in another embodiment of this application, such as... Figure 3 As shown, the method includes: Step 301: Receive the interaction trigger request.
[0076] Here, for the implementation of step 301, please refer to [link / reference]. Figure 2 The relevant descriptions in the embodiments will not be repeated here.
[0077] Step 302: Based on the random matching rule, randomly select at least one first candidate interactive content from the corresponding preset interactive content library, and use the preset basic probability value as the interaction probability value corresponding to each first candidate interactive content; obtain the input information corresponding to the semantic matching rule, and based on the input information, obtain at least one second candidate interactive content that matches the input information from the corresponding preset interactive content library through the semantic matching rule, as well as the semantic similarity between each second candidate interactive content and the input information, and determine the corresponding interaction probability value according to the semantic similarity corresponding to each second candidate interactive content.
[0078] The random matching rule refers to the rule of randomly selecting interactive content as candidate interactive content from a preset interactive content library, without requiring additional input information. The first candidate interactive content is one or more candidate interactive contents obtained through the random matching rule, and its number can be set according to actual needs.
[0079] The preset base probability value is the interaction probability value assigned to the first candidate interaction content. In one implementation scenario, the preset base probability value can be set to 0. The interaction probability values corresponding to different first candidate interaction content are all preset base probability values to ensure that the probability of randomly selected first candidate interaction content being selected as the target candidate interaction content is equal.
[0080] Semantic matching rules refer to rules for obtaining candidate interactive content based on the semantic similarity between input information and interactive content in a pre-defined interactive content library. Unlike random matching rules, semantic matching rules require corresponding input information as the retrieval basis, and then filter candidate interactive content by calculating the semantic similarity between this input information and each interactive content in the pre-defined interactive content library.
[0081] Input information serves as the retrieval basis for semantic matching rules. Input information includes scene information and / or a preset number of historical dialogues. Taking an in-vehicle scenario as an example, scene information reflects the user's current physical environment and driving status, and may include, but is not limited to, vehicle speed, weather, and passenger information. Historical dialogue information refers to records of conversations between the user and the interactive system prior to the current interaction, reflecting the user's recent interaction context and interests. The preset number of times limits the number of rounds of historical dialogue information retrieved; the specific value can be set according to actual needs, such as 10 rounds.
[0082] The second candidate interaction content refers to the candidate interaction content obtained through semantic matching rules. The second candidate interaction content includes scene candidate interaction content and / or dialogue candidate interaction content. Specifically, scene candidate interaction content is the candidate interaction content obtained when the input information is scene information, and dialogue candidate interaction content is the candidate interaction content obtained when the input information is historical dialogue information from a preset number of times.
[0083] In one implementation scenario, if the input information includes scene information, when obtaining the scene candidate interaction content and the semantic similarity corresponding to each scene candidate interaction content, the scene information can be converted into a natural language string and concatenated to obtain a scene information string. Then, through semantic matching rules, the scene information string is semantically matched with each preset interaction content in the corresponding preset interaction content library to obtain at least one scene candidate interaction content and the semantic similarity corresponding to each scene candidate interaction content.
[0084] Since structured scene information is not suitable for direct semantic matching, each piece of data in the scene information can be converted into a text form that conforms to the expression habits of natural language, i.e., a natural language string. Then, the natural language strings are concatenated to obtain the complete scene information string. Optionally, when concatenating the natural language strings, they can be concatenated according to a preset order or a preset template. For example, the preset order is "vehicle speed-weather-passengers", and the preset template can be "current vehicle speed is {vehicle speed information}, weather {weather information}, passengers in the vehicle {passenger information}".
[0085] Semantic similarity is a quantitative indicator used to measure the degree of semantic relevance between input information and interactive content. The higher the semantic similarity, the more semantically relevant the interactive content is to the input information. Optionally, a vector encoding model can be used to encode the scene information string into a text vector, and then cosine similarity can be calculated between the vector vector and the text vector corresponding to each interactive content in a preset interactive content library. The calculated cosine similarity is then used as the semantic similarity.
[0086] After obtaining the semantic similarity between each interactive content and scene information in the preset interactive content library, the interactive content can be sorted in descending order of semantic similarity. The top M interactive contents are selected as candidate interactive contents for the scene, and the semantic similarity corresponding to each candidate interactive content is recorded. Here, M is a preset positive integer, and the specific value can be set according to actual needs.
[0087] In one implementation scenario, if the input information includes historical dialogue information of a preset number of times, when obtaining dialogue candidate interaction content and the semantic similarity corresponding to each dialogue candidate interaction content, the historical dialogue information of the preset number of times can be converted into natural language strings and concatenated to obtain a dialogue information string. Then, through semantic matching rules, the dialogue information string is semantically matched with each preset interaction content in the corresponding preset interaction content library to obtain at least one dialogue candidate interaction content and the semantic similarity corresponding to each dialogue candidate interaction content.
[0088] Here, the dialogue information string refers to the complete text string obtained by converting historical dialogue information from a preset number of times into natural language strings and then concatenating them. Optionally, the concatenation can be performed according to the chronological order of the dialogue.
[0089] After obtaining the dialogue information string, it is encoded into a text vector using a vector encoding model. Then, a cosine similarity calculation is performed between this vector and the text vectors corresponding to each interaction in a pre-defined interaction content library. The calculated cosine similarity is used as the semantic similarity. Next, the interaction content is sorted in descending order of semantic similarity, and the top N interaction content are selected as candidate dialogue interaction content. The semantic similarity of each candidate interaction content is recorded. Here, N is a pre-defined positive integer, and its specific value can be set according to actual needs.
[0090] It should be noted that the above example uses cosine similarity as a semantic similarity. In addition to cosine similarity, other methods such as Euclidean distance and Manhattan distance can also be used to obtain the semantic similarity between the input information and each interactive content in the preset interactive content library. The method of determining semantic similarity can be adjusted according to actual needs, and this application does not limit its specific calculation method.
[0091] Here, since scene information reflects the user's current physical environment and state, converting the scene information into natural language strings and then performing semantic matching ensures that the obtained candidate interaction content is semantically relevant to the current scene, thus achieving scene-based adaptation. Similarly, since historical dialogue information reflects the user's recent interaction context and interests, converting historical dialogue information into natural language strings and then performing semantic matching ensures that the obtained candidate dialogue content is semantically relevant to the historical dialogue context, thereby improving the coherence between candidate interaction content and the user's dialogue history. By introducing scene information and / or historical dialogue information, semantic matching rules can capture the user's current needs from different dimensions, further improving the matching accuracy between candidate interaction content and the user's actual needs.
[0092] In some embodiments, determining the corresponding interaction probability value based on the semantic similarity of each second candidate interaction content includes: obtaining a preset weight value corresponding to the second candidate interaction content; and obtaining the interaction probability value corresponding to each second candidate interaction content based on the preset weight value and the semantic similarity of each second candidate interaction content.
[0093] Since the interaction probability value corresponding to the first candidate interaction content obtained through random matching rules is a fixed preset base probability value, such as 1, while the interaction probability value corresponding to the second candidate interaction content obtained through semantic matching rules is a semantic similarity value between 0 and 1, there is a problem of scale inconsistency between the two. Therefore, a preset weight value needs to be configured for the second candidate interaction content to achieve a unified scoring expression for candidate interaction content from different sources. The preset weight value can be set according to actual needs, for example, it can be 1.2. It should be noted that the preset weight values corresponding to scene candidate interaction content and dialogue candidate interaction content can be the same or different.
[0094] In one possible implementation, a preset weight value can be multiplied by the semantic similarity corresponding to each second candidate interactive content to obtain the interaction probability value corresponding to each second candidate interactive content.
[0095] In some embodiments, after obtaining the first candidate interaction content and the second candidate interaction content, the two can be merged. If there are duplicate candidate interaction content, deduplication can be performed. Optionally, for duplicate candidate interaction content, the highest value among its multiple interaction probability values is retained as the final interaction probability value of the candidate interaction content, so as to avoid the same interaction content from appearing repeatedly.
[0096] Based on the aforementioned technical content, since the semantic similarity determined by semantic matching rules differs from the preset basic probability value corresponding to random matching rules in terms of numerical magnitude and distribution range, a preset weight value is used to process the semantic similarity. This allows the interaction probability values of candidate interaction content from different matching rules to be compared and fused on the same numerical scale, thereby achieving a unified scoring expression for multi-source candidates. This unified scoring mechanism lays the foundation for unified probability adjustment and sampling of each candidate interaction content in subsequent steps, avoiding systemic bias caused by inconsistent scoring scales from different sources.
[0097] In this embodiment, a first candidate interactive content is randomly selected from a preset interactive content library based on a random matching rule and assigned a uniform preset base probability value. Since random selection is not limited by input information, it ensures that a certain proportion of random content exists among the candidate interactive content, thereby guaranteeing the diversity of the output content. Furthermore, a semantic matching rule obtains the corresponding input information and, based on this input information, retrieves a second candidate interactive content from the preset interactive content library that matches it. Because the semantic matching rule can determine the interaction probability value based on the semantic similarity between the input information and the second candidate interactive content, it ensures the relevance of the second candidate interactive content to the user's current scene or context. Through the synergistic effect of the random matching rule and the semantic matching rule, both the semantic relevance of the candidate interactive content and the diversity of the candidate interactive content are guaranteed.
[0098] Step 303: Obtain historical interaction content within a preset time period. For each candidate interaction content, obtain the similarity between the candidate interaction content and each historical interaction content. If there is a similarity greater than a preset similarity threshold, it is determined that there is a target historical interaction content in the historical interaction content that matches the candidate interaction content. If all similarities are less than or equal to the preset similarity threshold, it is determined that there is no target historical interaction content in the historical interaction content that matches the candidate interaction content. The candidate interaction content includes a first candidate interaction content and a second candidate interaction content.
[0099] Similarity is a quantitative metric used to measure the degree of similarity between candidate interaction content and historical interaction content. It can be characterized by content duplication rate and / or semantic similarity.
[0100] Content repetition rate is used to characterize the degree of overlap between two texts at the character or word level. A higher content repetition rate indicates that the two texts are more similar at the character or word level. The content repetition rate ranges from 0 to 1, where 0 indicates that the two texts have no character or word overlap, and 1 indicates that the two texts are completely identical.
[0101] In one possible implementation, the candidate interaction content and each historical interaction content can be segmented first to obtain the word set of the candidate interaction content and the word set of each historical interaction content. Then, the Jaccard similarity between the word set of the candidate interaction content and the word set of each historical interaction content can be calculated as the content duplication rate.
[0102] If the content duplication rate between the candidate interactive content and each historical interactive content is greater than a first preset threshold, then the historical interactive content with the content duplication rate greater than the first preset threshold will be used as the target historical interactive content.
[0103] Semantic similarity is a quantitative metric used to measure the degree of semantic similarity between two texts. The higher the semantic similarity, the closer the two texts are in meaning. The value of semantic similarity ranges from 0 to 1, where 0 indicates that the two texts are completely unrelated semantically, and 1 indicates that the two texts are semantically identical.
[0104] In one possible implementation, when obtaining the semantic similarity between candidate interaction content and each historical interaction content, the candidate interaction content and each historical interaction content can be encoded into text vectors respectively, and the cosine similarity between the two can be calculated as the semantic similarity.
[0105] In this embodiment, for each candidate interaction content, all historical interaction content is traversed and the corresponding similarity is calculated. The similarity is used as a unified comparison benchmark and compared with a preset similarity threshold. When the similarity is greater than the preset similarity threshold, it can be determined that there is a target historical interaction content that matches the candidate interaction content. The judgment logic is simple and unified, ensuring the efficiency and accuracy of target historical interaction content screening.
[0106] Step 304: For each candidate interaction content, if the matching situation is that there is a target historical interaction content that matches the candidate interaction content in the historical interaction content, then obtain the attenuation coefficient; the attenuation coefficient is used to characterize the reduction of the interaction probability value corresponding to the candidate interaction content; based on the attenuation coefficient, reduce the interaction probability value corresponding to the candidate interaction content that matches the target historical interaction content.
[0107] The attenuation coefficient is a coefficient used to control the reduction in the interaction probability value of candidate interaction content that matches the historical interaction content. Its value can range from 0 to 1.
[0108] In one possible implementation, obtaining the attenuation coefficient includes: for candidate interaction content that matches the target historical interaction content, obtaining the historical time when the target historical interaction content was last output; obtaining the interval output duration based on the historical time and the current time; and determining the corresponding attenuation coefficient based on the interval output duration and a preset time period.
[0109] The longer the interval between outputs, the more time has passed since the candidate interaction content was last output, indicating that the user's memory of the candidate interaction content is relatively vague. The negative experience from repeated output is lower, so the decrease in the interaction probability value of the candidate interaction content can be reduced, thus improving the novelty and diversity of the interaction content. Conversely, the shorter the interval between outputs, the more recent the time since the candidate interaction content was last output, indicating that the user still has a strong impression of it. Outputting the same interaction content again in a short period would significantly impact the user experience, therefore the decrease in the interaction probability value of the candidate interaction content needs to be increased.
[0110] The number of target historical interaction pieces can be one or more. When there is only one target historical interaction piece, the time when that target historical interaction piece was output is taken as the most recent output historical time. When there are multiple target historical interaction pieces, and the output times of the multiple target historical interaction pieces are different, the output time closest to the current time can be taken as the most recent output historical time.
[0111] Here, since the most recent output time of the target historical interaction content represents the last time the candidate interaction content or its related interaction content appeared before the current time, it best reflects the user's recent memory state. Therefore, using this historical time as the time benchmark for subsequent calculation of the decay coefficient can make the reduction of the interaction probability value of the candidate interaction content more consistent with the user's actual memory situation.
[0112] One way to calculate the attenuation coefficient is: Attenuation coefficient = X / T, where X represents the interval output duration and T represents the preset time period. For example, if the preset time period is 30 days, and the interval between the most recent output of the target historical interaction content that matches a candidate interaction content and the current time is 15 days, then the corresponding attenuation coefficient = 15 / 30 = 0.5.
[0113] After obtaining the attenuation coefficient, it can be multiplied by the interaction probability value corresponding to the candidate interaction content to obtain the reduced interaction probability value. A larger attenuation coefficient results in a smaller decrease in the interaction probability value; conversely, a smaller attenuation coefficient results in a larger decrease. For example, if the attenuation coefficient is 0.5, multiplying the interaction probability value of the candidate interaction content by 0.5 reduces the interaction probability value by 50%; if the attenuation coefficient is 0.9, multiplying the interaction probability value of the candidate interaction content by 0.9 reduces the interaction probability value by 10%.
[0114] Alternatively, the attenuation coefficient can be determined in other ways, such as by using a nonlinear attenuation method or a learned weight attenuation method. This application does not limit the specific method of determination.
[0115] In another implementation scenario, for candidate interaction content that does not match the historical interaction content, its corresponding interaction probability value can remain unchanged, or the interaction probability value can be increased to increase the probability of it being selected as the target interaction content.
[0116] Based on the above technical content, since the interval output duration reflects the time elapsed since the last output of the target historical interaction content, a longer interval output duration indicates that the target historical interaction content was output a long time ago, the less clear the user's memory of it is, and the lower the negative experience caused by repeated output. Conversely, a shorter interval output duration indicates that the target historical interaction content was just output, the user has a fresh memory of it, and outputting the same or similar content again in a short period of time will significantly affect the user experience. Therefore, by dynamically determining the attenuation coefficient through the interval output duration and the preset time period, the reduction of the interaction probability value can be precisely controlled through this attenuation coefficient. This effectively controls the repetition rate of the output content and avoids excessive reduction of the interaction probability value, which would lead to long-term waste of content resources.
[0117] In this embodiment, when there is target historical interaction content that matches the candidate interaction content in the historical interaction content, since the target historical interaction content has been output within a preset time period, and the candidate interaction content matches the target historical interaction content, in other words, the same or similar content has been received by the user recently, if the candidate interaction content is output again, there will be a problem of duplicate output. Therefore, the interaction probability value of the candidate interaction content is reduced by the attenuation coefficient, which reduces the probability that the candidate interaction content is selected as the target interaction content, and reduces the probability that the system will repeatedly output the same or similar content to the user within a preset time period, thereby improving the user experience.
[0118] Step 305: Normalize the adjusted interaction probability values of each candidate interaction content to obtain a probability distribution; based on the probability distribution, randomly sample from each candidate interaction content to obtain the target interaction content.
[0119] In one possible implementation, the adjusted interaction probability values of each candidate interaction content can be normalized using the Softmax function or other normalization methods. This maps the adjusted interaction probability values of each candidate interaction content to probability values between 0 and 1, resulting in a probability distribution. After normalization, the sum of the probability values corresponding to each candidate interaction content is 1.
[0120] Then, random sampling is performed based on the above probability distribution, that is, a candidate interactive content is randomly selected as the target interactive content. The higher the probability value of the candidate interactive content, the higher the probability of it being selected as the target interactive content. However, candidate interactive content with a lower probability value still has a certain chance of being selected as the target interactive content. This method can ensure the quality of interactive content while also ensuring the diversity of interactive content.
[0121] In addition to random sampling, weighted sampling, temperature sampling, or other random selection strategies can be used to select one of the multiple candidate interactive contents as the target interactive content. This application does not limit the sampling strategy.
[0122] In this embodiment, the probability distribution is obtained by normalizing the adjusted interaction probability values of each candidate interaction content. Based on the probability distribution, random sampling is performed on each candidate interaction content to obtain the target interaction content. This approach not only follows the output priority based on probability, ensuring the output advantage of highly adaptable and high-probability candidate interaction content, but also retains the output possibility of low-probability candidate interaction content, thus balancing the adaptability and randomness of the interaction content.
[0123] After obtaining the target interactive content, it can be output in various ways. Optionally, it can be broadcast via a speaker, and / or displayed as text on the vehicle's central control screen, instrument panel, or head-up display.
[0124] In this embodiment, upon receiving an interaction trigger request, at least one first candidate interaction content is randomly selected from the corresponding preset interaction content library based on random matching rules, and a preset base probability value is used as the interaction probability value corresponding to each first candidate interaction content. Input information corresponding to semantic matching rules is obtained, and at least one second candidate interaction content matching the input information is obtained from the corresponding preset interaction content library through semantic matching rules, along with the semantic similarity between each second candidate interaction content and the input information. The corresponding interaction probability value is determined based on the semantic similarity corresponding to each second candidate interaction content. Since the first and second candidate interaction contents originate from random matching rules and semantic matching rules, respectively, content diversity is effectively improved while ensuring semantic relevance. Next, the similarity between each candidate interaction content and each historical interaction content is obtained to determine whether there is a target historical interaction content that matches the candidate interaction content. If so, the interaction probability value of the candidate interaction content is reduced based on a decay coefficient, thereby reducing the probability that the candidate interaction content is selected as the target interaction content and reducing the probability that the system repeatedly outputs the same or similar content to the user within a preset time period, thus improving the user experience. Finally, the adjusted interaction probability values of each candidate interaction content are normalized to obtain a probability distribution. Based on the probability distribution, random sampling is performed from each candidate interaction content to obtain the target interaction content. This allows the interaction probability values of candidate interaction content from different matching rules to be compared and fused on the same numerical scale, thereby achieving a unified scoring expression for multi-source candidates and avoiding system bias caused by inconsistent scoring scales from different sources.
[0125] It should be understood that the sequence number of each step in the above embodiments does not imply 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 this application.
[0126] Figure 4 This is a schematic diagram of the structure of an interactive content generation device provided in an embodiment of this application. For example... Figure 4 As shown, the interactive content generation device provided in this embodiment may include a receiving module 401 and a processing module 402.
[0127] The receiving module 401 is used to receive interactive trigger requests; The processing module 402 is used to obtain corresponding candidate interactive content and the interaction probability value corresponding to each candidate interactive content from a preset interactive content library based on at least one preset matching rule. The processing module 402 is also used to obtain historical interaction content within a preset time period and determine the matching status between the historical interaction content and each candidate interaction content. The processing module 402 is also used to adjust the interaction probability value corresponding to each candidate interaction content according to the matching situation; The processing module 402 is also used to determine the target interaction content from the candidate interaction content based on the adjusted interaction probability value of each candidate interaction content.
[0128] In one possible implementation, processing module 402 is specifically used for: For each candidate interaction content, if the matching situation is that there is a target historical interaction content that matches the candidate interaction content in the historical interaction content, then the decay coefficient is obtained; the decay coefficient is used to characterize the reduction of the interaction probability value corresponding to the candidate interaction content. Based on the decay coefficient, the interaction probability value corresponding to the candidate interaction content that matches the target historical interaction content is reduced.
[0129] In one possible implementation, processing module 402 is specifically used for: For candidate interaction content that matches the target historical interaction content, obtain the historical time when the target historical interaction content was last output; The interval output duration is obtained based on historical time and current time; The corresponding attenuation coefficient is determined based on the interval output duration and the preset time period.
[0130] In one possible implementation, at least one matching rule includes a random matching rule and a semantic matching rule; the candidate interaction content includes a first candidate interaction content and a second candidate interaction content. Processing module 402 is specifically used for: Based on the random matching rules, at least one first candidate interactive content is randomly selected from the corresponding preset interactive content library, and the preset basic probability value is used as the interaction probability value corresponding to each first candidate interactive content. The system obtains the input information corresponding to the semantic matching rule, and based on the input information, obtains at least one second candidate interactive content that matches the input information from the corresponding preset interactive content library through the semantic matching rule, as well as the semantic similarity between each second candidate interactive content and the input information, and determines the corresponding interaction probability value according to the semantic similarity corresponding to each second candidate interactive content.
[0131] In one possible implementation, the input information includes scene information and / or historical dialogue information of a preset number of times; the second candidate interaction content includes scene candidate interaction content and / or dialogue candidate interaction content. Processing module 402 is specifically used for: The scene information is converted into a natural language string and concatenated to obtain a scene information string. Then, the scene information string is matched with each preset interactive content in the corresponding preset interactive content library according to semantic matching rules to obtain at least one scene candidate interactive content and the semantic similarity of each scene candidate interactive content. And / or, The historical dialogue information of a preset number of times is converted into natural language strings and concatenated to obtain a dialogue information string. Then, the dialogue information string is matched with each preset interaction content in the corresponding preset interaction content library according to semantic matching rules to obtain at least one dialogue candidate interaction content and the semantic similarity corresponding to each dialogue candidate interaction content.
[0132] In one possible implementation, processing module 402 is specifically used for: Obtain the preset weight value corresponding to the second candidate interaction content; Based on the preset weight values and the semantic similarity of each second candidate interaction content, the interaction probability value corresponding to each second candidate interaction content is obtained.
[0133] In one possible implementation, processing module 402 is specifically used for: The adjusted interaction probability values of each candidate interaction content are normalized to obtain the probability distribution; Based on the probability distribution, random sampling is performed from each candidate interactive content to obtain the target interactive content.
[0134] In one possible implementation, processing module 402 is specifically used for: For each candidate interaction content, obtain the similarity between the candidate interaction content and each historical interaction content; If there is a similarity score greater than the preset similarity threshold among the various similarity scores, then it is determined that there is a target historical interaction content in the historical interaction content that matches the candidate interaction content. If all similarities are less than or equal to the preset similarity threshold, it is determined that there is no target historical interaction content that matches the candidate interaction content in the historical interaction content.
[0135] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0136] Figure 5 This is a schematic diagram of the structure of a vehicle provided in one embodiment of this application. Figure 5As shown, the vehicle 500 in this embodiment includes a processor 510 and a memory 520, wherein the memory 520 stores a computer program 521 that can run on the processor 510. When the processor 510 executes the computer program 521, it implements the steps in any of the above method embodiments, for example... Figure 2 Steps 201 to 205 are shown. Alternatively, when processor 510 executes computer program 521, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 4 The functions of modules 401 to 402 are shown.
[0137] For example, computer program 521 may be divided into one or more modules / units, one or more of which are stored in memory 520 and executed by processor 510 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 521 in vehicle 500.
[0138] Those skilled in the art will understand that Figure 5 This is merely an example of a vehicle and does not constitute a limitation on the vehicle. It may include more or fewer components than shown, or combinations of certain components, or different components, such as input / output devices, network access devices, buses, etc.
[0139] The processor 510 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0140] The memory 520 can be an internal storage unit of the vehicle, such as a hard drive or memory, or an external storage device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc. The memory 520 can also include both internal and external storage devices. The memory 520 is used to store computer programs and other programs and data required by the vehicle. The memory 520 can also be used to temporarily store data that has been output or will be output.
[0141] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to 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 embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0142] An embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described interactive content generation method.
[0143] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0144] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0145] In the embodiments provided in this application, it should be understood that the disclosed devices / vehicles and methods can be implemented in other ways. For example, the device / vehicle embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0146] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0147] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0148] If the integrated module / unit is implemented as 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, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0149] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for generating interactive content, characterized in that, include: Receive interactive trigger requests; Based on at least one preset matching rule, obtain the corresponding candidate interactive content from the preset interactive content library, as well as the interaction probability value corresponding to each candidate interactive content; Obtain historical interaction content within a preset time period, and determine the matching status of the historical interaction content with each candidate interaction content; Based on the matching results, the interaction probability values corresponding to each candidate interaction content are adjusted; Based on the adjusted interaction probability values of each candidate interaction content, the target interaction content is determined from the candidate interaction content.
2. The interactive content generation method according to claim 1, characterized in that, The step of adjusting the interaction probability value corresponding to each candidate interaction content based on the matching results includes: For each candidate interaction content, if the matching situation is that there is a target historical interaction content that matches the candidate interaction content in the historical interaction content, then the attenuation coefficient is obtained; the attenuation coefficient is used to characterize the reduction of the interaction probability value corresponding to the candidate interaction content. Based on the attenuation coefficient, the interaction probability value corresponding to the candidate interaction content that matches the target historical interaction content is reduced.
3. The interactive content generation method according to claim 2, characterized in that, The process of obtaining the attenuation coefficient includes: For candidate interaction content that matches the target historical interaction content, obtain the historical time when the target historical interaction content was last output; Based on the historical time and the current time, the interval output duration is obtained; Based on the interval output duration and the preset time period, the corresponding attenuation coefficient is determined.
4. The interactive content generation method according to any one of claims 1 to 3, characterized in that, The at least one matching rule includes a random matching rule and a semantic matching rule; the candidate interaction content includes a first candidate interaction content and a second candidate interaction content. The step of obtaining corresponding candidate interactive content from a preset interactive content library based on at least one preset matching rule, and the interaction probability value corresponding to each candidate interactive content, includes: Based on the random matching rules, at least one first candidate interactive content is randomly selected from the corresponding preset interactive content library, and the preset basic probability value is used as the interactive probability value corresponding to each first candidate interactive content. The system obtains the input information corresponding to the semantic matching rule, and based on the input information, obtains at least one second candidate interactive content that matches the input information from the corresponding preset interactive content library through the semantic matching rule, as well as the semantic similarity between each second candidate interactive content and the input information, and determines the corresponding interaction probability value according to the semantic similarity corresponding to each second candidate interactive content.
5. The interactive content generation method according to claim 4, characterized in that, The input information includes scene information and / or historical dialogue information of a preset number of times; the second candidate interaction content includes scene candidate interaction content and / or dialogue candidate interaction content. The step of obtaining at least one second candidate interactive content that matches the input information from a corresponding preset interactive content library based on the input information and through the semantic matching rules, and the semantic similarity between each second candidate interactive content and the input information, includes: The scene information is converted into a natural language string and concatenated to obtain a scene information string. Then, the scene information string is matched with each preset interactive content in the corresponding preset interactive content library according to the semantic matching rules to obtain at least one scene candidate interactive content and the semantic similarity corresponding to each scene candidate interactive content. And / or, The historical dialogue information of a preset number of times is converted into a natural language string and concatenated to obtain a dialogue information string. Then, the dialogue information string is matched with each preset interaction content in the corresponding preset interaction content library according to the semantic matching rules to obtain at least one dialogue candidate interaction content and the semantic similarity corresponding to each dialogue candidate interaction content.
6. The interactive content generation method according to claim 4, characterized in that, The step of determining the corresponding interaction probability value based on the semantic similarity of each second candidate interaction content includes: Obtain the preset weight value corresponding to the second candidate interaction content; Based on the preset weight value and the semantic similarity corresponding to each second candidate interaction content, the interaction probability value corresponding to each second candidate interaction content is obtained.
7. The interactive content generation method according to any one of claims 1 to 3, characterized in that, The process of determining the target interaction content from each candidate interaction content based on the adjusted interaction probability value includes: The adjusted interaction probability values of each candidate interaction content are normalized to obtain the probability distribution; Based on the probability distribution, random sampling is performed from each candidate interactive content to obtain the target interactive content.
8. The interactive content generation method according to any one of claims 1 to 3, characterized in that, Determining the matching status between the historical interaction content and each candidate interaction content includes: For each candidate interaction content, obtain the similarity between the candidate interaction content and each historical interaction content; If there is a similarity greater than the preset similarity threshold among the various similarities, then it is determined that there is a target historical interaction content in the historical interaction content that matches the candidate interaction content. If all similarities are less than or equal to a preset similarity threshold, then it is determined that there is no target historical interaction content in the historical interaction content that matches the candidate interaction content.
9. A vehicle comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the interactive content generation method as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the interactive content generation method as described in any one of claims 1 to 8.
