Natural semantic recognition method, system and equipment based on large model

By employing a natural language recognition method based on prompting reasoning, and utilizing a large language model for semantic role labeling, the reliance on manually labeled data in existing technologies is resolved. This achieves efficient and low-cost semantic recognition, improving the accuracy of the recognition results and the system's intelligence level.

CN121328545APending Publication Date: 2026-01-13CHINA STATE RAILWAY GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511230052.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing natural language recognition methods rely on a large amount of manually labeled data, which is costly and lacks adaptability and generalization ability in open domains, failing to fully utilize the semantic understanding potential of large language models under zero-sample or few-sample conditions.

Method used

We adopt a natural language recognition method based on prompt-based reasoning mechanism. We use a large language model to construct context prompts and combine them with fuzzy matching algorithm to perform semantic role labeling, reducing the dependence on manually labeled data. We use templates and semantic framework library to perform semantic role recognition.

Benefits of technology

It significantly reduces development and deployment costs, improves the accuracy and stability of recognition results, supports structured semantic information output, is suitable for downstream tasks such as question answering systems and information extraction, and enhances the system's intelligence and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121328545A_ABST
    Figure CN121328545A_ABST
Patent Text Reader

Abstract

The invention discloses a natural semantic recognition method based on a large model. The method comprises the following steps: constructing a context cue P1 according to a to-be-recognized natural language sentence and a predicate and a first template; inputting the context cue P1 into the large language model to obtain a semantic item; extracting a core semantic role of the semantic item and a description thereof from the semantic framework library; combining the core semantic role and the description thereof with all fixed non-core semantic roles and role descriptions corresponding to the semantic framework library to obtain all possible semantic roles and descriptions thereof; constructing a context prompt P2 according to all possible semantic roles and descriptions thereof and a second template; inputting the context cue P2 into a large language model to obtain a structured annotation result; and according to the natural language sentence to be recognized and the predicate, post-processing and correcting the structured labeling result to obtain a corrected recognition result. According to the natural semantic recognition method, large-scale manual data annotation is not needed, the development and deployment cost is remarkably reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large language models, and specifically to a natural language recognition method, system, and device based on large models. Background Technology

[0002] With the rapid development of large language models, such as the GPT series and LLaMA series, large-scale pre-trained models have shown outstanding performance in various natural language processing tasks. These large-scale pre-trained models benefit from the training of large language models on ultra-large-scale corpora and have excellent language generation, reasoning and understanding capabilities, becoming an important driving force for the innovation of natural language processing technology.

[0003] Natural language processing (NLP) semantic recognition, a core task in natural language processing, focuses on extracting structured semantic information from natural language text, such as predicate-argument structures and role assignments. NLP not only enables a better understanding of the deep logical relationships within sentences but also significantly improves the performance of downstream tasks, including question-answering systems, dialogue systems, information extraction, machine translation, and automated reasoning. Furthermore, NLP accurately extracts structured semantics, which is crucial for improving the interpretability of large language models, reducing bias, and optimizing human-machine collaboration efficiency. Existing NLP methods (MRC-SRL) largely rely on large amounts of high-quality, meticulously annotated datasets, such as CoNLL 2005 and CoNLL 2012. The CoNLL 2005 dataset includes three sets of data: English training, validation, and test sets (WSJ, Brown, and Brown), with data sizes of 39,832, 1,346, 2,416, and 426 respectively. It utilizes PropBank as its semantic framework library. For more information on PropBank, see the paper: Carreras, Xavier, and Lluís Màrquez. "Introduction to the CoNLL-2005 shared task: Semantic role labeling." Proceedings of the ninth conference on computational natural language learning (CoNLL-2005). The CoNLL 2012 dataset also includes three sets of data: English training, validation, and test sets, with data sizes of 164,759, 21,040, and 20,782 respectively. It utilizes FrameNet as its semantic framework library. For more information on FrameNet, see the paper: Pradhan, Sameer, et al. "CoNLL-2012 shared task: Modeling multilingual unrestricted coreference in..." OntoNotes."Joint conference on EMNLP and CoNLL-shared task.2012.

