A semantic recognition model based on NLP and a training method thereof
By using an NLP-based semantic recognition model, and by analyzing part-of-speech weights, repeated word frequencies, and interaction durations, combined with a logistic regression adjustment mechanism, the accuracy and efficiency issues of semantic recognition in existing technologies are solved, achieving efficient recognition and resource optimization for polysemous words and complex syntactic structures.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI WUKE INTERNET TECHNOLOGY CO LTD
- Filing Date
- 2025-08-13
- Publication Date
- 2026-06-05
AI Technical Summary
Existing semantic recognition technologies struggle to accurately identify the semantics of key target words when dealing with polysemous words, repetitive words, and complex syntactic structures. They also lack dynamic adjustment mechanisms, leading to biases in semantic understanding and reducing the accuracy and response efficiency of the models.
A semantic recognition model based on NLP is adopted. Through part-of-speech weighting, repeated word frequency statistics, target word screening, semantic quantity statistics and interaction duration analysis, combined with the dynamic adjustment mechanism of variable amplitude factor of logistic regression, target words are screened and identified, and the benchmark of word reference source quantity is adjusted to improve recognition accuracy.
It improves the accuracy and response efficiency of recognizing polysemous words and complex words, and enhances the precision of semantic analysis and the system's resource utilization efficiency.
Smart Images

