An AI toy-oriented cloud conversation response method and device and medium
By semantically deconstructing and constructing association constraints for the natural language requests of AI toys, a semantic constraint guidance graph is generated and combined with task-driven scripts for hierarchical response processing. This solves the problems of insufficient semantic association modeling and candidate response convergence in cloud dialogue of AI toys, and achieves more stable dialogue response and terminal execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI FANHEYI TECH CO LTD
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-09
AI Technical Summary
Existing AI toy cloud dialogue technology lacks semantic association modeling and candidate response convergence capabilities, which makes dialogue understanding prone to referential drift, target deviation, and uncontrolled response boundaries, making it difficult to balance the stability of the main expression, the effectiveness of the compensating expression, and the adaptability of terminal execution.
By performing semantic deconstruction and association constraint construction on the natural language requests of AI toys, a semantic constraint guidance graph is generated. Combined with task-driven scripts, hierarchical response channels are orchestrated and generated in parallel to obtain hierarchical candidate response clusters. Convergence optimization compensation is then performed to generate cloud response result packages, which are finally executed on the terminal and stored and written back.
It improves the accuracy, coherence, and terminal execution adaptability of dialogues, reduces the risk of reference drift and uncontrolled response, and enhances the stability and accuracy of response content.
Smart Images

Figure CN122173620A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a cloud-based dialogue response method, device, and medium for AI toys. Background Technology
[0002] With the continuous development of natural language processing, cloud computing services, voice interaction technology, and embedded terminal capabilities, AI toys aimed at children's companionship, early education, emotional interaction, and scenario-based entertainment have gradually evolved from early offline audio playback, preset question-and-answer, and fixed command-triggered modes to intelligent interaction modes relying on cloud-based semantic understanding and content generation capabilities. Existing technologies enhance dialogue continuity, personality stability, and interactive immersion through user profiling, character setting, contextual memory, and multimodal feedback mechanisms. AI toy-related technologies are developing from single-turn command responses to multi-turn semantic interactions, from fixed content output to dynamic cloud generation, and from single voice feedback to broadcasting and action-coordinated feedback, becoming an important technological branch of the cross-integration of artificial intelligence applications, intelligent terminal interaction, and natural language processing.
[0003] However, existing AI toy cloud dialogue technologies still have two shortcomings. First, existing solutions mostly rely on single-turn speech recognition results or shallow intent classification results as the basis for response, lacking a unified modeling capability for the relationships between behavioral content, target-oriented content, emotional expression content, and constraint expression content. This leads to problems such as referential drift, target deviation, and uncontrolled response boundaries in dialogue understanding. Second, when generating responses, they usually rely on single-path output or coarse-grained candidate selection, lacking hierarchical candidate organization, cross-layer compensation convergence, and executable encapsulation mapping capabilities based on task-driven relationships, graph connectivity, and constraint transmission order. As a result, it is difficult to balance the stability of the main expression, the effectiveness of the compensation expression, and the adaptability of terminal execution. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a cloud-based dialogue response method for AI toys to address the problems of insufficient semantic association modeling and insufficient candidate response convergence ability.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a cloud-based dialogue response method for AI toys, comprising: performing semantic deconstruction and association constraint construction on the natural language requests of the AI toy to generate a semantic constraint guidance graph; performing structured task translation processing on the semantic constraint guidance graph and writing corresponding fields to generate a task-driven script; using a constraint projection hierarchical construction method to perform hierarchical response channel orchestration and parallel generation processing on the task-driven script and the semantic constraint guidance graph to obtain hierarchical candidate response clusters; performing convergence and optimization compensation on the hierarchical candidate response clusters to obtain target response content, and combining the target response content with the task-driven script to encapsulate an executable response to generate a cloud-based response result package; and performing terminal response delivery and memory storage write-back based on the cloud-based response result package to generate response execution information.
[0008] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the natural language requests to AI toys are subjected to semantic deconstruction and association constraint construction to generate a semantic constraint guidance graph. The specific steps are as follows:
[0009] Perform semantic boundary relationship binding and anaphoric association on natural language requests to AI toys to construct referential association relationships;
[0010] Register the natural language requests of AI toys as graph nodes and the referential relationships as graph connection relationships to generate a semantic constraint-guided graph.
[0011] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the specific steps of performing structured task translation processing on the semantic constraint-guided graph are as follows:
[0012] The semantic constraint guides the graph to converge the dominant nodes, obtains the semantic skeleton, and performs relation inheritance translation on the semantic skeleton to obtain the set of field constraints.
[0013] The field constraint set is filled with closed-loop references to generate a task constraint chain.
[0014] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the task-driven script is generated by extracting the constraint transmission order in the task constraint chain and solidifying the driving order of the task constraint chain according to the constraint transmission order.
[0015] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the step of using a constraint projection hierarchical construction method to perform hierarchical response channel orchestration and parallel generation processing on the task-driven script and semantic constraint guidance graph to obtain hierarchical candidate response clusters is as follows:
[0016] The task-driven script is constrained by projecting the constraint transmission order in the task constraint chain and the graph connection relationship in the semantic constraint guidance graph to form a response semantic cluster.
[0017] Perform closed-loop compensation on the response semantic cluster to form a closed-loop response semantic chain;
[0018] Perform reverse pruning on the closed-loop response semantic chain to obtain response semantic fragments, and then arrange the response semantic fragments in a hierarchical manner to generate hierarchical response semantic groups;
[0019] The response expression range of each hierarchical response semantic group is determined, and candidate response expressions are formed within the corresponding response expression range. Then, inter-layer mutual exclusion stripping is performed on the candidate response expressions to obtain hierarchical candidate response clusters.
[0020] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the specific steps for performing convergence optimization compensation on the hierarchical candidate response cluster to obtain the target response content are as follows:
[0021] The hierarchical candidate response clusters are compared with the constraints in the task-driven script, and the response convergence value is calculated.
[0022] The main expression is determined based on the response convergence value, and the cross-layer semantic compensation folding method is used to perform directional embedding of candidate response fragments that are consistent with the main expression in the hierarchical candidate response cluster to the main expression, thereby generating compensation expression fragments;
[0023] Compressed expression fragments are compressed and replaced in the main expression to obtain the target response content.
[0024] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the cloud response result package is generated by encapsulating and mapping the target response content with the task-driven script.
[0025] As a preferred embodiment of the cloud-based dialogue response method for AI toys described in this invention, the specific steps for generating response execution information by sending terminal responses based on cloud response result packets and writing back to memory are as follows:
[0026] The cloud response result package is sent to the AI toy terminal, and the AI toy terminal executes the terminal response according to the cloud response result package to obtain the execution feedback content.
[0027] The effective response of the execution feedback content is screened to determine the effective feedback fragments, and the effective feedback fragments are then folded to obtain the stored memory fragments.
[0028] Boundary filtering is performed on the precipitated memory fragments, and the filtered precipitated memory fragments are written back to the corresponding location in the task-driven script to generate response execution information.
[0029] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the cloud-based dialogue response method for AI toys as described in the first aspect of the present invention.
[0030] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the cloud-based dialogue response method for AI toys as described in the first aspect of the present invention.
[0031] The beneficial effects of this invention are as follows: by performing semantic deconstruction and association constraint construction on the natural language requests of AI toys, and further combining task-driven scripts for hierarchical response channel orchestration and parallel generation processing, it can provide a more accurate semantic basis and a more stable candidate source for subsequent response convergence. This is beneficial to reducing the risks of referential drift, target offset and response runaway, and also beneficial to improving the accuracy, coherence and terminal execution adaptability of the final response content. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Fig. 1 A flowchart for a cloud-based dialogue response method for AI toys.
[0034] Fig. 2 A flowchart for guiding graph construction based on semantic constraints.
[0035] Fig. 3 A flowchart for constructing hierarchical candidate response clusters.
[0036] Fig. 4 The flowchart for responding to the write-back. Detailed Implementation
[0037] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0038] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0039] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0040] Reference Figs. 1-4 As one embodiment of the present invention, this embodiment provides a cloud-based dialogue response method for AI toys, including the following steps:
[0041] S1: Perform semantic deconstruction and association constraint construction on the natural language requests of AI toys to generate a semantic constraint guidance graph.
[0042] S1.1: The natural language requests of AI toys include behavioral content, target-oriented content, emotional expression content, and restricted expression content.
[0043] Specifically, the natural language requests from AI toys are segmented and tagged with parts of speech, and verb terms or verb phrases are searched. Verb terms and verb phrases that have a direct relationship with subsequent noun terms, noun phrases or pronoun phrases are taken as the behavior content.
[0044] After the content of the behavior is determined, find the nouns, noun phrases or referential phrases that form an action object relationship with the content of the behavior, and take the corresponding object expression as the target content.
[0045] Find the emotion words in the sentence fragment, and combine the degree modifiers or state descriptors corresponding to the emotion words to form the emotion expression.
[0046] Find negative words, limiting words, scope words, or manner constraint words in the sentence fragment, and use the expressions that form a constraint relationship with the behavior content or the target content as the limiting expression content.
[0047] S1.2: Perform semantic boundary relationship binding and anaphoric association on the natural language requests of AI toys to construct referential association relationships.
[0048] Specifically, the natural language requests from AI toys are first segmented into sentences to obtain multiple sentence fragments arranged in sequence. These sentence fragments are then processed by word segmentation and part-of-speech tagging to obtain a sequence of terms corresponding to each sentence fragment. Noun terms, noun phrases, and referential phrases are searched in the term sequence. Noun terms and noun phrases that can independently express people, objects, events, or topics are identified as object expressions, while referential phrases that cannot independently locate objects are identified as anaphoric expressions.
[0049] Following the order of multiple sentence fragments, for each anaphoric expression, the preceding object expression is searched backwards. The consistency between the anaphoric expression and the object expression is compared, including consistency of headwords, modifiers, and semantic themes. The object expression with the highest degree of consistency is determined as the anaphoric target. When multiple object expressions have the same degree of consistency, the most recently occurring object expression is prioritized as the anaphoric target. When the order of recent occurrences is the same or indistinguishable, the object expression with the same headword is prioritized as the anaphoric target. After the anaphoric target is determined, the anaphoric expression is bound to the anaphoric target to form a referential association relationship whereby the anaphoric expression points to the anaphoric target.
[0050] After the referential relationships are established, the behavioral content is bound to the target content to form an action relationship; the emotional expression content is bound to the behavioral content to form an emotion-driven relationship; the restrictive expression content is bound to the behavioral content or the target content to form a restriction relationship; and then the action relationship, the emotion-driven relationship, and the restriction relationship are organized together to build a constraint relationship.
[0051] S1.3: Register the natural language requests of AI toys as graph nodes and register the referential relationships as graph connection relationships to generate a semantic constraint guidance graph.
[0052] Specifically, based on the behavioral content, target-oriented content, emotional expression content, restricted expression content, object expression, and anaphoric expression, nodes are registered for each of these categories, and corresponding text content and sequential position are written for each node.
[0053] After node registration is completed, the referential relationships are written one by one to the connection position between the referential expression and the referential target, the action relationships are written one by one to the connection position between the behavioral content and the target content, the emotion-driven relationships are written one by one to the connection position between the emotional expression content and the behavioral content, and the restriction relationships are written one by one to the connection position between the restriction expression content and the behavioral content or the target content.
[0054] After node registration and connection registration are completed, all graph nodes and all graph connection relationships are uniformly organized to generate a semantically constrained guided graph.
[0055] It should be noted that the semantic constraint guidance graph is a semantic association structure formed by unifying and organizing the behavioral content, target-oriented content, emotional expression content, restriction expression content and corresponding relationships in the natural language requests of AI toys. It can transform the originally scattered request semantics into a continuously transferable constraint basis, thereby helping to reduce the risks of reference drift, target offset and response boundary loss of control, and providing a stable semantic foundation for subsequent task-driven script generation and hierarchical candidate response cluster construction.
[0056] S2: Perform structured task translation processing on the semantic constraint-guided graph and write the corresponding fields to generate a task-driven script.
[0057] S2.1: The semantic constraint guide graph is converged by the dominant node to obtain the semantic skeleton, and the semantic skeleton is processed by relation inheritance translation to obtain the set of field constraints.
[0058] Specifically, the task-driven script is stored in the form of field templates, where the task behavior field, target object field, emotional need field, and output boundary field are respectively written with corresponding content and corresponding constraint relationships. The graph nodes and graph connection relationships in the semantic constraint guidance graph are read sequentially according to the registration order, the behavior content connected with the action relationship is found, and the behavior content is determined as the dominant node. Then, the target-oriented content connected by the action relationship, the emotional expression content connected by the emotion-driven relationship, and the restriction expression content connected by the restriction relationship are read around the dominant node. The target-oriented content, emotional expression content, and restriction expression content corresponding to the dominant node are merged into the semantic skeleton.
[0059] After the semantic skeleton is determined, the behavioral content, target content, emotional expression content, and restrictive expression content in the semantic skeleton are written into the task behavior field, target object field, emotional requirement field, and output boundary field, respectively. The interaction relationship between the behavioral content and the target content in the semantic skeleton is inherited as the field constraint relationship between the task behavior field and the target object field. The emotional driving relationship of the emotional expression content on the behavioral content is inherited as the field constraint relationship between the emotional requirement field and the task behavior field. The restriction relationship of the restrictive expression content on the behavioral content or the target content is inherited as the field constraint relationship between the output boundary field and the task behavior field or the target object field, thus obtaining the set of field constraints.
[0060] S2.2: Perform closed-loop filling on the field constraint set to generate a task constraint chain.
[0061] Specifically, the target object field in the field constraint set is read, and then the registered object expressions, anaphoric expressions, and referential relationships in the semantic constraint guidance graph are read; it is checked whether there is an anaphoric expression in the target object field; when there is an anaphoric expression in the target object field, the anaphoric target corresponding to the anaphoric expression is determined according to the referential relationship, and the anaphoric target is written into the corresponding relationship position in the target object field so that the anaphoric expression and the anaphoric target form a complete correspondence.
[0062] After the target object field completes the object pointing closure, the target object field that has completed the object pointing closure is sequentially connected with the task behavior field, emotional need field and output boundary field in the field constraint set according to the field constraint relationship, so that a continuous and transitive constraint correspondence is formed between the task behavior field, target object field, emotional need field and output boundary field, generating a task constraint chain.
[0063] S2.3: Extract the constraint transmission order from the task constraint chain, and solidify the driving order of the task constraint chain according to the constraint transmission order to generate the task driving script.
[0064] Specifically, the task behavior field, target object field, emotional need field, and output boundary field in the task constraint chain are read sequentially to obtain the interaction relationship between the task behavior field and the target object field, the emotional driving relationship between the task behavior field and the emotional need field, and the restriction relationship between the output boundary field and the task behavior field and the target object field. Based on this, the constraint transmission order is formed in which the task behavior field precedes the target object field and the emotional need field, and the output boundary field follows the task behavior field and the target object field.
[0065] It should be noted that the constraint transmission order refers to the order in which the task behavior field, target object field, emotional need field, and output boundary field are arranged according to the sequential dependency relationship of "determining the response action, determining the target object, supplementing emotional requirements, and imposing expression boundary restrictions", for example, "continue telling → the story of the little bear from yesterday → a little scared → don't make it too long".
[0066] After the constraint transmission order is determined, the task behavior field is written to the beginning of the script; the target object field that has an interaction relationship with the task behavior field is written to the position after the task behavior field; the emotion requirement field that has an emotion-driven relationship with the task behavior field is written to the position after the target object field; the output boundary field that forms a constraint relationship with the task behavior field and the target object field is written to the position after the emotion requirement field, and the interaction relationship, emotion-driven relationship and constraint relationship are written synchronously to generate the task-driven script.
[0067] S3: The constraint projection hierarchical construction method is used to perform hierarchical response channel orchestration and parallel generation processing of task-driven scripts and semantic constraint guidance graphs to obtain hierarchical candidate response clusters.
[0068] S3.1: Project the task-driven script according to the constraint transmission order in the task constraint chain and the graph connection relationship in the semantic constraint guidance graph to form a response semantic cluster.
[0069] Specifically, the task behavior field, target object field, emotional need field, and output boundary field in the task-driven script are read sequentially according to the constraint transmission order in the task constraint chain, and a field correspondence is established with the behavior content, target-oriented content, emotional expression content, and restriction expression content in the semantic constraint guidance graph.
[0070] After the field correspondence is established, the interaction relationship between the task behavior field and the target object field is written into the connection position between the behavior content and the target content. The emotion-driven relationship between the task behavior field and the emotion requirement field is written into the connection position between the behavior content and the emotion expression content. The restriction relationship between the output boundary field and the task behavior field and the target object field is written into the connection position between the restriction expression content and the behavior content or the target content. This transforms the field constraint relationship in the task-driven script into the constraint correspondence relationship between the content in the semantic constraint guidance graph.
[0071] After the constraint correspondence between content is formed, the target content, emotional expression content, and restricted expression content that maintain a constraint correspondence with the same behavioral content are merged to form a response semantic cluster.
[0072] S3.2: Perform closed-loop compensation on the response semantic cluster to form a closed-loop response semantic chain.
[0073] Specifically, the target-pointing content in the response semantic cluster is read, and the registered object expressions, anaphoric expressions, and referential relationships in the semantic constraint guidance graph are read. The anaphoric expression is searched for in the target-pointing content. When the anaphoric expression exists in the target-pointing content, the anaphoric target corresponding to the anaphoric expression is determined according to the referential relationship, and the anaphoric target is written into the associated position in the target-pointing content corresponding to the anaphoric expression, so that the target-pointing content retains both the anaphoric expression and the anaphoric target.
[0074] After the target content completes the object pointing closure, the behavioral content in the response semantic cluster is connected with the target content according to the interaction relationship, the behavioral content is connected with the emotional expression content according to the emotional driving relationship, and the restrictive expression content is connected with the behavioral content or the target content according to the restrictive relationship, thereby forming a closed-loop response semantic chain.
[0075] S3.3: Perform reverse pruning on the closed-loop response semantic chain to obtain response semantic fragments, and then arrange the response semantic fragments in layers to generate layered response semantic groups.
[0076] Specifically, when performing reverse pruning on the closed-loop response semantic chain, the behavioral content, target-oriented content, emotional expression content, and restrictive expression content in the closed-loop response semantic chain are read. Taking the restrictive expression content as the pruning starting point, the behavioral content and target-oriented content corresponding to the restrictive expression content are checked back along the restrictive relationship, and it is determined whether each semantic connection in the closed-loop response semantic chain is consistent with the restrictive relationship. When the semantic connection is inconsistent with the restrictive relationship, the inconsistent semantic connection and the semantic connection that is continuously connected to the inconsistent semantic connection are deleted. The semantic connections that are consistent with the restrictive relationship and still maintain the action relationship, emotional driving relationship, and restrictive relationship are retained, thereby obtaining the response semantic fragment.
[0077] The response semantic fragments are arranged hierarchically according to the types of connection relationships retained in them. The response semantic fragments that retain the action relationship are arranged into the dominant response layer, the response semantic fragments that retain the emotion-driven relationship are arranged into the association reinforcement layer, and the response semantic fragments that retain the restriction relationship are arranged into the boundary convergence layer. The dominant response layer, association reinforcement layer and boundary convergence layer are then uniformly organized to generate a hierarchical response semantic group.
[0078] S3.4: Determine the response expression range of each hierarchical response semantic group, form candidate response expressions within the corresponding response expression range, and then perform inter-layer mutual exclusion stripping on the candidate response expressions to obtain hierarchical candidate response clusters.
[0079] Specifically, the dominant response layer, the association reinforcement layer, and the boundary convergence layer in the hierarchical response semantic group are read, and the response expression range is determined according to the connection relationship type retained in each layer. The response expression range of the dominant response layer is the range of continuous response semantic fragments that retain the connection relationship between behavioral content and target-oriented content; the response expression range of the association reinforcement layer is the range of continuous response semantic fragments that retain the connection relationship between behavioral content and emotional expression content; and the response expression range of the boundary convergence layer is the range of continuous response semantic fragments that retain the connection relationship between restrictive expression content and behavioral content or target-oriented content. After the response expression range of each layer is determined, the response semantic fragments within the response expression range of each layer are spliced together according to the arrangement order in the hierarchical response semantic group to generate candidate response expressions.
[0080] After the candidate response expressions are formed, mutual exclusion stripping is performed between execution layers according to the response expression range to which the candidate response expressions belong. Candidate response expressions from the range of the dominant response layer are collected into the dominant candidate layer, candidate response expressions from the range of the associated reinforcement layer are collected into the reinforcement candidate layer, and candidate response expressions from the range of the boundary convergence layer are collected into the boundary candidate layer, thus obtaining hierarchical candidate response clusters.
[0081] S4: Perform convergence optimization compensation on the hierarchical candidate response clusters, obtain the target response content, and combine the target response content with the task-driven script to encapsulate the target response content into an executable response and generate a cloud response result package.
[0082] S4.1: Compare the hierarchical candidate response clusters with the constraints in the task-driven script, and calculate the response convergence value.
[0083] Specifically, the candidate response expressions in the hierarchical candidate response clusters are read, and then the task behavior field, target object field, emotional need field, and output boundary field in the task-driven script are read; each candidate response expression is compared with the task behavior field, target object field, emotional need field, and output boundary field respectively.
[0084] The ratio of the number of behaviorally consistent content items matching the task behavior field to the number of behavioral comparison items in the task behavior field is used as the behavior matching degree; the ratio of the number of object-consistent content items matching the target object field to the number of object comparison items in the target object field is used as the object matching degree; the ratio of the number of emotion-consistent content items matching the emotion demand field to the number of emotion comparison items in the emotion demand field is used as the emotion matching degree; the ratio of the number of boundary-consistent content items matching the output boundary field to the number of boundary comparison items in the output boundary field is used as the boundary matching degree; and the ratio of the number of inconsistent content items between the candidate response expression and the task behavior field, target object field, emotion demand field, and output boundary field to the total number of comparison items is used as the conflict deduction degree.
[0085] The response convergence value is calculated based on behavioral matching degree, object matching degree, emotional matching degree, boundary matching degree, and conflict deduction degree. The expression is:
[0086] ;
[0087] in, In response to the convergence value, For behavioral matching degree, For object matching degree, For emotional matching, For boundary matching degree, For conflict reduction.
[0088] It should be noted that the response convergence value is used to characterize the overall consistency between the candidate response expression and the constraints in the task-driven script. The higher the response convergence value, the higher the degree of matching and the lower the degree of conflict between the candidate response expression and the task behavior field, target object field, emotional requirement field, and output boundary field. The role of the response convergence value is to provide a quantitative basis for determining the main expression and generating subsequent compensation expression fragments, thereby helping to improve the accuracy, stability, and executability of the target response content.
[0089] S4.2: Determine the main expression based on the response convergence value, and use the cross-layer semantic compensation folding method to perform directional splicing of candidate response fragments that are consistent with the main expression in the hierarchical candidate response cluster to the main expression to generate compensation expression fragments.
[0090] Specifically, the dominant candidate layer, the reinforcement candidate layer and the boundary candidate layer in the hierarchical candidate response cluster are read. The candidate response expressions in the dominant candidate layer, the reinforcement candidate layer and the boundary candidate layer are read respectively, and the response convergence value corresponding to each candidate response expression is read at the same time.
[0091] The candidate response expression with the highest response convergence value is determined as the primary expression; when multiple candidate response expressions have the same response convergence value, the candidate response expression with the higher sum of behavior matching degree and object matching degree is given priority to be determined as the primary expression; when the sum of behavior matching degree and object matching degree is still the same, the candidate response expression with the lower conflict reduction degree is given priority to be determined as the primary expression.
[0092] After the main expression is determined, the candidate response expressions in the reinforcement candidate layer and the candidate response expressions in the boundary candidate layer are read. The candidate response expressions in the reinforcement candidate layer are compared with the main expression in terms of content correspondence. Candidate response fragments that are consistent with the task behavior field and target object field in the main expression and can supplement the expression content of the emotion demand field are retained. Then, the candidate response expressions in the boundary candidate layer are compared with the main expression in terms of content correspondence. Candidate response fragments that are consistent with the task behavior field and target object field in the main expression and can supplement the expression content of the output boundary field are retained.
[0093] Based on the arrangement of behavior expression, object expression, emotion expression, and boundary expression in the main expression, a cross-layer semantic compensation folding method is performed on the retained candidate response fragments. The candidate response fragments that supplement the emotion requirement field are embedded into the positions corresponding to the emotion expression in the main expression, and the candidate response fragments that supplement the output boundary field are embedded into the positions corresponding to the boundary expression in the main expression. The positions of the expression content corresponding to the task behavior field and the expression content corresponding to the target object field in the main expression remain unchanged, thus generating compensation expression fragments.
[0094] It should be noted that the cross-layer semantic compensation folding method refers to extracting candidate response fragments that are consistent with the main expression and have a supplementary role from the reinforcement candidate layer and the boundary candidate layer, based on the main expression, and embedding them into the main expression according to the corresponding expression position, while deleting duplicate or conflicting content, thereby forming a more complete expression; the cross-layer semantic compensation folding method folds the supplementary content in different layers into the same expression chain while keeping the core semantics of the main expression unchanged.
[0095] S4.3: Compress and replace the compensation expression fragment with the main expression to obtain the target response content.
[0096] Specifically, the main expression and the compensation expression fragments are read, and each candidate response fragment in the compensation expression fragment is compared with the corresponding expression content in the main expression one by one to find the repeated behavioral expressions, object expressions, emotional expressions and boundary expressions between the main expression and the compensation expression fragments.
[0097] Remove any content in the compensation expression fragment that is redundant with the main expression, and retain the content in the compensation expression fragment that can supplement the emotional need field or the output boundary field without changing the task behavior field and the target object field in the main expression.
[0098] After the content to be retained is determined, the retained content is written into the main expression according to the corresponding expression position in the main expression. The emotional supplementary content in the compensation expression fragment replaces the corresponding emotional expression position in the main expression, and the boundary supplementary content in the compensation expression fragment replaces the corresponding boundary expression position in the main expression. The behavioral expression position and object expression position in the main expression remain unchanged, and the target response content is obtained.
[0099] S4.4: Encapsulate and map the target response content with the task-driven script to generate a cloud response result package.
[0100] Specifically, the task behavior field, target object field, emotional need field, and output boundary field are read from the task-driven script. After reading, the content in the target response that matches the task behavior field is determined as the response text content, the content in the target response that matches the target object field is determined as the object-related content, the content in the target response that matches the emotional need field is determined as the emotion regulation content, and the content in the target response that matches the output boundary field is determined as the boundary restriction content.
[0101] After the response text content, object-related content, sentiment adjustment content, and boundary constraint content are determined, the response text content is written to the response text location, the object-related content is written to the object-related location, the sentiment adjustment content is written to the sentiment adjustment location, and the boundary constraint content is written to the boundary constraint location, so that the field content in the task-driven script and the corresponding expression content in the target response content form a one-to-one encapsulation relationship.
[0102] After writing is completed at each location, the response text location, object association location, emotion adjustment location, and boundary restriction location are uniformly organized to generate a cloud response result package.
[0103] S5: Based on the cloud response result package, execute the terminal response distribution and memory storage write-back to generate response execution information.
[0104] S5.1: Send the cloud response result package to the AI toy terminal, and enable the AI toy terminal to execute the terminal response according to the cloud response result package and obtain the execution feedback content.
[0105] Specifically, when sending the cloud response result package to the AI toy terminal and obtaining execution feedback, the system first reads the response text content, object association content, emotion adjustment content, and boundary restriction content from the cloud response result package. Then, it sends the response text content to the AI toy terminal's voice output position, the object association content to the AI toy terminal's object association position, the emotion adjustment content to the AI toy terminal's emotion adjustment position, and the boundary restriction content to the AI toy terminal's boundary restriction position. After the cloud response result package is sent, the system executes the broadcast according to the response text content, maintains the target object pointing according to the object association content, adjusts the broadcast tone and intensity according to the emotion adjustment content, and limits the broadcast length and expression range according to the boundary restriction content. After the terminal response is executed, the system sequentially reads the broadcast completion status, object pointing maintenance status, emotion adjustment execution status, and boundary restriction execution status output by the AI toy terminal. The system then organizes these statuses according to their corresponding relationships to obtain the execution feedback content.
[0106] S5.2: Perform response validity screening on the execution feedback content, determine the valid feedback fragments, and perform referential continuation folding on the valid feedback fragments to obtain the precipitated memory fragments.
[0107] Specifically, the completion status of the broadcast is compared with the content of the response text, the object pointing status is compared with the content associated with the object, the emotion regulation execution status is compared with the emotion regulation content, and the boundary restriction execution status is compared with the boundary restriction content. After the four comparisons are completed, the number of consistent items and the total number of comparison items are counted. The ratio of the number of consistent items to the total number of comparison items is then used as the valid feedback value.
[0108] The effective feedback value reaches the effective threshold (obtained by comparing the execution feedback content with the response text content, object-related content, sentiment adjustment content, and boundary restriction content; the value range is: The execution feedback content is determined as a valid feedback segment. After the valid feedback segment is determined, the broadcast completion status, object pointing retention status, and emotion regulation execution status in the valid feedback segment are read. The behavior execution results consistent with the task behavior field, the object retention results consistent with the target object field, and the emotion execution results consistent with the emotion need field are extracted respectively. The object association content and object pointing retention status pointing to the same target object in the object retention results are merged in order of appearance. The behavior execution results, object retention results, and emotion execution results are then uniformly organized to obtain the sedimented memory segment.
[0109] It should be noted that "precipitated memory fragments" refers to the memory content obtained by referring to and folding the feedback content in effective feedback fragments that can represent the continuity of the target object, the continuity of the execution state, or the emotional execution result. The purpose of precipitated memory fragments is to retain effective feedback in the current round of terminal response that has subsequent reference value, and to use it as the basis for subsequent writing of task-driven scripts and forming response execution information, which helps to enhance the continuity of objects and the coherence of responses in the dialogue.
[0110] S5.3: Perform boundary filtering on the precipitated memory fragments and write the filtered precipitated memory fragments back to the corresponding location in the task-driven script to generate response execution information.
[0111] Specifically, the sedimented memory fragments are compared with the output boundary fields to find the expressions in the sedimented memory fragments that are consistent with the output boundary fields and the expressions that are inconsistent with the output boundary fields. The expressions that are consistent with the output boundary fields are retained, and the expressions that are inconsistent with the output boundary fields are deleted, thus obtaining the filtered sedimented memory fragments.
[0112] After obtaining the filtered sedimented memory fragments, the filtered sedimented memory fragments that are consistent with the task behavior field are written to the corresponding positions of the task behavior field; the filtered sedimented memory fragments that are consistent with the target object field are written to the corresponding positions of the target object field; the filtered sedimented memory fragments that are consistent with the emotional need field are written to the corresponding positions of the emotional need field; after the write-back is completed at the corresponding positions of the task behavior field, the target object field, and the emotional need field, the task-driven scripts that have been written back are uniformly organized to generate response execution information.
[0113] It should be noted that the response execution information includes the broadcast completion content after the terminal response execution, the target object pointing and retention content, the emotion regulation execution content, and the corresponding content of the task behavior field, the target object field, and the emotion need field after being written back after memory sedimentation.
[0114] This embodiment also provides a computer device applicable to the cloud-based dialogue response method for AI toys, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the cloud-based dialogue response method for AI toys as proposed in the above embodiment.
[0115] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0116] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the cloud-based dialogue response method for AI toys as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0117] In summary, this invention, by performing semantic deconstruction and constructing association constraints on the natural language requests of AI toys, and further combining task-driven scripts for hierarchical response channel orchestration and parallel generation processing, can provide a more accurate semantic basis and a more stable candidate source for subsequent response convergence. This not only helps reduce the risks of referential drift, target offset and response runaway, but also helps improve the accuracy, coherence and terminal execution adaptability of the final response content.
[0118] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A cloud-based dialogue response method for AI toys, characterized in that, include: The system performs semantic deconstruction and relational constraint construction on the natural language requests from AI toys, generating a semantic constraint guidance graph. The semantically constrained guided graph is subjected to structured task translation processing, and the corresponding fields are written to generate a task-driven script. A constraint projection hierarchical construction method is used to perform hierarchical response channel orchestration and parallel generation of task-driven scripts and semantic constraint guidance graphs to obtain hierarchical candidate response clusters. Perform convergence optimization compensation on the hierarchical candidate response clusters, obtain the target response content, and combine the task-driven script to encapsulate the target response content into an executable response to generate a cloud response result package; Based on the cloud-based response result package, the terminal response is sent out and the memory is stored and written back to generate response execution information.
2. The cloud-based dialogue response method for AI toys as described in claim 1, characterized in that, The natural language requests to the AI toy are subjected to semantic deconstruction and association constraint construction to generate a semantic constraint guidance graph. The specific steps are as follows: Perform semantic boundary relationship binding and anaphoric association on natural language requests to AI toys to construct referential association relationships; Register the natural language requests of AI toys as graph nodes and the referential relationships as graph connection relationships to generate a semantic constraint-guided graph.
3. The cloud-based dialogue response method for AI toys as described in claim 2, characterized in that, The specific steps for performing structured translation processing on the semantically constrained guided graph are as follows: The semantic constraint guides the graph to converge the dominant nodes, obtains the semantic skeleton, and performs relation inheritance translation on the semantic skeleton to obtain the set of field constraints. The field constraint set is filled with closed-loop references to generate a task constraint chain.
4. The cloud-based dialogue response method for AI toys as described in claim 3, characterized in that, The task-driven script is generated by extracting the constraint transmission order from the task constraint chain and solidifying the driving order of the task constraint chain according to the constraint transmission order.
5. The cloud-based dialogue response method for AI toys as described in claim 1 or 4, characterized in that, The constrained projection hierarchical construction method is used to perform hierarchical response channel orchestration and parallel generation of the task-driven script and semantic constraint guidance graph to obtain hierarchical candidate response clusters. The specific steps are as follows: The task-driven script is projected according to the constraint transmission order in the task constraint chain and the graph connection relationship in the semantic constraint guidance graph to form a response semantic cluster. Perform closed-loop compensation on the response semantic cluster to form a closed-loop response semantic chain; Perform reverse pruning on the closed-loop response semantic chain to obtain response semantic fragments, and then arrange the response semantic fragments in a hierarchical manner to generate hierarchical response semantic groups; The response expression range of each hierarchical response semantic group is determined, and candidate response expressions are formed within the corresponding response expression range. Then, inter-layer mutual exclusion stripping is performed on the candidate response expressions to obtain hierarchical candidate response clusters.
6. The cloud-based dialogue response method for AI toys as described in claim 5, characterized in that, The specific steps for performing convergence optimization compensation on the hierarchical candidate response clusters to obtain the target response content are as follows: The hierarchical candidate response clusters are compared with the constraints in the task-driven script, and the response convergence value is calculated. The main expression is determined based on the response convergence value, and the cross-layer semantic compensation folding method is used to perform directional embedding of candidate response fragments that are consistent with the main expression in the hierarchical candidate response cluster to the main expression, thereby generating compensation expression fragments; Compressed expression fragments are compressed and replaced in the main expression to obtain the target response content.
7. The cloud-based dialogue response method for AI toys as described in claim 6, characterized in that, The cloud response result package is generated by encapsulating and mapping the target response content with the task-driven script.
8. The cloud-based dialogue response method for AI toys as described in claim 1, characterized in that, The steps for sending and writing back the terminal response based on the cloud response result package and writing back the memory to generate response execution information are as follows: The cloud response result package is sent to the AI toy terminal, and the AI toy terminal executes the terminal response according to the cloud response result package to obtain the execution feedback content. The effective response of the execution feedback content is screened to determine the effective feedback fragments, and the effective feedback fragments are then folded to obtain the stored memory fragments. Boundary filtering is performed on the precipitated memory fragments, and the filtered precipitated memory fragments are written back to the corresponding location in the task-driven script to generate response execution information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the cloud-based dialogue response method for AI toys as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the cloud-based dialogue response method for AI toys as described in any one of claims 1 to 8.