[0004] Existing natural language recognition methods typically train models through supervised learning, requiring significant human resources, time, and expertise, and are limited by the coverage and quality consistency of annotation systems. Particularly in open-domain natural language scenarios, the adaptability and generalization capabilities of traditional methods are severely challenged due to the diversity, complexity, and uncertainty of language expression. While some recent research has explored weakly supervised, semi-supervised, or transfer learning approaches to alleviate data dependence, these methods often still require a certain scale of external resources or intermediate annotations, failing to completely eliminate reliance on manually labeled data. Furthermore, when utilizing large language models for natural language recognition, existing technologies mostly focus on fine-tuning or task-specific adaptation, failing to fully explore and utilize the potential of large language models for direct structured semantic understanding under zero-sample or few-sample conditions.

[0005] Therefore, there is an urgent need for a natural language recognition technology that can reduce or even eliminate the reliance on large-scale manually labeled data, fully stimulate the inherent semantic understanding ability of large language models, and adapt to the diversity and complexity of open-domain natural languages. Summary of the Invention

[0006] To address the shortcomings of existing technologies, one objective of this invention is to provide an efficient, low-cost, and easily deployable natural language recognition method based on a large model. This method utilizes a prompting reasoning mechanism to guide a large language model to perform semantic role labeling tasks, effectively improving the automation level of natural language understanding.

[0007] Another object of the present invention is to provide a system for implementing natural language recognition methods.

[0008] Another object of the present invention is to provide an apparatus for implementing a natural language recognition method.

[0009] Therefore, the present invention adopts the following technical solution:

[0010] A natural language recognition method based on a large model includes:

[0011] S1, construct contextual prompt P1 according to the first template based on the natural language sentence and predicate to be identified;

[0012] S2, input the context prompt P1 into the large language model to obtain the semantic meaning of the predicate;

[0013] S3, extract the core semantic roles and their descriptions of the semantic senses from the semantic framework library;

[0014] S4, merge the core semantic roles and their descriptions obtained in S3 with all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library to obtain all possible semantic roles and their descriptions corresponding to the predicate;

[0015] S5. Based on all possible semantic roles and their descriptions obtained in S4, the natural language sentence to be identified and the predicate, construct the contextual cue P2 according to the second template;

[0016] S6, the context prompt P2 is input into the large language model, the large language model annotates the semantic roles related to the predicate and their corresponding phrase fragments in the natural language sentence to be identified, and outputs the structured annotation result; the structured annotation result includes multiple sets of semantic roles and arguments, each set is represented as: "semantic role":"argument";

[0017] S7. Based on the natural language sentence and predicate to be identified, a fuzzy matching algorithm is used to post-process and correct each argument in the structured annotation result obtained in S6, so as to obtain the corrected recognition result.

[0018] The first template in step S1 above is:

[0019] "Give a sentence: "Natural language sentence to be identified"; Question: What is the sense of predicate in the given sentence above? A: predicate, intransitive; B: predicate, basictransitive; Please give the best option as the answer. Answer: "

[0020] The semantic meaning of the predicate mentioned in step S2 above is: "A: predicate, intransitive" or "B: predicate, basictransitive".

[0021] The second template in step S5 above is:

[0022] “Give a sentence: "Natural Language Sentence to be Identified", a predicate: "Predicate", all possible argument roles and their descriptions: all possible semantic roles corresponding to the predicate and their descriptions, please label the arguments about the predicate "Predicate" of the sentence. Provide the answer in JSON format as follows: {"Predicate": {role:argument}}.

[0023] A system for implementing the above-described natural language recognition method includes: a first prompt generation module, a first model inference module, an extraction module, a merging module, a second prompt generation module, a second model inference module, and a matching optimization module, which are connected in sequence.

[0024] The first prompt generation module takes the natural language sentence and predicate to be identified as input and outputs the context prompt P1. The first model inference module takes the context prompt P1 as input and outputs the semantic sense. The extraction module takes the semantic sense and semantic framework library as input and outputs the core semantic roles and their descriptions. The merging module takes the core semantic roles and their descriptions and all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library as input and outputs all possible semantic roles and their corresponding descriptions. The second prompt generation module takes all possible semantic roles and their corresponding descriptions as input and outputs the context prompt P2. The second model inference module takes the context prompt P2 as input and outputs the structured annotation result. The matching optimization module takes the structured annotation result, the natural language sentence and predicate to be identified as input, and outputs the corrected recognition result. The matching optimization module is used to correct minor deviations in the structured annotation result based on the natural language sentence and predicate to be identified.

[0025] In the above system, the first model reasoning module uses a large language model to obtain predicate meanings, and the second model reasoning module uses a large language model to obtain structured annotation results. The large language model is a pre-trained large language model GPT-4o that supports natural language reasoning.

