Semantic comprehension and generation model based on artificial intelligence
Through the semantic understanding and generation model based on artificial intelligence, user input is parsed as a semantic logic diagram, text is generated and verified, and the content is dynamically optimized, which solves the problems of insufficient logical consistency of text generation, difficulty in guaranteeing the credibility of facts, and poor domain adaptability in the existing technology, and achieves high-quality, logically consistent and domain adaptable text generation.
Patent Information
- Application Number
- CN202411853029.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-18
AI Technical Summary
The existing natural language generation models have problems such as insufficient logical consistency, difficulty in guaranteeing fact credibility, and poor domain adaptability in high-demand text generation tasks.
The semantic understanding and generation model based on artificial intelligence is adopted, including input analysis module, generation module, verification module and optimization module. The input analysis module parses user input into a semantic logic diagram. The generation module generates text based on the semantic logic diagram. The verification module evaluates the logical consistency and fact credibility of the text through the logic verifier and fact verifier. The optimization module optimizes the generation of text through the dynamic weight adjustment mechanism.
It significantly improves the logical consistency and fact credibility of generated texts, enhances the domain adaptability and generation efficiency of the model, and is suitable for high-demand fields such as medicine and law.
Smart Images

Figure CN119849510A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and natural language technology, and specifically to a semantic understanding and generation model based on artificial intelligence. Background Art
[0002] With the rapid development of artificial intelligence technology, natural language processing models based on deep learning have made significant progress in the fields of text generation and semantic understanding. However, existing technologies still have certain limitations when facing demanding text generation tasks. Existing natural language generation models mainly rely on pre-trained language models. Although these models perform well in fluency and generation speed, the logical consistency and factual credibility of the generated text are difficult to guarantee. Especially in the fields of medicine, law, scientific research, etc., once logical deviations or factual errors occur in the generated text, serious consequences may occur.
[0003] On the other hand, traditional generative models usually lack the ability to deeply understand the semantics of user input. They only generate based on language features or shallow contextual relationships, and are unable to fully capture the semantic and logical structure of the input content. This deficiency makes it easy for the generated text to have semantic ambiguity or logical conflicts in complex scenarios. At the same time, the existing technologies have limited means of quality control for generated texts, and lack effective subsequent verification and optimization mechanisms. Although some technologies have introduced verification modules, the verification results are often only used as a passive assessment of the generation quality, and fail to form a closed loop with the generation process, making it impossible to dynamically adjust the generated content to improve the quality of the final text.
[0004] In addition, existing generative models generally lack effective integration with domain knowledge and can only rely on the model's training corpus for generation, making it difficult to adapt to the professional needs of specific fields. Especially in scenarios with high-complexity input or multimodal input, the ability of generative models is limited, and it is easy to lose information or generate inaccurate content. These problems make existing technologies inadequate in high-precision, domain-specific text generation tasks, and they are in urgent need of improvement. Summary of the invention
[0005] In view of the shortcomings of the existing technology, the present invention provides a semantic understanding and generation model based on artificial intelligence, which solves the problems of insufficient logical consistency of generated text, difficulty in ensuring factual credibility and poor domain adaptability in existing natural language generation technology.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a semantic understanding and generation model based on artificial intelligence, the model includes the following modules: Input parsing module, used to receive user input and parse it into logical structure; A generation module for generating preliminary text output based on the input logical structure; Validation modules, including logic validators and fact validators: Logical validators are used to evaluate the logical consistency between the generated text and the input; The fact verifier is used to verify whether the content of the generated text conforms to the external knowledge base; The optimization module is used to optimize the generated text based on the evaluation results of the logic validator and the fact validator.
[0007] Preferably, the input parsing module parses the user input into a semantic logic graph, which includes semantic nodes and semantic relationships. The semantic nodes represent subjects, predicates, and objects, and the semantic relationships represent modifications and causal relationships.
[0008] Preferably, the generating module comprises: A context processing unit, configured to receive the semantic logic graph generated by the input parsing module and generate a context embedding representation according to the semantic nodes and semantic relations of the semantic logic graph; A generation control unit, used to control the generation process according to a predetermined generation target based on the context embedding representation, including controlling the length, semantic coherence and generation style of the generated text; The output generation unit is used to decode the context embedding representation through the language generation model, generate a natural language text output that is logically related to the input, and pass the generated text to the verification module for evaluation.
[0009] Preferably, the logic verifier evaluates the logical consistency between the generated text and the input by comparing the semantic relationship in the input semantic logic graph and the generated text semantic logic graph.
[0010] Preferably, the logic consistency evaluation of the logic verifier comprises the following steps: Compare the semantic relationship set of the input semantic logic graph with the semantic relationship set of the generated text semantic logic graph; The ratio of the semantic relationship shared by the input and the generated text to the total semantic relationship of the input is calculated as the logical consistency score.
[0011] Preferably, the fact verifier verifies the credibility of the generated text by decomposing the generated text into multiple propositions and comparing each proposition with the corresponding fact in the external knowledge base.
[0012] Preferably, the credibility assessment step of the fact verifier includes: Decompose the generated text into several propositions; Retrieve relevant facts from external knowledge bases; Determine whether the propositions in the generated text are verified to be true in the knowledge base, and calculate the credibility score based on the ratio of the number of propositions verified to be true to the total number of generated propositions.
[0013] Preferably, the optimization module optimizes the generated text based on the logical consistency score and the credibility score, and the optimization goal is to achieve a balance between the logical consistency and the credibility of the generated text.
[0014] Preferably, the dynamic weight adjustment mechanism comprises the following steps: Calculate the complexity score of the input content based on the number of semantic nodes, the complexity of the semantic relationship, and the length of the text in the semantic logic graph generated by the input parsing module; Obtain the logic consistency score generated by the logic verifier and the credibility score generated by the fact verifier as the basis for weight adjustment; According to the relative changes of input complexity scores and verification results, the logic verification weight and fact verification weight are dynamically allocated, and the weight adjustment rules are as follows: When the input complexity is high or the logic consistency score is significantly lower than the credibility score, increase the logic verification weight; When the logical consistency score and credibility score are close, keep the weights balanced; When the credibility score is significantly lower than the logical consistency score, increase the fact verification weight; The adjusted weights are assigned to the optimization module, which recalculates the credibility objective function based on the updated weights to guide the optimization of the generated text.
[0015] Preferably, the dynamic weight adjustment mechanism automatically adjusts the weights of logic verification and fact verification according to the complexity of the input content and the verification result of the generated text, including the following steps: Generate an input complexity score based on the number of semantic nodes in the semantic logic graph, the complexity of semantic relations, and the length of the input text; Obtain the logical consistency score and credibility score of the generated text from the logic verifier and the fact verifier respectively; According to the difference between the input complexity score and the verification result, the weights of logic verification and fact verification are adjusted, where: When the input complexity is high, give priority to increasing the logic verification weight; When the logic consistency score is lower than the credibility score, increase the logic verification weight; When the credibility score is lower than the logical consistency score, the fact verification weight is increased.
[0016] The present invention provides a semantic understanding and generation model based on artificial intelligence. It has the following beneficial effects: 1. The present invention parses user input into a semantic logic graph through an input parsing module, and uses a logic validator to evaluate and optimize the logical consistency of the generated text, ensuring that the generated text strictly conforms to the semantic logical relationship of the input. The addition of a logic validator significantly improves the coherence of the generated content at the semantic level, avoids common semantic deviations or logical errors in traditional generation models, and thus enhances the reliability of the generated text.
[0017] 2. The present invention uses a fact verifier to perform knowledge matching and authenticity verification on the generated text, effectively avoiding the problem of false or inaccurate content in the generated text. By combining the domain knowledge base, the fact verifier can dynamically retrieve relevant facts and compare and evaluate the generated text to ensure the authenticity and credibility of the output text in different application fields, especially suitable for high-demand fields such as medicine and law.
[0018] 3. The optimization module in the present invention uses a dynamic weight adjustment mechanism to flexibly adjust the weight ratio of logic verification and fact verification according to the relative changes in input complexity and verification results, thereby achieving a balance between logical consistency and factual credibility. This mechanism is suitable for complex scenarios with different input contents, ensuring the optimal quality of generated text, while significantly improving the flexibility and applicability of the model.
[0019] 4. The present invention significantly reduces the need for manual participation through automated semantic parsing, text generation and verification optimization processes. In applications such as scientific research assistance, education, and intelligent customer service, the present invention can quickly generate high-quality text content, greatly improving generation efficiency, while saving the time and cost of manual proofreading and optimization, providing an efficient solution for high-frequency generation scenarios.
[0020] 5. The present invention can generate high-quality content for professional fields such as medicine, law, and education by combining the fine-tuning capabilities of the domain knowledge base and the generation module. For example, when generating diagnostic suggestions in the medical field, the optimization module can dynamically adjust the credibility of the generated text in combination with the results of the fact verifier, providing scientific and reliable auxiliary decision support for professional fields.
[0021] 6. The optimization module of the present invention forms a closed-loop process from text generation to verification and evaluation to dynamic optimization. By continuously iteratively optimizing the logical consistency and factual credibility of the generated text, the final output quality is significantly better than the traditional generation model. The design of the optimization closed loop ensures the reliability and practicality of the generated text, and provides high-quality solutions for various text generation tasks.
[0022] 7. The present invention can support the analysis and generation of multimodal input based on text, images or other modalities, and realize cross-modal information fusion. Through the joint action of the generation module and the optimization module, a natural language description containing multimodal information can be generated to meet the needs of scenes such as image description and video analysis, and expand the scope of application of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 Schematic diagram of the model architecture of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Please see attached Figure 1 The present invention provides a semantic understanding and generation model based on artificial intelligence, which can efficiently understand and generate text in user interaction and ensure logical consistency and factual accuracy. The following is a detailed description of each module of the model.
[0026] like Figure 1 As shown, the artificial intelligence-based semantic understanding and generation model may include an input parsing module, a generation module, a verification module, and an optimization module.
[0027] In this embodiment, the main function of the input parsing module is to convert the natural language text input by the user into a structured semantic logic graph. The semantic logic graph is used to represent the semantic elements of the input text and its internal logical relationships, and constitutes the basic input of the generation module. The design and implementation of the input parsing module are as follows: As an implementation method, the input parsing module includes a text parsing unit, a semantic extraction unit, a logical relationship generation unit and a structured output unit. Each unit has a clear functional division and works together to complete the input parsing.
[0028] In some embodiments, the text parsing unit first receives the natural language text input by the user and preprocesses it. The preprocessing steps include word segmentation, removal of stop words and punctuation marks, etc. Specifically, the unit performs grammatical analysis on the input text by using natural language processing (NLP) technology to generate a corresponding grammar tree to provide a basis for subsequent semantic parsing.
[0029] It should be noted that syntax analysis can adopt rule-based methods (such as context-free grammar parsing) or data-driven methods (such as syntax tree generation models based on deep learning). As an option, in the implementation based on deep learning, dependency syntax analysis technology can be used to parse the text and generate a dependency syntax tree.
[0030] For example, for the input text "The gravity of the sun makes the earth revolve around it", the text parsing unit can output the following dependency syntax tree: Dependency nodes: {"sun", "gravity", "earth", "rotation"} Dependencies: {("sun", modifier, "gravity"), ("gravity", causes, "rotation"), ("rotation", object, "earth")} In the semantic extraction unit, the core semantic elements in the text are extracted by semantically analyzing the syntax tree or dependency syntax tree. Specifically, the unit identifies basic semantic components such as subject, predicate, object, and modifiers, and converts them into structured semantic nodes. One possible implementation method is to use named entity recognition (NER) technology to identify noun phrases or specific entities (such as names of people, places, etc.) in the text, and use predicate extraction technology to identify actions or status words in the sentence.
[0031] In some embodiments, a bidirectional Transformer model (such as BERT) can be used to generate a contextual embedding representation of a sentence to more accurately capture semantic information.
[0032] It should be noted that the BERT model can effectively capture the dependencies between semantic elements in a sentence through its multi-head self-attention mechanism, thereby improving the accuracy of semantic extraction.
[0033] In the logical relationship generation unit, the semantic nodes generated by the semantic extraction unit generate semantic relationships through semantic rules or learning models, and further construct a semantic logic graph. The semantic logic graph is a graph structure composed of semantic nodes and semantic relationships, and its specific form is:
[0034] in, Represents a set of semantic nodes, Represents a set of semantic relationships. As an implementation method, semantic relationships may include modification relationships, causal relationships, parallel relationships, etc. For example, for the above example input text "the gravity of the sun makes the earth revolve around it", the generated semantic logic diagram is: Semantic node set: {"sun", "gravity", "earth", "rotation"} Semantic relationship set: {("sun", modification, "gravity"), ("gravity", causes, "rotation"), ("rotation", object of action, "earth")} It can be understood that the semantic logic graph not only captures the distribution of semantic components, but also reflects the logical associations between semantic components, providing contextual information for the generation module.
[0035] In the structured output unit, the generated semantic logic graph is converted into a standardized format and passed to the generation module. It should be noted that the output format can be adjusted according to the specific generation model. For example, if the generation module is based on the Transformer architecture, the semantic logic graph can be converted into a serialized input form.
[0036] In this embodiment, the input parsing module can further support cross-language input processing. Specifically, a multi-language pre-trained model (such as mBERT or XLM-R) can be used to uniformly parse inputs in different languages, thereby expanding the scope of application of the system.
[0037] In a possible extension, the input parsing module can also combine with the domain knowledge base for semantic enhancement parsing. Specifically, the domain knowledge base can be called in the semantic extraction unit to verify whether the extracted semantic nodes exist in the knowledge base, and possible semantic relationships can be supplemented based on the domain knowledge. For example, in the medical field, when the input "high blood pressure patients should avoid high-salt diet" is used, the semantic logic graph can be enhanced to: Semantic node set: {"hypertensive patients", "high salt diet", "avoid"} Semantic relation set: {(“hypertensive patients”, restriction, “high-salt diet”), (“avoid”, behavior, “high-salt diet”)} It should be noted that the introduction of domain knowledge base can improve the accuracy and completeness of semantic parsing, especially in application scenarios in professional fields.
[0038] It can be understood that the input parsing module described in the embodiments of the present invention not only supports general semantic parsing, but also can achieve higher accuracy and applicability by introducing context modeling, multi-language support and domain knowledge enhancement.
[0039] In this embodiment, the main function of the generation module is to generate a preliminary text output that conforms to the semantic logic based on the semantic logic diagram provided by the input parsing module. The module includes a context processing unit, a generation control unit and an output generation unit, and each unit jointly implements the text generation task.
[0040] As an implementation method, the context processing unit receives the semantic logic graph and converts it into a context embedding representation as the core input of the generation process. Specifically, the semantic nodes and semantic relations in the semantic logic graph are encoded through a context embedding model (such as an encoder based on the Transformer architecture) to generate a high-dimensional vector representation.
[0041] It should be noted that the generation of contextual embedding representation depends on the structural information of the semantic logic graph. The context processing unit captures the dependencies between semantic nodes and semantic relations through a multi-head self-attention mechanism, thereby effectively preserving the overall structure of the semantic logic graph.
[0042] It can be understood that this embedded representation provides semantic structure and contextual information for the subsequent generation process.
[0043] In the generation control unit, based on the context embedding representation, the generation process targets are controlled to ensure that the generated text meets expectations. Specifically, the generation targets include factors such as text length, semantic coherence, and generation style.
[0044] In some embodiments, the text length can be controlled by setting an upper limit on the number of steps to avoid generating too long or too short text. As an option, the generation control unit can dynamically adjust the upper limit of the number of steps to determine a reasonable generation length based on the input complexity or the number of nodes in the semantic logic graph.
[0045] Specifically, semantic coherence is achieved through the autoregressive mechanism of the generative model. The generation control unit generates text word by word, and each word generated at each step is based on the context embedding representation and refers to the previously generated words to ensure the logical consistency of the context. The generation probability can be expressed as:
[0046] in, Indicates the generated text. is the context embedding representation, Indicates the generated It should be noted that the autoregressive mechanism refers to the context embedding representation in each step of the generation process to ensure the logical coherence of the generated text.
[0047] For example, in terms of generation style control, the generation control unit can fine-tune the parameters of the pre-trained model to make the generated text conform to a specific style. For example, by fine-tuning the generation model on a legal field corpus, the generated text will be more in line with the expression habits and tone of the legal field.
[0048] The function of the output generation unit is to decode the context embedding representation into natural language text output. As a possible implementation method, the output generation unit uses a pre-trained language generation model (such as the GPT architecture) as a core component to generate semantically consistent text by gradually decoding the context embedding representation.
[0049] It should be noted that the output generation unit can also perform preliminary quality checks on the generated text. For example, the grammatical correctness and sentence fluency of the generated text can be evaluated to ensure that the output text meets basic language standards. This step is usually achieved through the internal scoring mechanism of the language model.
[0050] In some embodiments, the generation module may also support multimodal input. For example, when the semantic logic graph provided by the input parsing module contains multimodal information such as images and audio, the generation module may simultaneously process inputs of different modalities through a multimodal embedding model and generate natural language text that combines multimodal information.
[0051] Specifically, the multimodal embedding representation generates a unified embedding representation by fusing the feature vectors of text, image or audio. For example, when the input is "describe the relationship between the sun and the earth in an image", the generation module can receive the visual features extracted from the image and generate a descriptive text output in combination with the semantic logic graph.
[0052] It is understandable that the generation module of the present invention can achieve efficient conversion from structured semantic logic diagram to natural language text, and has a high degree of adaptability. On the basis of supporting multimodal input, the generation module can also meet the generation needs of different fields and scenarios through fine control of the generation target.
[0053] In one possible extension, the generation module can be combined with an external knowledge base to enhance the generation capability. Specifically, the generation control unit can dynamically call the knowledge base interface during the generation process to supplement the context embedding representation. For example, in the medical field, when generating "health advice for patients with hypertension", the generation module can dynamically query the medical knowledge base to generate a more scientific and professional advice text.
[0054] It should be noted that the design of the generation module ensures its reliability in logical consistency and semantic coherence, and at the same time has wide field applicability and expansibility.
[0055] In this embodiment, the core function of the verification module is to evaluate the preliminary text output by the generation module to ensure the accuracy of the generated text in terms of logical consistency and factual credibility. The verification module includes a logic verifier and a fact verifier, which respectively evaluate the generated text from the perspectives of semantic logic and fact matching, and generate corresponding scoring results for the optimization module to further adjust the generated content.
[0056] As an implementation method, the function of the logic validator is to verify the logical consistency between the generated text and the input semantic logic graph. Specifically, the logic validator parses the generated text into a semantic logic graph and compares it with the input semantic logic graph to evaluate the degree of overlap between the two in terms of semantic nodes and semantic relationships.
[0057] It should be noted that the semantic logic graph parsing process of the generated text is similar to the parsing process in the input parsing module, which mainly includes three steps: syntax analysis, semantic extraction, and logical relationship generation. After parsing, the logic validator calculates the logical consistency score through the following formula:
[0058] in, Represents the input semantic logic graph, Represents the semantic logic graph of the generated text, and Respectively represent the semantic relationship sets between the two. represents the number of semantic relations shared by the two. is the total number of semantic relations in the input semantic logic graph. It can be understood that the logical consistency score reflects the degree of matching of the generated text in semantic logic, and the closer the value is to 1, the higher the consistency.
[0059] For example, for the input text "the gravity of the sun makes the earth revolve around it", the input semantic logic graph is: Semantic nodes: {"sun", "gravity", "earth", "rotation"}; Semantic relationship: {("sun", modification, "gravity"), ("gravity", causes, "rotation"), ("rotation", object of action, "earth")}.
[0060] If the generated text is "The gravity of the sun causes the earth to revolve around the sun", the generated logic diagram is: Semantic nodes: {"sun", "gravity", "earth", "revolution"}; Semantic relationship: {("sun", effect, "gravity"), ("gravity", causes, "revolution"), ("revolution", object, "earth")}.
[0061] The logic validator calculates the logical consistency score as 2 / 3 by comparing the semantic relationship sets of the two.
[0062] In the fact verifier, its function is to verify whether the generated text conforms to the facts in the external knowledge base. Specifically, the fact verifier decomposes the generated text into several propositions and verifies the authenticity of each proposition one by one by querying the knowledge base.
[0063] In one possible implementation, the fact verifier breaks down the generated text into a set of core propositions: , each proposition Represents an independent semantic unit in the generated text. The fact verifier uses the knowledge base Search and confirm Does it exist in the knowledge base? If the proposition is verified as true by the knowledge base, then ,otherwise Based on this, the fact verifier calculates a credibility score:
[0064] in, is the total number of propositions, The credibility score reflects the authenticity ratio of the generated text.
[0065] For example, if the generated text is "The gravitational force of the sun maintains the stability of the earth's orbit", the fact verifier decomposes the generated text into the following propositions: : "The sun has gravity"; : "Gravity maintains the Earth's orbit"; : "Earth orbit is stable".
[0066] By searching the knowledge base, if and For truth, If it is not verified, the credibility score is 2 / 3.
[0067] As an option, the fact verifier can extend the knowledge base content according to the needs of specific fields. For example, in the medical field, the fact verifier can integrate the medical literature library and clinical guideline database to verify the scientificity and professionalism of medical generated texts.
[0068] It should be noted that the logic verifier and fact verifier can output logical consistency scores based on the verification results. and credibility score These scoring results will serve as the basis for the optimization module to adjust the generated text.
[0069] In some embodiments, the verification module also supports dynamic adjustment of verification strategies. For example, when the input complexity is high, the logic verifier can be called first to ensure the consistency of semantic logic; and in the fact verifier, the knowledge base of a specific field can be dynamically selected to improve the pertinence and efficiency of verification.
[0070] It can be understood that the verification module in this embodiment evaluates the generated text from two levels: semantic logic and fact matching, through the collaborative work of the logic verifier and the fact verifier, to ensure the logic and authenticity of the generated content, while having flexible adaptability and domain scalability.
[0071] In this embodiment, the core function of the optimization module is to optimize and adjust the preliminary text generated by the generation module based on the evaluation results of the logic verifier and the fact verifier to ensure that the final output text achieves a balance between logical consistency and factual credibility. The optimization module adopts a dynamic weight adjustment mechanism to guide the iterative optimization of the generated text by calculating the credibility objective function.
[0072] Specifically, the optimization module receives the logic consistency score output by the logic verifier and the credibility score output by the fact verifier These scores reflect the performance indicators of the generated text in terms of semantic logical consistency and fact matching accuracy. The optimization module comprehensively considers the results of logical verification and fact verification through the following objective function:
[0073] in, represents the optimization objective function value, and is the weight parameter for logic verification and fact verification, satisfying .
[0074] It should be noted that the dynamic weight adjustment mechanism calculates the input complexity score and the difference in verification results in real time. and Dynamic allocation to adapt to different input and generation scenarios.
[0075] As an implementation method, the input complexity score can be calculated based on the structural characteristics of the semantic logic graph generated by the input parsing module. For example, the input complexity can be calculated by the number of semantic nodes. , the complexity of semantic relations and input text length The weighted combination of is represented by:
[0076] in, , and is a weight parameter used to balance the impact of each feature on input complexity. It can be understood that the higher the input complexity score, the more complex the input content is, and the higher the logical consistency required for the generated text.
[0077] In some embodiments, when the input complexity is high, the optimization module prioritizes increasing the weight of logic verification. , to ensure that the logical consistency of the generated text is not affected by the complexity of the input. For example, when the logical consistency score Significantly lower than the credibility score When Increase, giving priority to optimizing logical consistency.
[0078] On the other hand, when the credibility score Significantly lower than the logical consistency score When the optimization module increases the weight of fact verification , to improve the factual credibility of the generated text. For example, in medical applications, the generated diagnostic suggestions need to match the medical knowledge base with high confidence. The value will be increased appropriately.
[0079] The optimization module iteratively adjusts the text output of the generation module to optimize the objective function Converge to the global optimum. Specifically, the generation module regenerates the text output according to the adjusted weights in each round of optimization, and the optimization module updates the weights according to the new verification results until the objective function is no longer significantly improved.
[0080] It should be noted that the optimization module also supports the customization of weight adjustment rules in specific field applications. For example, in the legal field, the weight of logical verification can be set. Higher priority, and in the news generation scenario, the weight of fact verification can be given priority .
[0081] In a possible extension, the optimization module can also perform joint optimization in combination with the multimodal input characteristics of the generation module. For example, when the generation module receives multimodal input of text and images, the optimization module can set weights for the verification results of each modality separately and achieve overall optimization through a multimodal fusion mechanism.
[0082] For example, when the input is "describing the positional relationship of objects in a picture", the optimization module can set weights for the credibility of logical consistency and image semantic matching respectively to generate a natural language description that is more consistent with semantic logic.
[0083] It can be understood that the optimization module in this embodiment flexibly adapts to the changes in different input complexities and verification results through a dynamic weight adjustment mechanism, ensuring a balance between logical consistency and factual credibility in the final generated text.
[0084] In general, the present invention parses user input into a semantic logic graph through an input parsing module, generates a preliminary text according to the semantic logic graph, and uses a logic verifier and a fact verifier to evaluate the logical consistency and factual credibility of the generated text. The text is dynamically optimized and adjusted through an optimization module. The optimization module dynamically allocates the weights of logic verification and factual verification based on the dynamic weight adjustment mechanism according to the input complexity and the verification results, so as to achieve a balance between the logic and credibility of the generated text.
[0085] The present invention ensures that the generated text conforms to the input semantic logic and has high factual accuracy through the collaborative work between modules. It is suitable for fields such as medicine, law, and education that require high-credibility generation, and has broad practical value and scalability.
[0086] The following provides application examples of the present invention.
[0087] Application in the medical field The present invention can be used in the medical field to generate diagnostic recommendations or treatment plans.
[0088] As an application, the input parsing module can parse the patient description entered by the doctor, such as "the patient is a 50-year-old male with long-term high blood pressure and mild headache", and generate the corresponding semantic logic graph, including the semantic nodes "50-year-old male", "hypertension", "headache" and their causal relationships. The generation module generates preliminary diagnostic suggestions based on the semantic logic graph and the pre-trained medical generation model, such as "it is recommended to check the patient's cardiovascular health status and avoid consuming high-salt foods."
[0089] The verification module verifies the credibility of the generated text through a medical knowledge base (such as clinical guidelines or literature database), for example, verifying the scientificity of "patients with hypertension should avoid high-salt diet". The optimization module adjusts the text output according to the logical consistency score and credibility score, and finally generates a complete medical advice: "For a 50-year-old male patient with long-term hypertension, 24-hour dynamic blood pressure monitoring and sodium restriction are recommended." It can be understood that the present invention can generate scientific and reliable diagnosis or treatment recommendations based on patient descriptions in medical scenarios, effectively assisting doctors in making decisions.
[0090] Application in the legal field The present invention can be applied to generate legal opinions or interpret legal provisions.
[0091] In one possible application, the input parsing module receives legal questions input by users, such as "What are the consequences of a company's failure to fulfill contract terms?", parses them into a semantic logic graph, and extracts the core semantic elements "company," "failure to fulfill contract terms," and "legal consequences." The generation module generates preliminary legal advice based on the semantic logic graph and combined with legal knowledge, such as "violation of contract terms may result in liability for compensation."
[0092] The verification module uses a legal knowledge base (such as a contract law database) to verify the accuracy of the generated text, for example, to verify whether the legal logic between "failure to perform contract terms" and "liability for compensation" is established. The optimization module adjusts the output content based on the results of logic verification and fact verification, and finally generates a complete legal opinion: "According to the provisions of the Contract Law, the company's failure to perform contract terms may result in liability for compensation, contract termination or a request for compulsory performance." It should be noted that the present invention can be applied in a legal consulting system to provide users with professional legal advice.
[0093] Application in education The present invention can be used in the field of education to generate learning materials or personalized exercises.
[0094] As an implementation method, the input parsing module parses the teaching objectives input by the teacher, such as "providing exercises on Newton's three laws for junior high school students", generates a semantic logic graph, and extracts the core semantic nodes "junior high school students", "Newton's three laws", and "exercises". The generation module generates preliminary exercises based on the semantic logic graph, such as "please explain the content of Newton's first law and give examples." The verification module verifies the accuracy of the knowledge points of the generated exercises through educational knowledge bases (such as textbooks or authoritative learning platforms) and checks whether the generated text meets the teaching objectives. The optimization module adjusts the generated content according to the scores of logical consistency and credibility, and finally outputs exercises with moderate difficulty and clear knowledge points: "Try to explain the meaning of Newton's first law, and use the example of a stationary object remaining stationary without an external force." It can be understood that the present invention can be widely applied to education systems to provide students with automatically generated high-quality learning resources.
[0095] Scientific research assistance The present invention can be used in scientific research to generate technical reports or summaries of experimental results.
[0096] In one possible application, the input parsing module receives input from researchers, such as "summarize the latest progress in artificial intelligence technology", parses it into a semantic logic graph, and extracts key semantic nodes "artificial intelligence", "technological progress", and "summary". The generation module generates a preliminary summary based on the semantic logic graph and the pre-trained scientific literature model, such as "in recent years, Transformer-based pre-trained models have made breakthroughs in the field of natural language processing."
[0097] The verification module verifies the scientific nature of the generated content through scientific literature databases (such as ArXiv or PubMed), for example, verifying whether "the application of Transformer model in natural language processing" has literature support. The optimization module adjusts the text according to the verification results and finally generates a professional technical report: "In recent years, pre-trained models based on Transformer architecture (such as BERT, GPT) have made significant breakthroughs in the field of natural language processing, especially in question answering, text generation and translation tasks." It should be noted that the present invention can quickly generate high-quality technical summaries and literature reviews in assisting scientific research, thereby improving research efficiency.
[0098] Intelligent customer service field The present invention can generate accurate answers in an intelligent customer service system and improve user experience.
[0099] For example, in one implementation, the input parsing module receives a user question, such as "How to apply for a credit card", parses it into a semantic logic graph, and extracts key nodes "application", "credit card", and "process". The generation module generates a preliminary answer based on the parsing result, such as "You can apply for a credit card online through the bank's official website."
[0100] The verification module verifies the accuracy of the generated answers in conjunction with the bank's business knowledge base, for example, verifying whether the process of "applying for a credit card online" is consistent with bank policies. The optimization module further adjusts the generated answers and outputs a complete and accurate result: "You can apply for a credit card through the bank's official website. You need to submit personal information, proof of income, and wait for the approval result." It can be understood that the application of the present invention in intelligent customer service can improve the accuracy and personalization of answers and enhance the quality of customer service.
[0101] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A semantic understanding and generation model based on artificial intelligence, characterized by: The model includes the following modules: Input parsing module, used to receive user input and parse it into logical structure; A generation module for generating preliminary text output based on the input logical structure; Validation modules, including logic validators and fact validators: Logical validators are used to evaluate the logical consistency between the generated text and the input; The fact verifier is used to verify whether the content of the generated text conforms to the external knowledge base; The optimization module is used to optimize the generated text based on the evaluation results of the logic validator and the fact validator.
2. The semantic understanding and generation model based on artificial intelligence according to claim 1, characterized in that: The input parsing module parses the user input into a semantic logic graph, which includes semantic nodes and semantic relationships. The semantic nodes represent subjects, predicates, and objects, and the semantic relationships represent modifications and causal relationships.
3. The semantic understanding and generation model based on artificial intelligence according to claim 1, characterized in that: The generation module comprises: A context processing unit, configured to receive the semantic logic graph generated by the input parsing module and generate a context embedding representation according to the semantic nodes and semantic relations of the semantic logic graph; A generation control unit, used to control the generation process according to a predetermined generation target based on the context embedding representation, including controlling the length, semantic coherence and generation style of the generated text; The output generation unit is used to decode the context embedding representation through the language generation model, generate a natural language text output that is logically related to the input, and pass the generated text to the verification module for evaluation.
4. The semantic understanding and generation model based on artificial intelligence according to claim 1, characterized in that: The logic verifier evaluates the logical consistency between the generated text and the input by comparing the semantic relationship in the input semantic logic graph and the generated text semantic logic graph.
5. The semantic understanding and generation model based on artificial intelligence according to claim 4 is characterized in that: The logic consistency evaluation of the logic verifier includes the following steps: Compare the semantic relationship set of the input semantic logic graph with the semantic relationship set of the generated text semantic logic graph; The ratio of the semantic relationship shared by the input and the generated text to the total semantic relationship of the input is calculated as the logical consistency score.
6. The semantic understanding and generation model based on artificial intelligence according to claim 1, characterized in that: The fact verifier verifies the credibility of the generated text by decomposing the generated text into multiple propositions and comparing each proposition with the corresponding fact in the external knowledge base.
7. The semantic understanding and generation model based on artificial intelligence according to claim 1, characterized in that: The credibility evaluation step of the fact verifier includes: Decompose the generated text into several propositions; Retrieve relevant facts from external knowledge bases; Determine whether the propositions in the generated text are verified to be true in the knowledge base, and calculate the credibility score based on the ratio of the number of propositions verified to be true to the total number of generated propositions.
8. The artificial intelligence-based semantic understanding and generation model according to claim 1, characterized in that: The optimization module optimizes the generated text based on the logical consistency score and the credibility score, and the optimization goal is to achieve a balance between the logical consistency and the credibility of the generated text.
9. The semantic understanding and generation model based on artificial intelligence according to claim 8, characterized in that: The dynamic weight adjustment mechanism includes the following steps: Calculate the complexity score of the input content based on the number of semantic nodes, the complexity of the semantic relationship, and the length of the text in the semantic logic graph generated by the input parsing module; Obtain the logic consistency score generated by the logic verifier and the credibility score generated by the fact verifier as the basis for weight adjustment; According to the relative changes of input complexity scores and verification results, the logic verification weight and fact verification weight are dynamically allocated, and the weight adjustment rules are as follows: When the input complexity is high or the logic consistency score is significantly lower than the credibility score, increase the logic verification weight; When the logical consistency score and credibility score are close, keep the weights balanced; When the credibility score is significantly lower than the logical consistency score, increase the fact verification weight; The adjusted weights are assigned to the optimization module, which recalculates the credibility objective function based on the updated weights to guide the optimization of the generated text.
10. The semantic understanding and generation model based on artificial intelligence according to claim 9, characterized in that: The dynamic weight adjustment mechanism automatically adjusts the weights of logic verification and fact verification according to the complexity of the input content and the verification result of the generated text, including the following steps: Generate an input complexity score based on the number of semantic nodes in the semantic logic graph, the complexity of semantic relations, and the length of the input text; Obtain the logical consistency score and credibility score of the generated text from the logic verifier and the fact verifier respectively; According to the difference between the input complexity score and the verification result, the weights of logic verification and fact verification are adjusted, where: When the input complexity is high, give priority to increasing the logic verification weight; When the logic consistency score is lower than the credibility score, increase the logic verification weight; When the credibility score is lower than the logical consistency score, the fact verification weight is increased.
Citation Information
Patent Citations
Multi-layer semantic understanding large model agent construction and application method
CN119089931A
Semantic understanding and question and answer matching method and system
CN119128077A
Cited By
Large language model credibility alignment method for financial risk control
CN121120247A
A large language model credibility alignment method for financial risk control
CN121120247B
Highway engineering geological survey intelligent identification method and system
CN121167525A
Entity recognition method of scientific and technological achievement declaration class and knowledge graph construction method and device thereof
CN122334249A
Entity recognition method for science and technology achievement declaration and knowledge graph construction method and device thereof
CN122334249B