Figure CN121029965B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semantic recognition model training technology, and more specifically, to an NLP-based semantic recognition model and its training method. Background Technology
[0002] With the rapid development of artificial intelligence technology, natural language processing has been widely used in fields such as semantic recognition, intelligent question answering, and human-computer interaction. Existing semantic recognition technologies are usually based on lexical analysis and statistical models to process the natural language input by users.
[0003] The existing technology has the following shortcomings:
[0004] Currently, traditional methods often struggle to accurately identify the semantics of key target words when processing complete sentences containing polysemous words, repeated words, and complex syntactic structures. They lack dynamic adjustment mechanisms for the semantic complexity of target words and user interaction behavior, and cannot achieve reasonable resource allocation, leading to biases in semantic understanding and reducing the accuracy and response efficiency of semantic recognition models. Therefore, this paper proposes a semantic recognition model based on NLP and its training method.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a semantic recognition model and training method based on NLP, which solves the problems mentioned in the background art by employing part-of-speech weight assignment, repeated word frequency statistics, target word screening, semantic quantity statistics, interaction duration analysis, and a dynamic adjustment mechanism of variable amplitude factor based on logistic regression.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a semantic recognition model based on NLP and its training method, comprising the following steps:
[0008] Step S1: Retrieve the complete sentence input by the user, split it into multiple segments, identify the words in the segments, collect the part-of-speech information of each word and call the part-of-speech weight under the corresponding part-of-speech information, and count the number of times each word appears repeatedly in the complete sentence;
[0009] Step S2: Calculate the frequency of repeated words based on the number of times they appear, calculate the processing class of each word by combining the frequency of repeated words and the part-of-speech weight, and select target words from each word for identification based on the processing class;
[0010] Step S3: In the current interactive window, obtain the semantics of the target word and count the number of semantics, call historical data to analyze the interaction duration of the target word, and pass the number of semantics and interaction duration of the target word into the temporary database;
[0011] Step S4: Set the benchmark for the number of word reference sources. Before analyzing the complete sentence, call the semantic quantity and interaction duration of the target words in the temporary database to calculate the amplitude factor, and adjust the benchmark for the number of word reference sources of each target word through the amplitude factor.
[0012] In a preferred embodiment, in step S1, the user inputs a complete sentence in the interactive window, the user input complete sentence is retrieved, the complete sentence is split into multiple segmented sentences using the partitioning space, and the proofreading words in the information database are matched and identified with the words in each segmented sentence.
[0013] When a word in the segmentation statement matches a word in the information database, the match is successful, and the successfully matched word in the segmentation statement is marked.
[0014] In a preferred embodiment, in step S1, the part-of-speech information of the marked words is collected. The part-of-speech information of different marked words has different roles and functions in the sentence, and each part of speech has a corresponding part-of-speech weight.
[0015] After retrieving the part-of-speech weights of each tagged word from the information database, the number of times each word appears repeatedly in the complete sentence is counted.
[0016] In a preferred embodiment, in step S2, when calculating the repetition frequency of each marked word, a marked word is marked when it appears in the segmented statement, and the ratio of the number of marked segmented statements to the total number of segmented statements is taken as the repetition frequency of the corresponding word.
[0017] The processing coefficient of the marked words is compared with the preset processing threshold to determine the processing order. The specific steps are as follows:
[0018] If the processing coefficient of a marked word exceeds the processing threshold, the marked word is determined to be a first-order word; if the processing coefficient of a marked word is lower than the processing threshold, the marked word is determined to be a zero-order word.
[0019] Among the marked words, those marked words that are judged as first-order words are selected as target words for identification.
[0020] In a preferred embodiment, in step S3, the semantics of the target word are obtained in the current interactive window;
[0021] Retrieve all definitions of the target word from the semantic database and count the number of different semantic entries corresponding to the target word as the semantic count;
[0022] The system calls upon historical data to analyze the interaction duration of the target words. Within a preset historical time period, it retrieves all interaction records containing the target words from the interaction log, obtains the start and end times of the chat box display for each interaction record, calculates the display duration of each interaction record, and accumulates them to obtain the total interaction duration.
[0023] In a preferred embodiment, in step S3, the interaction duration and semantic quantity corresponding to the target word are obtained, and the semantic quantity and interaction duration of the target word are transmitted to a temporary database.
[0024] In a preferred embodiment, in step S4, a benchmark for the number of word reference sources is preset, and before analyzing the complete sentence, the semantic quantity and interaction duration of the target words are retrieved from the temporary database.
[0025] After standardizing the semantic quantity and interaction duration of the target words, the results are input into the logistic regression formula to calculate the comprehensive score. The specific formula is expressed as follows:
[0026] ;
[0027] In the formula, L is the result of logistic regression calculation, i.e., the comprehensive score, e is the natural base, and y is the linear combination term of the logistic regression model, specifically set as follows:
[0028] ;
[0029] In the formula, For bias terms, The number of semantics after standardization. To standardize the interaction duration, as well as These are the regression coefficients for the number of semantics after standardization and the interaction duration, respectively.
[0030] In a preferred embodiment, in step S4, the method of linearly amplifying the comprehensive score is converted into a variable amplitude factor, which is then multiplied with the word reference source quantity benchmark to obtain the adjusted word reference source quantity benchmark. The specific process is as follows:
[0031] The amplitude factor is obtained by converting the composite score using a linear amplification method, and the formula is expressed as follows:
[0032] ;
[0033] In the formula, For the overall score, For amplitude factor, This is the magnification factor.
[0034] In a preferred embodiment, in step S4, the product of the amplitude factor and the word reference source quantity benchmark, and the result rounded up, is used as the adjusted word reference source quantity benchmark. The specific calculation formula is expressed as follows:
[0035] ;
[0036] In the formula, The adjusted benchmark for the number of word reference sources. As a benchmark for the number of word reference sources, For amplitude factor, The product of the amplitude factor and the number of word reference sources is calculated and then rounded up, returning a value not less than [a certain value]. The smallest integer, To obtain and The maximum value between.
[0037] In a preferred embodiment, in step S4, a reference search is performed on the target words based on the adjusted reference source quantity benchmark.
[0038] The technical effects and advantages of this invention are as follows:
[0039] This invention retrieves the entire current sentence, filters out multiple segmented sentences, identifies words within the segmented sentences, collects the part-of-speech information of each word and calls the corresponding part-of-speech weight, counts the repetition frequency of each word in the current sentence, calculates the processing class of each word by combining the repetition frequency and part-of-speech weight, and filters out target words for identification. Under the current interactive window, it obtains the semantics of the target words and counts the semantic quantity, calls historical data to analyze the interaction duration of the target words, sets a benchmark for the number of word reference sources, and adjusts the benchmark for the number of word reference sources for each target word by combining the semantic quantity of the target words and the interaction duration. This improves the semantic analysis accuracy of each target word in the interactive sentence and enhances the system's accuracy and response efficiency in recognizing polysemous and complex words. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating the implementation of an NLP-based semantic recognition model and its training method according to the present invention.
[0041] Figure 2 This is a schematic diagram illustrating the steps of a semantic recognition model based on NLP and its training method according to the present invention. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] This invention improves the semantic analysis accuracy of target words in interactive sentences by retrieving the entire current sentence, filtering out multiple segmented sentences, identifying words in the segmented sentences, collecting part-of-speech information of each word and calling the part-of-speech weight under the corresponding part-of-speech information, counting the number of times each word appears repeatedly in the current sentence and calculating the frequency of repeated words, calculating the processing class of each word by combining the frequency of repeated words and the part-of-speech weight, and filtering out target words for identification. Under the current interactive window, the semantics of the target words are obtained and the semantic quantity is counted. Historical data is called to analyze the interaction time of the target words, and a benchmark for the number of word reference sources is set. The benchmark for the number of word reference sources of each target word is adjusted by combining the semantic quantity of the target words and the interaction time, thereby improving the semantic analysis accuracy of each target word in the interactive sentence.
[0044] Example 1: A semantic recognition model based on NLP and its training method, such as... Figures 1 to 2 As shown, it includes the following steps:
[0045] Step S1: Retrieve the complete sentence input by the user, split it into multiple segments, identify the words in the segments, collect the part-of-speech information of each word and call the part-of-speech weight under the corresponding part-of-speech information, and count the number of times each word appears repeatedly in the complete sentence;
[0046] Step S2: Calculate the frequency of repeated words based on the number of times they appear, calculate the processing class of each word by combining the frequency of repeated words and the part-of-speech weight, and select target words from each word for identification based on the processing class;
[0047] Step S3: In the current interactive window, obtain the semantics of the target word and count the number of semantics, call historical data to analyze the interaction duration of the target word, and pass the number of semantics and interaction duration of the target word into the temporary database;
[0048] Step S4: Set the benchmark for the number of word reference sources. Before analyzing the complete sentence, call the semantic quantity and interaction duration of the target words in the temporary database to calculate the amplitude factor, and adjust the benchmark for the number of word reference sources of each target word through the amplitude factor.
[0049] The specific implementation is as follows:
[0050] In step S1, the complete sentence input by the user is received in the interactive window. The complete sentence input by the user is retrieved and split into multiple segments using the partition space. The words in each segment are matched and identified based on the proofreading words in the information database. When the words in the segment match the proofreading words in the information database, the match is successful and the words that match successfully in the segment are marked.
[0051] It should be explained that the interactive window is the interface between the user and the recognition system, used to receive the user's input of the statement to be analyzed. The space is divided into a text space of a preset size. For example, if the space is divided into 5 characters, then for the complete statement input by the user, every 5 characters will be divided into a segmented statement.
[0052] The part-of-speech information of marked words is collected. The part-of-speech information of different marked words has different roles and functions in the sentence. Each part of speech has a corresponding part-of-speech weight. The part-of-speech weight is used to evaluate the importance of words of the corresponding part of speech in the complete sentence. In sentence recognition and analysis, it is easier to understand and analyze the complete sentence when analyzing words corresponding to noun and verb parts of speech. In the sentence analysis system, the part-of-speech weight corresponding to each part of speech is stored in the information database for easy access and analysis.
[0053] After retrieving the part-of-speech weights of each tagged word from the information database, the number of times each word appears repeatedly in the complete sentence is counted.
[0054] It should be noted that in this example, the information database is the information database in the sentence recognition system, which contains stored proofreading words and part-of-speech weights. The proofreading words are used to match each tagged word in the complete sentence input by the user and provide a call pointer for calling the part-of-speech weights. The part-of-speech weights are set by professionals in this field according to the actual situation, and will not be elaborated here.
[0055] In step S2, when calculating the repetition frequency of each marked word, a marked word is marked when it appears in the segmented statement, and the ratio of the number of marked segmented statements to the total number of segmented statements is taken as the repetition frequency of the corresponding word.
[0056] The greater the frequency of repeated words or the greater the part-of-speech weight of a word, the more important it is in the complete sentence entered by the user, and the more semantic recognition is needed for the word. When calculating the processing level of each marked word, the product of the frequency of repeated words and the part-of-speech weight of each marked word is used as the processing coefficient of the corresponding marked word.
[0057] The processing coefficient of the marked words is compared with the preset processing threshold to determine the processing order. The specific steps are as follows:
[0058] If the processing coefficient of a marked word exceeds the processing threshold, the marked word is determined to be a first-order word; if the processing coefficient of a marked word is lower than the processing threshold, the marked word is determined to be a zero-order word.
[0059] Among the marked words, those marked words that are judged as first-order words are selected as target words for identification.
[0060] It should be noted that the processing threshold mentioned above is not unique and can be set according to the actual situation. For example, if the processing threshold is set to 0.2, when the frequency of repeated words of the marked word is 0.4 and the part-of-speech weight is 0.6, the processing coefficient of the marked word is 0.24. If it exceeds the processing threshold, the marked word is judged as a first-order word and is used as the target word for subsequent processing and identification.
[0061] In step S3, the semantics of the target word are obtained within the current interactive window, i.e., within the same chat box;
[0062] The semantic count refers to the total number of meanings that can be retrieved for a target word in a semantic database. The logic for obtaining it is to call all the definitions of the target word in the semantic database and count the number of different semantic entries corresponding to the target word as the semantic count.
[0063] The semantic database is a structured data collection used to store words and their corresponding multiple semantic interpretations. It is pre-built based on manually annotated semantic dictionaries and training results of large-scale corpora. Each word corresponds to one or more semantic entries in the database, and each semantic entry contains a semantic identifier, explanatory text, and semantic vector representation.
[0064] Specifically, a word can contain multiple meanings, and there are implicitly different semantic relationships between these meanings. For example, the target word "apple" contains multiple semantic entries in the semantic database, such as "fruit", "electronic product brand", and "desktop software name". These entries are independent of each other in terms of meaning and are all included in the statistical results of semantic quantity.
[0065] Optionally, for the confirmation of a word containing multiple meanings, integration and screening can be carried out before the semantic database is built. Specifically, the following judgment criteria are set for different meaning relationships: for any two semantic entries of the target word, the semantic similarity of the two semantic entries is calculated and compared with the preset similarity threshold. When the semantic similarity is lower than the similarity threshold, it is determined to be a different meaning relationship. The judgment criteria for different meaning relationships are not limited and will not be elaborated here.
[0066] Analyze the interaction duration of target words using historical data;
[0067] Interaction duration refers to the cumulative time that the target word is displayed in the interaction window within a preset historical time period. It is used to reflect the degree of attention and understanding of the target word during user interaction. The acquisition logic is to retrieve all interaction records containing the target word in the interaction log within the preset historical time period, obtain the start and end times of the chat box display corresponding to each interaction record, calculate the display duration of each interaction record, and accumulate them as the interaction duration.
[0068] It should be noted that the preset historical time period was set by the researchers based on the actual interaction frequency and analysis needs. Specifically, the selection rules can be set by statistically analyzing factors such as user activity duration and semantic change frequency. The specific selection method is not limited and will not be elaborated here.
[0069] Among them, the interaction log refers to the timestamp data set that records all interactive operations between the user and the system, including all interaction records of the target words, which are pre-stored on the server or local database for subsequent semantic analysis and interactive behavior evaluation.
[0070] Obtain the interaction duration and semantic count of the target word, and then input the semantic count and interaction duration of the target word into a temporary database;
[0071] The temporary database is a dedicated data storage area used to temporarily store the associated parameters of target words during the current semantic recognition and analysis process. The database is dynamically updated during task execution and can be cleared or overwritten according to the set strategy after the task ends. The parameters recorded in the temporary database include, but are not limited to, the semantic quantity of the target words, interaction duration, part-of-speech category, and processing level.
[0072] Furthermore, a data interface is established between the temporary database and the subsequent reference source quantity adjustment module or semantic matching module to quickly read the real-time feature information of target words during the analysis phase, thereby improving the response speed and accuracy of the current semantic analysis without relying on long-term historical data.
[0073] In step S4, a benchmark for the number of word reference sources is pre-set. Before analyzing the complete sentence, the semantic quantity and interaction duration of the target words are retrieved from the temporary database.
[0074] It should be noted that the word reference source quantity benchmark is a preset value that limits the number of references the system can retrieve from documents or data sources related to the target word when performing semantic analysis on a complete sentence. This benchmark value is used to control the maximum number of reference sources the system can obtain when retrieving information related to the target word from the entire network or a specified database. This ensures semantic analysis coverage while controlling computational resource consumption and retrieval latency. Therefore, it can be understood that the word reference source quantity benchmark is the preset minimum value of the number of references the system can retrieve from documents or data sources related to the target word.
[0075] For example, when AI analyzes a complete sentence, it traverses the entire network to identify the literature in which the corresponding words appear. However, there are inconsistencies in the sources of these literatures. The system sets a baseline number to limit the number of literatures it finds. For example, if the default is to only find three literatures as references for all words, then the baseline number of reference sources for each word is set to 3.
[0076] The rules for setting the benchmark number of word reference sources were set by the researchers based on the semantic complexity of the target application scenario and the available computing and storage resource quotas, and will not be elaborated here.
[0077] The semantic quantity and interaction duration of the target words are standardized so that the semantic quantity of the target words and the interaction duration of the target words are kept under the same dimension (i.e. dimensionless) and the numerical range is kept between 0 and 1.
[0078] It should be noted that the standardization methods include, but are not limited to, standard linear transformation based on interval scaling, statistical Z-Score standardization method, or normalization method based on nonlinear mapping function. The application methods of standardization will not be elaborated here.
[0079] The standardized semantic count and interaction duration are substituted into the logistic regression formula to calculate the comprehensive score, as shown in the following formula:
[0080] ;
[0081] In the formula, L is the result of logistic regression calculation, i.e., the comprehensive score, e is the natural base, and y is the linear combination term of the logistic regression model, specifically set as follows:
[0082] ;
[0083] In the formula, For bias terms, The number of semantics after standardization. To standardize the interaction duration, as well as These are the regression coefficients for the number of semantic elements after standardization and the interaction duration, respectively.
[0084] Among them, logistic regression parameters , , The training samples can be obtained from the interaction logs (including interaction records of target words) and semantic databases (including semantic entries of words) mentioned in the document. The training process is a model tuning step that can be completed by those skilled in the art through conventional experiments, and will not be described in detail here.
[0085] It should be noted that, to ensure monotonicity, the regression coefficients are preferably [values to be specified]. and Set to non-negative values (i.e.) , Thus, as the number of semantic terms or the duration of interaction increases, the linear combination terms... The value does not decrease, and consequently the logistic regression output (i.e., the overall score) increases accordingly;
[0086] When the number of semantics and the interaction time increase, it indicates that the semantic complexity of the target words or the difficulty of user understanding increases. Therefore, the higher the overall score, the more necessary it is to increase the benchmark for the number of word reference sources.
[0087] Specifically, the range of values for the above logistic regression output (i.e., the comprehensive score) is as follows: When the number of semantic terms and the interaction duration increase simultaneously or in either case, and the corresponding regression coefficient is positive, the combined term... An increase in the value, which in turn increases the value of the overall score, indicates an increase in the amplitude factor, thus requiring an increase in the benchmark for the number of word reference sources.
[0088] The method of linearly amplifying the comprehensive score is converted into a variable amplitude factor, which is then multiplied with the word reference source quantity benchmark to obtain the adjusted word reference source quantity benchmark. The specific process is as follows:
[0089] The formula for converting the composite score using the linear amplification method is as follows:
[0090] ;
[0091] In the formula, For the overall score, For amplitude factor, This is the magnification factor;
[0092] Among them, the magnification factor The contribution ratio of the comprehensive score, which is jointly determined by the number of semantic terms of the target words and the interaction time, to the amplitude factor is set by the researchers based on the historical search effect evaluation results and the system's computing resource constraints, and will not be elaborated here.
[0093] Furthermore, the amplification factor is specifically set based on the measured balance data of semantic parsing accuracy and computational efficiency achieved after adjusting the number of reference sources corresponding to different amplification factor values in historical searches, combined with the system's preset computational resource constraints (such as maximum allowed search time and memory usage limit).
[0094] The adjusted word reference source quantity benchmark is obtained by multiplying the amplitude factor and the word reference source quantity benchmark, and then rounding up. The specific calculation formula is expressed as follows:
[0095] ;
[0096] In the formula, The adjusted benchmark for the number of word reference sources. As a benchmark for the number of word reference sources, For amplitude factor, The product of the amplitude factor and the number of word reference sources is calculated and then rounded up, returning a value not less than [a certain value]. The smallest integer, To obtain and The maximum value between;
[0097] It is understandable that the word reference source quantity benchmark is first multiplied by the amplitude factor to obtain the amplified word reference source quantity benchmark. Then, the value is rounded up to ensure that the amplified word reference source quantity benchmark is an integer. Finally, it is compared with the original benchmark value B, and the maximum value is taken as the adjusted word reference source quantity benchmark to avoid the situation that the amplified calculation is actually less than the benchmark value.
[0098] For example, for simple vocabulary, if the baseline number of reference sources is 3, the amplification factor is 2, and the comprehensive score of simple words is 0.2, then the amplitude factor is 1 + 2 × 0.2 = 1.4. Therefore, the adjusted baseline number of reference sources is... ;
[0099] For complex vocabulary, the overall score for complex words is 0.8, so the amplitude factor is 1 + 2 × 0.8 = 2.6. Therefore, the adjusted reference source quantity benchmark is... ;
[0100] Furthermore, based on the adjusted reference source quantity benchmark, the system can dynamically allocate retrieval resources for target words in the entire network or designated databases, improving the semantic parsing accuracy of complex words while ensuring the computational efficiency and rational utilization of resources for simple words.
[0101] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0102] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] In this document, the singular forms “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that terms such as “comprising / including” or “having” specify the presence of the stated features, integrals, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integrals, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0104] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0105] The above description of the disclosed embodiments will enable those skilled in the art to make or use various modifications to these embodiments. It will be readily apparent to those skilled in the art that the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A semantic recognition model based on NLP and its training method, characterized in that: Includes the following steps: Step S1: Retrieve the complete sentence input by the user, split it into multiple segments, identify the words in the segments, collect the part-of-speech information of each word and call the part-of-speech weight under the corresponding part-of-speech information, and count the number of times each word appears repeatedly in the complete sentence; Step S2: When calculating the repetition frequency of each marked word, mark the corresponding marked word when it appears in the segmentation statement, and use the ratio of the number of marked segmentation statements to the total number of segmentation statements as the repetition frequency of the corresponding word. The product of the frequency of repeated words and the part-of-speech weight of each marked word is used as the processing coefficient for the corresponding marked word; If the processing coefficient of a marked word exceeds the processing threshold, the marked word is determined to be a first-order word; if the processing coefficient of a marked word is lower than the processing threshold, the marked word is determined to be a zero-order word. Among the marked words, those marked words that are judged as first-order words are selected as target words for identification; Step S3: Under the current interactive window, obtain the semantics of the target word; call all the definitions of the target word in the semantic database, and count the number of different semantic entries corresponding to the target word as the semantic count; Within a preset historical time period, retrieve all interaction records containing the target words from the interaction log, obtain the start and end times of the chat box display corresponding to each interaction record, calculate the display duration of each interaction record, and sum them up as the interaction duration. Step S4: Pre-set the benchmark for the number of word reference sources. Before analyzing the complete sentence, call the semantic quantity and interaction duration of the target words in the temporary database. After standardizing the semantic quantity and interaction duration of the target words, the comprehensive score is obtained by inputting them into the logistic regression formula, as follows: In the formula, L is the composite score, e is the natural base, y is the linear combination term of the logistic regression model, and y is: In the formula, Here, sl represents the number of semantics after normalization, and st represents the interaction duration after normalization. , These are the regression coefficients for the number of semantic elements and the interaction duration after standardization, respectively. The amplitude factor is obtained by converting the composite score using a linear amplification method, as follows: In the formula, L is the overall score, and F is the amplitude factor. This is the magnification factor; The adjusted word reference source quantity benchmark is calculated by multiplying the amplitude factor and the word reference source quantity benchmark, and then rounding up. In the formula, R is the adjusted benchmark for the number of word reference sources, B is the benchmark for the number of word reference sources, and F is the amplitude factor. The product of the amplitude factor and the number of word reference sources is calculated and then rounded up. To take B and The maximum value between the two values is used to perform a reference search on the target words based on the adjusted reference source quantity benchmark.
2. The semantic recognition model and training method based on NLP according to claim 1, characterized in that: In step S1, the complete sentence input by the user is received in the interactive window, the complete sentence input by the user is retrieved, the complete sentence is split into multiple segments using the partition space, and the proofreading words in the information database are matched and identified with the words in each segment. When a word in the segmentation statement matches a word in the information database, the match is successful, and the successfully matched word in the segmentation statement is marked.
3. The semantic recognition model based on NLP and its training method according to claim 2, characterized in that: In step S1, the part-of-speech information of the marked words is collected. The part-of-speech information of different marked words has different roles and functions in the sentence, and each part of speech has a corresponding part-of-speech weight. After retrieving the part-of-speech weights of each tagged word from the information database, the number of times each word appears repeatedly in the complete sentence is counted.