[0026] An apparatus for implementing the above-described natural language recognition method includes: a processor and a memory, wherein the memory stores one or more programs for implementing the natural language recognition method, and the processor executes the one or more programs to implement the steps of the natural language recognition method.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] 1. The natural language recognition method of the present invention does not require large-scale manually labeled data, significantly reducing development and deployment costs: The method adopts a prompt-based reasoning strategy and combines a pre-trained large language model to complete the semantic recognition task, avoiding the dependence of traditional semantic role labeling methods on large-scale manually labeled corpora, significantly reducing the resource consumption of data preparation and model training, and improving system development efficiency.

[0029] 2. The system modular design of the natural language recognition method of this invention is clear and the system has strong versatility: the system has a clear division of functions and a tight connection of processes. Each module can be replaced or extended independently, and it has good portability and scalability.

[0030] 3. The natural language recognition method of the present invention supports structured semantic information output and improves the intelligence level of downstream applications: The method can map natural language text into structured semantic tags, with standardized output format and clear structure, which is suitable for downstream tasks such as question answering systems, information extraction, and human-computer dialogue. It enhances the interpretability and operability of semantic information and helps to improve the accuracy and reliability of the overall intelligent system.

[0031] 4. The natural language recognition method of the present invention has fault tolerance capabilities, improving the accuracy and stability of recognition results: In response to the subtle errors that may exist in the reasoning process of large models, such as blurred boundaries, spelling differences, and labeling granularity deviations, this method introduces a matching optimization mechanism and uses a fuzzy matching algorithm to correct the recognition results, further improving the robustness and practicality of the system.

[0032] 5. The device for implementing the natural language recognition method of the present invention is flexible and can be adapted to local deployment or cloud services: the device can be deployed on a local terminal or cloud platform, supports efficient semantic processing tasks in edge computing environments, and meets the resource constraints and performance requirements of different application scenarios. Attached Figure Description

[0033] Figure 1 This is a flowchart of the natural language recognition method based on a large model in Example 1;

[0034] Figure 2 This is a schematic diagram of the system structure in Example 2. Detailed Implementation

[0035] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0036] Example 1

[0037] like Figure 1 As shown, a natural language recognition method based on a large model includes the following steps:

[0038] S1, Obtain context prompt P1: The first prompt generation module constructs context prompt P1 according to the first template based on the natural language sentence and predicate to be identified.

[0039] The first template is:

[0040] "Give a sentence: "Natural language sentence to be identified"; Question: What is the sense of predicate in the given sentence above? A: predicate, intransitive; B: predicate, basictransitive; Please give the best option as the answer. Answer: "

[0041] In this embodiment, the natural language sentence to be identified is: "Brokerage firms as a ruledon't comment on their market activity," with the predicate "comment." The contextual prompt P1 is: "Give asentence: 'Brokerage firms as a ruledon't comment on their market activity.' Question: What is the sense of predicate 'comment' in the given sentence above? A: comment, intransitive; B: comment, basic transitive; Please give the best option as the answer. Answer:"

[0042] S2, Obtain the semantic meaning of the predicate: The first model reasoning module inputs the context prompt P1 into the large language model to obtain the semantic meaning of the predicate. Among them, the semantic meaning of the predicate is: "A: predicate, intransitive" or "B: predicate, basic transitive".

[0043] In this embodiment, the semantic meaning of the predicate is: "A: comment, intransitive".

[0044] S3, Obtain the core semantic roles and their descriptions: The extraction module extracts the core semantic roles and their descriptions of semantic senses from the semantic framework library.

[0045] In this embodiment, the semantic framework library adopts the PropBank framework library, and the core semantic roles and their descriptions are: "{"A0":"commentor","A1":"thing commented on"}.

[0046] S4, Obtain all possible semantic roles and their descriptions for the predicate: The merging module merges the core semantic roles and their descriptions obtained in S3 with all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library to obtain all possible semantic roles and their descriptions for the predicate.

[0047] In this embodiment, all non-core semantic roles and their descriptions are fixed as: "{"MNR":"manner","TMP":"temporal",...}", and all possible semantic roles corresponding to the predicate "comment" and their descriptions are: "{"A0":"commentor","A1":"thing commented on","MNR":"manner","TMP":"temporal",...}".

[0048] S5, Obtain context prompt P2: The second prompt generation module constructs context prompt P2 according to the second template based on all possible semantic roles and their descriptions corresponding to the predicate obtained in S4, the natural language sentence to be identified, and the predicate.

[0049] The second template is:

[0050] “Give a sentence: "Natural Language Sentence to be Identified", a predicate: "Predicate", all possible argument roles and their descriptions: all possible semantic roles corresponding to the predicate and their descriptions, please label the arguments about the predicate "Predicate" of the sentence. Provide the answer in JSON format as follows: {"Predicate": {role:argument}}.

[0051] In this embodiment, the context prompt P2 is: "Give a sentence:"Brokerage firms as aruledon'tcomment on their market activity",a predicate:"comment",all possible argument roles and their descriptions:{"A0":"commentor","A1":"thing commented on","MNR":"manner","TMP":"temporal",...},please label the arguments aboutpredicate "comment" of the sentence. Provide the answer in JSON format asfollows:{"comment":{role:argument}}.".

[0052] S6, Obtain structured annotation results: The second model inference module inputs the contextual prompt P2 into the large language model. The large language model annotates the semantic roles related to the predicate and their corresponding phrase fragments in the natural language sentence to be identified, and outputs the structured annotation results in JSON format.

[0053] The structured annotation results include multiple sets of semantic roles and arguments, each set represented as: "semantic role":"argument".

[0054] In this embodiment, the structured annotation result in JSON format is as follows:

[0055] {"A0":"Brokerage firm,

[0056] "A1":"on their market activity",

[0057] "ADV":"as a rule",

[0058] "NEG":"n't"}.。

[0059] S7, Obtain the corrected recognition result: The matching optimization module uses a fuzzy matching algorithm to post-process and correct each argument in the structured annotation result obtained in S6 based on the natural language sentence and predicate to be recognized, and obtains the corrected recognition result.

[0060] Post-processing correction is used to correct minor deviations such as capitalization and inaccurate text segmentation, improve the alignment between the structured annotation results and the original text, and thus enhance recognition accuracy.

[0061] In this embodiment, the fuzzy matching algorithm uses a sequence similarity algorithm (https: / / stackoverflow.com / questions / 36013295 / find-best-substring-match) for post-processing correction, and the corrected recognition result is:

[0062] {"A0":"Brokerage firms,

[0063] "A1":"on their market activity",

[0064] "ADV":"as a rule",

[0065] "NEG":"n't"}.。

[0066] The natural language recognition method of this invention and the existing natural language recognition method (MRC-SRL: Wang, Nan, et al. "An MRC Framework for Semantic Role Labeling." Proceedings of the 29th International Conference on Computational Linguistics. 2022) were used to perform natural language recognition in a 3-shot scenario (a 3-shot scenario refers to natural language recognition performed in three examples). The results are shown in Table 1. In Table 1, "P" represents precision, "R" represents recall, "F1" represents F1 score, CoNLL05 WSJ represents the WSJ test set in CoNLL05, CoNLL05 Brown represents the Brown test set in CoNLL05, and CoNLL12 Test represents the test set in CoNLL-2012.

[0067] Table 1

[0068]

[0069] As shown in Table 1, the F1 scores of the corrected recognition results obtained by the natural language recognition method of the present invention under the WSJ test set in CoNLL05, the Brown test set in CoNLL05, and the Test test set in CoNLL-2012 are all above 38. Therefore, the natural language recognition method of the present invention is superior to the existing natural language recognition method (MRC-SRL).

[0070] In summary, the natural language recognition method of the present invention is a natural language recognition solution that is oriented towards practical application needs, has high accuracy, high availability and good scalability, and has significant technological advancements and industrial application value.

[0071] Example 2

[0072] like Figure 2 As shown, a system for implementing the natural language recognition method of Embodiment 1 includes: a first prompt generation module, a first model inference module, an extraction module, a merging module, a second prompt generation module, a second model inference module, and a matching optimization module connected in sequence.

[0073] The first prompt generation module takes the natural language sentence and predicate to be identified as input and outputs the context prompt P1; the first model inference module takes the context prompt P1 as input and outputs the semantic sense; the extraction module takes the semantic sense and semantic framework library as input and outputs the core semantic roles and their descriptions; the merging module takes the core semantic roles and their descriptions and all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library as input and outputs all possible semantic roles and their corresponding descriptions; the second prompt generation module takes all possible semantic roles and their corresponding descriptions as input and outputs the context prompt P2; the second model inference module takes the context prompt P2 as input and outputs the structured annotation result; the matching optimization module takes the structured annotation result, the natural language sentence and predicate to be identified as input, and outputs the corrected recognition result. The matching optimization module is used to correct minor deviations in the structured annotation result based on the natural language sentence and predicate to be identified.

[0074] The first model reasoning module uses a large language model to obtain predicate meanings, and the second model reasoning module uses a large language model to obtain structured annotation results. The large language model is a pre-trained large language model GPT-4o that supports natural language reasoning.

[0075] Example 3

[0076] An apparatus for implementing the natural language recognition method of Embodiment 1 includes: a processor and a memory, wherein the memory stores one or more programs for implementing the natural language recognition method of Embodiment 1, and the processor executes the one or more programs to implement the steps of the natural language recognition method of Embodiment 1.

[0077] The memory can be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

Claims

1. A natural language recognition method based on a large model, characterized in that, include: S1, the first prompt generation module constructs the context prompt P1 according to the first template based on the natural language sentence and predicate to be identified; S2, the first model reasoning module inputs the context prompt P1 into the large language model to obtain the semantic meaning of the predicate; S3, The extraction module extracts the core semantic roles and their descriptions of the semantic senses from the semantic framework library; S4, the merging module merges the core semantic roles and their descriptions obtained in S3 with all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library to obtain all possible semantic roles and their descriptions corresponding to the predicate; S5, the second prompt generation module constructs the context prompt P2 according to the second template based on all possible semantic roles and their descriptions obtained in S4, the natural language sentence to be identified, and the predicate; S6, the second model inference module inputs the context prompt P2 into the large language model, the large language model annotates the semantic roles related to the predicate and their corresponding phrase fragments in the natural language sentence to be identified, and outputs the structured annotation result; the structured annotation result includes multiple sets of semantic roles and arguments, each set is represented as: "semantic role":"argument"; S7. The matching optimization module uses a fuzzy matching algorithm to post-process and correct each argument in the structured annotation result obtained in S6 based on the natural language sentence and predicate to be identified, and obtains the corrected recognition result.

2. The natural language recognition method according to claim 1, characterized in that, The first template in step S1 is: "Give a sentence: "Natural language sentence to be identified"; Question: What is the sense of predicate in the given sentence above? A: predicate, intransitive; B: predicate, basictransitive; Please give the best option as the answer. Answer: " 3. The natural language recognition method according to claim 1, characterized in that, The semantic meaning of the predicate in step S2 is: "A: predicate, intransitive" or "B: predicate, basic transitive".

4. The natural language recognition method according to claim 1, characterized in that, The second template in step S5 is: "Give a sentence: "Natural language sentence to be identified", a predicate: "predicate", all possible argument roles and their descriptions: all possible semantic roles corresponding to the predicate and their descriptions, please label the arguments about the predicate "predicate" of the sentence. Provide the answer in JSON format as follows: {"predicate":{role:argument}}." 5. A system for implementing the natural language recognition method according to any one of claims 1-4, characterized in that, include: The module is connected in sequence as follows: first prompt generation module, first model inference module, extraction module, merging module, second prompt generation module, second model inference module, and matching optimization module; The first prompt generation module takes the natural language sentence and predicate to be identified as input and outputs the context prompt P1; the first model inference module takes the context prompt P1 as input and outputs the semantic sense; the extraction module takes the semantic sense and semantic framework library as input and outputs the core semantic roles and their descriptions; the merging module takes the core semantic roles and their descriptions and all fixed non-core semantic roles and their descriptions corresponding to the semantic framework library as input and outputs all possible semantic roles and their corresponding descriptions; the second prompt generation module takes all possible semantic roles and their corresponding descriptions as input and outputs the context prompt P2; the second model inference module takes the context prompt P2 as input and outputs the structured annotation results. The matching optimization module takes structured annotation results, natural language sentences to be identified, and predicates as inputs, and outputs the corrected recognition results. The matching optimization module is used to correct minor deviations in the structured annotation results based on the natural language sentences and predicates to be identified.

6. The system according to claim 5, characterized in that, The first model reasoning module uses a large language model to obtain predicate meanings, and the second model reasoning module uses a large language model to obtain structured annotation results. The large language model is a pre-trained large language model GPT-4o that supports natural language reasoning.

7. An apparatus for implementing the natural language recognition method according to any one of claims 1-4, characterized in that, include: A processor and a memory, wherein the memory stores one or more programs for implementing the natural language recognition method, and the processor executes the one or more programs to implement the steps of the natural language recognition method.