Information text semantic matching method and system based on natural language processing technology

By extracting the keywords and calculating the scene matching values ​​of the target text, and combining the network performance evaluation values ​​for adaptive evaluation, the problem of low matching recall in the existing technology is solved, and the accuracy and efficiency of text matching are improved.

CN119886149APending Publication Date: 2025-04-25CHINACCS INFORMATION IND

Patent Information

Application Number
CN202411836580.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art requires that the text to be matched must be completely consistent with the target text in characters or vocabulary when performing precise matching, resulting in many related texts being excluded and there is a problem of low matching recall.

Method used

By obtaining the preprocessed text to be matched, it is marked as the target text; obtaining the network performance data during preprocessing, comprehensively analyzing to obtain the network performance evaluation value; extracting the target text keywords, calculating the matching value of each scene; evaluating feedback based on the scene adaptability evaluation value, obtaining the target format text, and determining its semantic similarity.

Benefits of technology

The text matching recall and accuracy are improved. By extracting keywords and calculating scene matching values, the target text can be more accurately judged and adaptive evaluation is performed based on the network performance evaluation value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886149A_ABST
    Figure CN119886149A_ABST
Patent Text Reader

Abstract

The invention discloses an information text semantic matching method and system based on a natural language processing technology, and belongs to the technical field of artificial intelligence data processing. The method comprises the following steps: obtaining a preprocessed to-be-matched text, marking the preprocessed to-be-matched text as a target text, and carrying out comprehensive analysis according to network performance data to obtain a network performance evaluation value; performing weight distribution according to the meaning of each text vocabulary, and performing calculation according to each text vocabulary and the weight of each text vocabulary to obtain each scene matching value; screening according to each scene matching value to obtain a scene to which the target text belongs, comprehensively analyzing according to the network performance evaluation value and the scene matching value to which the target text belongs to obtain a scene adaptability evaluation value, and performing evaluation feedback; and obtaining each response format text of the scene to which the target text belongs, judging the semantic similarity between the target text and each response format text to obtain a target format text, and performing feedback according to the target format text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence data processing technology, and in particular to an information text semantic matching method and system based on natural language processing technology. Background Art

[0002] Natural language processing technology is a branch of artificial intelligence and linguistics that aims to enable computers to understand, interpret and generate natural human language. Its goal is to develop systems that can read text, listen to speech, understand meaning, and respond accordingly.

[0003] Existing information text semantic matching methods can be roughly divided into traditional methods and deep learning-based methods. Traditional methods mainly rely on the surface features and statistical information of texts for semantic matching, while neural network-based methods learn the semantic representation of texts by training neural network models and perform matching calculations on this basis. With the rapid development of deep learning technology, the latter technology has achieved remarkable results.

[0004] For example, the patent application with publication number: CN117892733A discloses a text matching method and system based on joint multi-semantic information, including: inputting a text pair to be processed; encoding the multi-semantic information of the text pair to be processed at the input encoding layer, obtaining a variety of semantic embedding information, and outputting a first original text and a second original text; at the multi-semantic interaction layer, using a soft alignment mechanism to obtain the interactive features of multi-language semantic information, performing splicing processing, and obtaining a first enhanced sentence representation and a second enhanced sentence representation; at the multi-semantic aggregation layer, using an attention mechanism to aggregate the first enhanced sentence representation and the second enhanced sentence representation, and generating the final first sentence representation and the second sentence representation; at the result matching layer, performing text matching to determine the matching similarity of the text pair to be processed.

[0005] For example, the invention patent announcement with announcement number: CN108132931 B discloses a method and device for text semantic matching, including: using word vectors and character vectors corresponding to words and characters in the text to be processed to obtain a total vector, and then performing convolution processing, averaging processing and bidirectional LSTM processing on the total vector, wherein, when processing the basic text, an LSTM method without an attention mechanism is used, and when processing the target text, an LSTM method with an attention mechanism is used to obtain pooled vectors respectively, and then the similarity of the two pooled vectors is used as the similarity of the two texts.

[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:

[0007] In the prior art, when performing an exact match, it is required that the text to be matched and the target text must be completely consistent in terms of characters or vocabulary, which results in many relevant texts being excluded and there is a problem of low matching recall rate. Summary of the invention

[0008] The present invention provides an information text semantic matching method and system based on natural language processing technology, which solves the problem in the prior art that when performing accurate matching, the text to be matched and the target text must be completely consistent in characters or vocabulary, resulting in many related texts being excluded and a low matching recall rate, thereby achieving an improvement in the text matching recall rate and accuracy.

[0009] The present invention provides an information text semantic matching method based on natural language processing technology, comprising the following steps: obtaining a preprocessed text to be matched and marking it as a target text; obtaining network performance data during preprocessing, and obtaining a network performance evaluation value through comprehensive analysis based on the network performance data during preprocessing; extracting target text keywords to obtain each text word, performing weight assignment based on the meaning of each text word, and obtaining each scene matching value based on each text word and the weight calculation of each text word; obtaining a scene to which the target text belongs based on each scene matching value, obtaining a scene adaptability evaluation value through comprehensive analysis based on the network performance evaluation value and the scene matching value to which the target text belongs, and providing evaluation feedback based on the scene adaptability evaluation value; obtaining each corresponding format text of the scene to which the target text belongs, and judging the semantic similarity between the target text and each corresponding format text, obtaining the target format text, and providing feedback based on the target format text.

[0010] Furthermore, the step of obtaining a network performance evaluation value based on a comprehensive analysis of the network performance data during preprocessing includes: the network performance data during preprocessing includes network delay, network jitter and throughput; obtaining critical network delay, critical network jitter and critical throughput from a semantic matching database; and obtaining a network performance evaluation value through comprehensive analysis.

[0011] Furthermore, the step of extracting target text keywords and obtaining each text vocabulary includes: obtaining the total number of words in the target text, counting the frequency of occurrence of each text vocabulary in the target text and the inverse document frequency of each text vocabulary; multiplying the frequency of occurrence of each text vocabulary with the inverse document frequency of each text vocabulary to obtain the weight of each text vocabulary, and sorting the text vocabulary in descending order according to the weight of each text vocabulary, and obtaining each text vocabulary according to the sorting.

[0012] Furthermore, the steps of assigning weights according to the meanings of each text vocabulary and calculating the matching value of each scene according to each text vocabulary and its weight include: matching each text vocabulary with each text vocabulary in each scene to obtain the number of each existing text vocabulary in each scene and the number of existing text vocabulary in each scene; calculating the matching value of each scene according to the number of existing text vocabulary in each scene and the weight of each existing text vocabulary in each scene and the critical number of existing text vocabulary in each scene preset in the semantic matching database, the reference weight of each existing text vocabulary in each scene and the allowable deviation weight of each existing text vocabulary in each scene.

[0013] Furthermore, the step of filtering and obtaining the scene to which the target text belongs according to the scene matching values ​​includes: sorting the scene matching values ​​in descending order; and marking the scene with the highest scene matching value as the scene to which the target text belongs.

[0014] Furthermore, the step of obtaining a scene adaptability evaluation value based on a comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs includes: obtaining a critical network performance evaluation value and a critical scene matching value from a semantic matching database; and obtaining a scene adaptability evaluation value based on a comprehensive analysis of the network performance evaluation value, the scene matching value to which the target text belongs, the critical network performance evaluation value and the critical scene matching value.

[0015] Furthermore, the scene adaptability evaluation value is obtained as follows:

[0016]

[0017] Where ξA represents the scene adaptability evaluation value, α 4 Indicates the scenario adaptability evaluation impact factor corresponding to the network performance evaluation value, α 5 represents the scene adaptability evaluation impact factor corresponding to the scene matching value of the target text, ξP 1 represents the network performance evaluation value, ξP 0 represents the critical network performance evaluation value, ξM 1 represents the scene matching value of the target text, ξM 0 Indicates the critical scene matching value.

[0018] Furthermore, the step of providing evaluation feedback based on the scene adaptability evaluation value includes: obtaining a scene adaptability evaluation threshold from a semantic matching database; comparing the scene adaptability evaluation value with the scene adaptability evaluation threshold; if the scene adaptability evaluation value is greater than or equal to the scene adaptability evaluation threshold, no additional operation is performed; if the scene adaptability evaluation value is less than the scene adaptability evaluation threshold, feedback is provided and the text to be matched is re-preprocessed.

[0019] Furthermore, the steps of determining the semantic similarity between the target text and each corresponding format text to obtain the target format text include: obtaining the hidden layer information of the target text, and calculating the self-information of the text vocabulary based on the hidden layer information of the target text; constructing a semantic representation of the text based on the self-information, converting the text into a vector form based on the vocabulary self-information, and marking it as the semantics of the target text; calculating the semantic similarity between the target text and each corresponding format text to obtain the semantic similarity of each text, and sorting them in descending order according to the semantic similarity of each text, and marking the corresponding format text with the highest text semantic similarity as the target format text.

[0020] The embodiment of the present application provides an information text semantic matching system based on natural language processing technology, which includes a text acquisition module, a performance evaluation module, a scene matching module, a scene evaluation module, a text evaluation module and a semantic matching database; wherein the text acquisition module is used to acquire the preprocessed text to be matched and mark it as the target text; the performance evaluation module is used to acquire the network performance data during preprocessing, and obtain the network performance evaluation value by comprehensive analysis based on the network performance data during preprocessing; the scene matching module is used to extract the target text keywords, obtain each text vocabulary, assign weights according to the meanings of each text vocabulary, and obtain each scene matching value according to each text vocabulary and the weight calculation of each text vocabulary; the scene evaluation module is used to filter and obtain the scene to which the target text belongs according to each scene matching value, obtain the scene adaptability evaluation value by comprehensive analysis based on the network performance evaluation value and the scene matching value to which the target text belongs, and provide evaluation feedback based on the scene adaptability evaluation value; the text evaluation module is used to acquire each corresponding format text of the scene to which the target text belongs, and judge the semantic similarity between the target text and each corresponding format text, obtain the target format text, and provide feedback based on the target format text.

[0021] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0022] 1. The present invention provides an information text semantic matching method and system based on natural language processing technology, so that it can judge the semantic similarity between the target text and each corresponding format text, determine the target format text, and provide accurate feedback, thereby greatly improving the efficiency and accuracy of text processing.

[0023] 2. The present invention extracts keywords from the target text and assigns weights to them, thereby quantifying the importance of each text word in scene matching, and calculating the matching value of each scene based on these weights, thereby achieving accurate evaluation of the relevance between the target text and different scenes.

[0024] 3. The present invention comprehensively considers the network performance evaluation value and the matching value of the scene to which the target text belongs, so as to comprehensively evaluate the adaptability of the target text in the current network environment, and perform accurate evaluation feedback according to the scene adaptability evaluation value, thereby achieving improved accuracy and pertinence of the feedback. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flow chart of an information text semantic matching method based on natural language processing technology provided in an embodiment of the present application.

[0026] Figure 2 A diagram showing changes in scene adaptability evaluation values ​​based on an information text semantic matching method provided in an embodiment of the present application.

[0027] Figure 3 A schematic diagram of the structure of an information text semantic matching system based on natural language processing technology provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiment of the present application provides an information text semantic matching method and system based on natural language processing technology, which solves the problem in the prior art that when performing precise matching, the text to be matched and the target text must be completely consistent in characters or vocabulary, resulting in many related texts being excluded and a low matching recall rate. The text to be matched after preprocessing is obtained and marked as the target text; network performance data during preprocessing is obtained, and a network performance evaluation value is obtained based on a comprehensive analysis of the network performance data during preprocessing; keywords of the target text are extracted to obtain each text vocabulary, and weights are assigned according to the meanings of each text vocabulary, and each scene matching value is obtained based on each text vocabulary and the weight of each text vocabulary; the scene to which the target text belongs is obtained by screening according to each scene matching value, and a scene adaptability evaluation value is obtained based on a comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs, and evaluation feedback is performed based on the scene adaptability evaluation value; each corresponding format text of the scene to which the target text belongs is obtained, and the semantic similarity between the target text and each corresponding format text is determined to obtain the target format text, and feedback is performed based on the target format text, thereby improving the recall rate and accuracy of text matching.

[0029] The technical solution in the embodiment of the present application is to solve the above problem that when performing accurate matching, the text to be matched and the target text must be completely consistent in characters or vocabulary, resulting in many related texts being excluded and a low matching recall rate. The overall idea is as follows:

[0030] The method obtains the preprocessed text to be matched and marks it as the target text; obtains the network performance data during preprocessing, and obtains the network performance evaluation value based on the comprehensive analysis of the network performance data during preprocessing; extracts the target text keywords to obtain each text word, assigns weights according to the meaning of each text word, and obtains each scene matching value based on each text word and the weight of each text word; obtains the scene to which the target text belongs according to the matching value of each scene, obtains the scene adaptability evaluation value based on the comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs, and performs evaluation feedback based on the scene adaptability evaluation value; obtains each corresponding format text of the scene to which the target text belongs, and determines the semantic similarity between the target text and each corresponding format text, obtains the target format text, and provides feedback based on the target format text, thereby improving the accuracy and efficiency of text matching.

[0031] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0032] like Figure 1 As shown, it is a flow chart of the information text semantic matching method based on natural language processing technology provided by an embodiment of the present application, and the method includes the following steps: obtaining the preprocessed text to be matched and marking it as the target text; obtaining the network performance data during the preprocessing, and obtaining the network performance evaluation value according to the comprehensive analysis of the network performance data during the preprocessing; extracting the target text keywords to obtain each text word, assigning weights according to the meanings of each text word, and obtaining each scene matching value according to each text word and the weight calculation of each text word; filtering according to each scene matching value to obtain the scene to which the target text belongs, and obtaining the scene adaptability evaluation value according to the comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs, and providing evaluation feedback according to the scene adaptability evaluation value; obtaining each corresponding format text of the scene to which the target text belongs, and judging the semantic similarity between the target text and each corresponding format text, obtaining the target format text, and providing feedback according to the target format text.

[0033] In this embodiment, preprocessing can preliminarily remove noise in the text to ensure that the matching algorithm can more accurately identify and process text information. When providing feedback based on the target format text, a concise and clear feedback text can be generated based on the structure of the target format text. For example, if the target format is JSON, feedback that conforms to the JSON structure is generated; if it is a table, feedback in a table style is generated. By extracting keywords from the target text and calculating the matching values ​​between the target text and each scene, the specific scene to which the target text belongs can be more accurately determined. This precise matching helps improve the relevance and accuracy of the text response; by screening out the scene to which the target text belongs and selecting the most matching response format text based on semantic similarity, the best response format text can be quickly located in a variety of response methods.

[0034] In addition, the semantic matching database is used to store relevant data of the information text semantic matching method based on natural language processing technology, including: critical network delay, critical network jitter, critical throughput, network performance evaluation influencing factors corresponding to network delay, critical network performance evaluation values ​​and scenario adaptability evaluation thresholds, etc. The data in the semantic matching database can be directly obtained through queries in public databases such as the National Bureau of Statistics database and professional economic databases, and can also be obtained through transactions on data trading platforms such as Youyi Data or Data Hall.

[0035] Furthermore, the step of obtaining a network performance evaluation value based on a comprehensive analysis of the network performance data during preprocessing includes: the network performance data during preprocessing includes network delay, network jitter and throughput; obtaining critical network delay, critical network jitter and critical throughput from a semantic matching database; and obtaining a network performance evaluation value through comprehensive analysis.

[0036] The network performance evaluation value is obtained in the following manner:

[0037]

[0038] Where ξP 1 represents the network performance evaluation value, α 1 represents the network performance evaluation impact factor corresponding to network delay, α 2 represents the network performance evaluation impact factor corresponding to network jitter, α 3 Denotes the network performance evaluation factor corresponding to the throughput, D 1j represents the network delay of the jth data packet, D 0 represents the critical network delay, S 1j represents the network jitter of the jth data packet, S 0 represents the critical network jitter, T 1 represents the throughput, T 0 represents the critical throughput, e is a natural constant, j is the number of each data packet, j = 1, 2, 3, ..., P, P is the total number of data packets.

[0039] α 1 , α 2 and α 3The network performance evaluation influencing factors corresponding to the network delay, network jitter and throughput preset in the semantic matching database are numerical indicators that measure the influence of the above network performance factors on the network performance evaluation value. Specifically, there is a mapping relationship table for each network delay, network jitter and throughput, which records each possible network performance value and its corresponding network performance evaluation influencing factor. These mapping relationships can be one-to-one or many-to-one. In actual applications, when it is necessary to evaluate a certain network performance evaluation value, the measured network delay, network jitter and throughput can be input into their corresponding mapping relationship tables respectively, and the network performance evaluation influencing factors corresponding to these values ​​can be quickly found, where the value range of the influencing factor is between 0 and 1.

[0040] In this embodiment, network jitter generally refers to the deviation between the time interval of a data packet arriving at the receiving end and the expected time interval during data transmission, network delay refers to the time required for a data packet to be transmitted from the sending end to the receiving end in the network, and throughput refers to the maximum rate that a device can accept without frame loss. Both network delay and throughput can be obtained by querying network monitoring software (such as SNMP, Zabbix, etc.) deployed in the network, and network jitter can be obtained by testing using network analysis tools (such as Wi reshark, etc.). There is a mutual influence relationship between these three indicators. For example, an increase in network delay may lead to a decrease in throughput because the waiting time of data in the transmission process becomes longer, thereby reducing the amount of data transmitted per unit time; similarly, an increase in network jitter may also lead to a decrease in throughput and an increase in delay because the inconsistency of the arrival time of the data packet will lead to unstable data transmission. By comprehensively analyzing the three indicators of network delay, network jitter and throughput, the network performance evaluation value obtained can reflect the performance of the network under different conditions, and problems in the network can be discovered and solved in a timely manner to ensure the stable operation of the network.

[0041] Furthermore, the step of extracting target text keywords and obtaining each text vocabulary includes: obtaining the total number of words in the target text, counting the frequency of occurrence of each text vocabulary in the target text and the inverse document frequency of each text vocabulary; multiplying the frequency of occurrence of each text vocabulary with the inverse document frequency of each text vocabulary to obtain the weight of each text vocabulary, and sorting the text vocabulary in descending order according to the weight of each text vocabulary, and obtaining each text vocabulary according to the sorting.

[0042] The weight of each text word is obtained as follows:

[0043] W(t)=F(t)*P(t);

[0044] Where W(t) represents the weight of text word t, F(t) represents the frequency of occurrence of text word t, and P(t) represents the inverse document frequency of text word t.

[0045] In this embodiment, the inverse document frequency of each text word refers to the distribution of the word in the entire text collection. The target text is divided into paragraphs according to paragraphs. If the number of times a word appears in a paragraph is higher, its inverse document frequency will be lower; if the number of times a word appears in a paragraph is lower, its inverse document frequency will be higher. Traverse each paragraph to count the number of times each word appears in each paragraph, and by traversing the vocabulary list and counting the number of times each word appears in the target text, the frequency of occurrence of each text word can be obtained by the ratio of the number of times each word appears in the target text to the total number of words in the target text. The inverse document frequency of each text word is obtained as follows: Where P(t) represents the inverse document frequency of text word t, M represents the total number of paragraphs, and N(t) represents the number of paragraphs containing text word t. Since each text word is obtained based on the sorting, the number of each text word required can be selected according to the actual situation of the user. For example, when the content of an information text has few words, a small number of each text word can be selected.

[0046] Furthermore, the steps of assigning weights according to the meanings of each text vocabulary and calculating the matching value of each scene according to each text vocabulary and its weight include: matching each text vocabulary with each text vocabulary in each scene to obtain the number of each existing text vocabulary in each scene and the number of existing text vocabulary in each scene; calculating the matching value of each scene according to the number of existing text vocabulary in each scene and the weight of each existing text vocabulary in each scene and the critical number of existing text vocabulary in each scene preset in the semantic matching database, the reference weight of each existing text vocabulary in each scene and the allowable deviation weight of each existing text vocabulary in each scene.

[0047] The method for obtaining the matching value of each scene is as follows:

[0048]

[0049] Where, ξM j represents the jth scene matching value, α 6 Indicates the scene matching impact factor corresponding to the number of text words, α 7 Indicates the scene matching impact factor corresponding to the text vocabulary weight, N 1j Indicates the number of text words in the jth scene, N 0j represents the critical number of text words in the jth scene, W(t) 0j represents the weight of text word t in the jth scene, W(t) 1jrepresents the reference weight of text word t in the jth scene, W(t) 2j Represents the allowable deviation weight of text word t in the jth scene, j is the scene number, j = 1, 2, 3, ..., N, N is the total number of scenes, t is the number of each existing text word, t = 1, 2, 3, ..., M, M is the total number of existing text words.

[0050] α 6 and α 7 The scene matching influence factors corresponding to the number of text words and text word weights preset in the semantic matching database are numerical indicators that measure the influence of the above text word factors on the scene matching value. Specifically, there is a mapping relationship table for the number of text words and the text word weight respectively, and the table records each possible text word value and its corresponding scene matching influence factor. These mapping relationships can be one-to-one or many-to-one. In practical applications, when it is necessary to evaluate a scene matching value, the measured number of text words and text word weights can be input into their corresponding mapping relationship tables respectively, and the scene matching influence factors corresponding to these values ​​can be quickly found, where the value range of the influence factor is between 0 and 1.

[0051] In this embodiment, the number of text words in each scene indicates the number of words related to each scene that appear in the text. By comprehensively considering the frequency and weight of each text word, as well as the number and weight of the text words in each scene, the degree of matching of the text in different scenes can be comprehensively evaluated, which not only considers the information of the words themselves, but also considers the importance and influence of the words in different scenes. The matching value of each scene reflects the similarity between the text and other texts in the scene. The higher the matching value, the higher the matching degree of the text in the scene and the closer the semantic relationship with other texts.

[0052] Furthermore, the step of filtering and obtaining the scene to which the target text belongs according to the scene matching values ​​includes: sorting the scene matching values ​​in descending order; and marking the scene with the highest scene matching value as the scene to which the target text belongs.

[0053] In this embodiment, by sorting and selecting the highest matching value, the scene to which the target text most likely belongs can be clearly determined, and by accurately matching the scene, the decision-making process can be optimized and the quality and effect of the decision can be improved.

[0054] Furthermore, the step of obtaining a scene adaptability evaluation value based on a comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs includes: obtaining a critical network performance evaluation value and a critical scene matching value from a semantic matching database; and obtaining a scene adaptability evaluation value based on a comprehensive analysis of the network performance evaluation value, the scene matching value to which the target text belongs, the critical network performance evaluation value and the critical scene matching value.

[0055] In this embodiment, the network performance evaluation value reflects the performance of the network under specific conditions, and the scene matching value to which the target text belongs reflects the degree of matching between the text and the specific scene. The two are interdependent in the comprehensive analysis and jointly determine the level of the scene adaptability evaluation value; the network performance evaluation value focuses on the performance evaluation at the network level, while the scene matching value to which the target text belongs focuses on the matching relationship between the text and the scene. The two complement each other in function and together constitute a complete framework for scene adaptability evaluation. The scene adaptability evaluation value obtained by comprehensive analysis is used to measure the adaptability of a specific text to a specific scene under specific network conditions, and can predict the performance in different application scenarios, providing a reference for future system design and optimization.

[0056] Furthermore, the scene adaptability evaluation value is obtained as follows:

[0057]

[0058] Where ξA represents the scene adaptability evaluation value, α 4 Indicates the scenario adaptability evaluation impact factor corresponding to the network performance evaluation value, α 5 represents the scene adaptability evaluation impact factor corresponding to the scene matching value of the target text, ξP 1 represents the network performance evaluation value, ξP 0 represents the critical network performance evaluation value, ξM 1 represents the scene matching value of the target text, ξM 0 Indicates the critical scene matching value.

[0059] In this embodiment, α 4 and α 5 They are respectively the scene adaptability evaluation influencing factors corresponding to the network performance evaluation values ​​preset in the semantic matching database and the scene matching values ​​to which the target text belongs. These influencing factors are numerical indicators that measure the influence of the above-mentioned scene factors on the scene adaptability evaluation values. Specifically, there is a mapping relationship table for each of the network performance evaluation value and the scene matching value to which the target text belongs. The table records each possible scene factor value and its corresponding scene adaptability evaluation influencing factor. These mapping relationships can be one-to-one or many-to-one. In actual applications, when it is necessary to evaluate a scene adaptability evaluation value, the measured network performance evaluation value and the scene matching value to which the target text belongs can be respectively input into their respective corresponding mapping relationship tables, and the scene adaptability evaluation influencing factors corresponding to these values ​​can be quickly found, where the value range of the influencing factor is between 0 and 1.

[0060] The scene adaptability evaluation impact factor corresponding to the network performance evaluation value is set to 0.3, the scene adaptability evaluation impact factor corresponding to the scene matching value of the target text is set to 0.7, the network performance evaluation value is set to 1.5, the critical network performance evaluation value is set to 1.45, and the critical scene matching value is set to 1.6. When the scene matching value of the target text continues to increase, the scene adaptability evaluation value is calculated. As shown in Table 1, the scene adaptability evaluation value data table based on the information text semantic matching method.

[0061] Table 1. Data table of scene adaptability evaluation value based on information text semantic matching method

[0062] serial number <![CDATA[ξM 1 ]]> ξA 1 1.5 0.983 2 1.55 1.014 3 1.6 1.045 4 1.65 1.077 5 1.7 1.110

[0063] like Figure 2 As shown in Table 1 and Figure 2 It can be seen that when the scene adaptability evaluation influence factor corresponding to the network performance evaluation value, the scene adaptability evaluation influence factor corresponding to the scene matching value to which the target text belongs, the network performance evaluation value, the critical network performance evaluation value and the critical scene matching value remain unchanged, and the scene matching value to which the target text belongs continues to increase, the scene adaptability evaluation value also continues to increase.

[0064] Furthermore, the step of providing evaluation feedback based on the scene adaptability evaluation value includes: obtaining a scene adaptability evaluation threshold from a semantic matching database; comparing the scene adaptability evaluation value with the scene adaptability evaluation threshold; if the scene adaptability evaluation value is greater than or equal to the scene adaptability evaluation threshold, no additional operation is performed; if the scene adaptability evaluation value is less than the scene adaptability evaluation threshold, feedback is provided and the text to be matched is re-preprocessed.

[0065] In this embodiment, the scene adaptability evaluation threshold is a limit value used to measure whether the scene adaptability evaluation value meets specific requirements. The calculated scene adaptability evaluation value is compared with the threshold obtained from the database. If the evaluation value is greater than or equal to the threshold, it is considered that the current text matches the scene to a high degree, and no additional feedback or operation is required; if the evaluation value is less than the threshold, it is considered that the current text matches the scene to a low degree, and the system will generate feedback, indicating that the current text does not match the scene enough. According to the feedback results, the matching text can be re-preprocessed, such as adjusting the text content, optimizing the text format, etc., to improve the matching degree with the scene.

[0066] Furthermore, the steps of determining the semantic similarity between the target text and each corresponding format text to obtain the target format text include: obtaining the hidden layer information of the target text, and calculating the self-information of the text vocabulary based on the hidden layer information of the target text; constructing a semantic representation of the text based on the self-information, converting the text into a vector form based on the vocabulary self-information, and marking it as the semantics of the target text; calculating the semantic similarity between the target text and each corresponding format text to obtain the semantic similarity of each text, and sorting them in descending order according to the semantic similarity of each text, and marking the corresponding format text with the highest text semantic similarity as the target format text.

[0067] In this embodiment, the steps of obtaining the hidden layer information of the target text are as follows:

[0068] h=GET4(J p,q );

[0069] Where h is the embedded representation or hidden state of the target text input, representing the target text J p,q GPT4 is a large-scale multimodal model based on the Transformer structure. It can accept image and text input (but can only output text), and mine text patterns and rules from the corpus through unsupervised learning, extracting text features (i.e., hidden layer representation). After pre-training and fine-tuning, GPT4 has strong language understanding and generation capabilities. It accepts the target text J p,q Input and propagate forward to calculate the output h.

[0070] The self-information of text vocabulary is obtained as follows:

[0071]

[0072] In the formula, I(x) represents the self-information of word x, which measures the uncertainty or information content of word x in a given context C. The larger the self-information, the more unpredictable the appearance of word x in context C, that is, the larger the amount of information it contains. x is the hidden layer information representation of the target text, C represents the context information of the current word x, which is composed of the hidden layer information h of the previous word k-1 and the hidden layer information h of the next word k+1 Composition, where h k-1 and h k+1 Similarly, the input text is encoded by a large language model. P(x|C) represents the probability of semantic x appearing in context C. This probability can be estimated by the vocabulary probability distribution obtained by training a large language model (such as BERT, GPT, etc.). k Represents the hidden layer information of the kth word.

[0073] The specific steps of constructing the semantic representation of the text based on self-information, converting the text into a vector form based on vocabulary self-information, and marking the semantics of the target text are as follows: converting the target text into a vector representation based on vocabulary self-information. Assume that the text T consists of n words, that is, T = {x 1 ,x 2 ,...,x n}, then the semantic representation vector V of the text T T Can be constructed as: V T =[I(x 1 ),I(x 2 ),...,I(x n )]; where V T V is the semantic representation vector of the text T. It is a one-dimensional vector. Each element of the vector corresponds to the self-information of a word in the text T. T By integrating the self-information of all words in the text, a quantitative representation of the overall semantics of the text is provided, which can be obtained by arranging the self-information into a one-dimensional vector according to the order of the words in the text; a is the ath word in the text T, which is the basic unit for calculating self-information and can also represent word x a This representation method simplifies the text into a one-dimensional vector, and each element of the vector corresponds to the self-information of a word in the text; the text T is a sequence composed of n words, that is, the target text for semantic representation. The text T usually comes from actual text data, such as user input, document content, etc. Before semantic representation, the text needs to be preprocessed, such as word segmentation, stop word removal, etc., to obtain a sequence composed of words; I(x a ) represents the word x a The self-information of word x a The uncertainty or amount of information in a given context, the greater the self-information, the more likely the word x is to be a The more unpredictable its appearance in context, the more information it contains.

[0074] Calculate the semantic similarity between the target text and each corresponding format text to obtain the semantic similarity of each text, which can be achieved by using a sentence matching device for semantic relationship (multi-head attention), and calculate the final matching result by cosine similarity. The specific steps of the sentence matching device for semantic relationship are: Among them, Q, K, V T are the semantic representations of query text, key text, and value text, respectively. k is the dimension of the key text, V represents the feature value obtained after attention processing, K Tis the transposition operation on the key text. Q represents the semantic representation of the query, which is a matrix in which each row represents a query vector. In the multi-head attention mechanism, the query vector is used to match the key vector to calculate the attention weight. Q is usually obtained by converting the query text (which may be a sentence, paragraph, or the entire document) into a vector representation through an embedding layer (such as word embedding or sentence embedding), and then undergoing a linear transformation (which may include a weight matrix and a bias term); K represents the semantic representation of the key. Similar to Q, it is also a matrix in which each row represents a key vector. The key vector is used to perform a dot product operation with the query vector to calculate the attention weight. In practical applications, the query text and the key text may be the same (such as in the self-attention mechanism) or different (such as in the encoder-decoder attention mechanism); V T is the semantic representation vector of text T; d k represents the dimension of the key vector K, that is, the number of columns of the Q and K matrices. In the multi-head attention mechanism, d k Used to scale the result of the dot product operation to prevent the gradient from disappearing or exploding. k is a hyperparameter, usually set according to the scale of the model and the requirements of the task. In practical applications, d k The size of is used to control the complexity and performance of the model; It is the core of the multi-head attention mechanism, which calculates the attention weight between the query vector Q and the key vector K. First, through the dot product operation (QK T ) calculates the similarity between the query vector and the key vector, and then divides the similarity result by The scaled similarity is then converted into a probability distribution, i.e., the attention weight, through the softmax function.

[0075] The specific steps for calculating the final matching result by cosine similarity include:

[0076] V→abs(prediction-label)≥0;

[0077]

[0078] f(V)=max(0,k(VV 0 ));

[0079]

[0080] In the formula, S cos Represents vector V 1 and V 2The final matching result, abs(b) function is to take the absolute value of b, max(c, d) means to take the maximum value of c and d, cosine similarity is an indicator to measure the similarity of two vector directions, and its value range is between [-1, 1]; V represents the feature value obtained after attention processing, which is the feature vector after attention mechanism processing, V 1 and V 2 Represent the embedding vectors of the target text semantics and the response format text semantics respectively. When V 0 ≤V, the loss is k(VV 0 ), where k is a parameter that controls the slope; the f(V) function ensures that the loss is never negative and only increases when V 0 Increase when ≤V, V 0 is an adjustable threshold that determines the point at which the loss function starts to impose penalties, d represents the dimension of the key vector K; prediction represents the predicted output of the model, and label represents the actual target value or label. prediction is the prediction result of the model for the input data, and label is the actual value corresponding to the input data. Finally, the best matching response format text is selected as the target format text.

[0081] like Figure 3 As shown, it is a structural diagram of the information text semantic matching system based on natural language processing technology provided in an embodiment of the present application. The information text semantic matching system based on natural language processing technology provided in an embodiment of the present application includes: a text acquisition module, a performance evaluation module, a scene matching module, a scene evaluation module, a text evaluation module and a semantic matching database.

[0082] In summary, the embodiment of the present application obtains the preprocessed text to be matched and marks it as the target text; obtains the network performance data during preprocessing, and obtains the network performance evaluation value based on the comprehensive analysis of the network performance data during preprocessing; extracts the target text keywords to obtain each text word, assigns weights according to the meaning of each text word, and obtains each scene matching value based on each text word and the weight of each text word; obtains the scene to which the target text belongs according to the matching value of each scene, obtains the scene adaptability evaluation value based on the comprehensive analysis of the network performance evaluation value and the scene matching value to which the target text belongs, and performs evaluation feedback based on the scene adaptability evaluation value; obtains each corresponding format text of the scene to which the target text belongs, and determines the semantic similarity between the target text and each corresponding format text to obtain the target format text, and provides feedback based on the target format text, thereby improving the recall rate and accuracy of text matching.

[0083] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0088] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An information text semantic matching method based on natural language processing technology, characterized in that: The following steps are involved: Get the preprocessed text to be matched and mark it as the target text; Acquire network performance data during preprocessing, and obtain a network performance evaluation value based on comprehensive analysis of the network performance data during preprocessing; Extract the target text keywords to obtain each text word, assign weights according to the meanings of each text word, and calculate each scene matching value according to each text word and its weight; The scene to which the target text belongs is obtained by screening according to the matching values ​​of each scene, the scene adaptability evaluation value is obtained by comprehensive analysis based on the network performance evaluation value and the scene matching value to which the target text belongs, and evaluation feedback is provided based on the scene adaptability evaluation value; Obtain each corresponding format text of the scene to which the target text belongs, determine the semantic similarity between the target text and each corresponding format text, obtain the target format text, and provide feedback based on the target format text.

2. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of obtaining a network performance evaluation value by comprehensive analysis of the network performance data during preprocessing comprises: The network performance data during the preprocessing includes network delay, network jitter and throughput; Obtain critical network delay, critical network jitter, and critical throughput from the semantic matching database; The network performance evaluation value is obtained through comprehensive analysis.

3. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of extracting target text keywords to obtain each text vocabulary comprises: Obtain the total number of words in the target text, and count the occurrence frequency of each text word in the target text and the inverse document frequency of each text word; The occurrence frequency of each text word is multiplied by the inverse document frequency of each text word to obtain the weight of each text word, and the text words are sorted in descending order according to the weight of each text word to obtain each text word according to the sorting.

4. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of assigning weights according to the meanings of the text words and calculating the matching values ​​of the scenes according to the text words and the weights of the text words comprises: Match each text word with each text word in each scene to obtain the number of each existing text word in each scene and the number of text words in each scene; The matching value of each scene is calculated based on the number of text words in each scene and the weight of each text word in each scene, the critical number of text words in each scene preset in the semantic matching database, the reference weight of each text word in each scene and the allowable deviation weight of each text word in each scene.

5. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of filtering and obtaining the scene to which the target text belongs according to the scene matching values ​​includes: Sort the matching values ​​of each scene in descending order; The scene with the highest matching value among all scenes is marked as the scene to which the target text belongs.

6. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of obtaining the scene adaptability evaluation value by comprehensive analysis based on the network performance evaluation value and the scene matching value to which the target text belongs comprises: Obtain critical network performance evaluation values ​​and critical scenario matching values ​​from a semantic matching database; The scene adaptability evaluation value is obtained by comprehensive analysis of the network performance evaluation value, the scene matching value of the target text, the critical network performance evaluation value and the critical scene matching value.

7. The information text semantic matching method based on natural language processing technology as claimed in claim 6, characterized in that: The scene adaptability evaluation value is obtained as follows: Wherein, ξA represents the scene adaptability evaluation value, α4 represents the scene adaptability evaluation influencing factor corresponding to the network performance evaluation value, α5 represents the scene adaptability evaluation influencing factor corresponding to the scene matching value to which the target text belongs, ξP1 represents the network performance evaluation value, ξP0 represents the critical network performance evaluation value, ξM1 represents the scene matching value to which the target text belongs, and ξM0 represents the critical scene matching value.

8. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of providing evaluation feedback according to the scene adaptability evaluation value comprises: Obtaining a scene adaptability evaluation threshold from a semantic matching database; The scene adaptability evaluation value is compared with the scene adaptability evaluation threshold. If the scene adaptability evaluation value is greater than or equal to the scene adaptability evaluation threshold, no additional operation is performed. If the scene adaptability evaluation value is less than the scene adaptability evaluation threshold, feedback is given and the matching text is preprocessed again.

9. The information text semantic matching method based on natural language processing technology as claimed in claim 1, characterized in that: The step of determining the semantic similarity between the target text and each corresponding format text to obtain the target format text comprises: Obtaining hidden layer information of the target text, and calculating the self-information of the text vocabulary according to the hidden layer information of the target text; Constructing semantic representation of text based on self-information, converting text into vector form based on lexical self-information, and marking it as the semantics of target text; The semantic similarity between the target text and each corresponding format text is calculated to obtain the semantic similarity of each text, and the corresponding format text with the highest text semantic similarity is marked as the target format text.

10. An information text semantic matching system based on natural language processing technology, applying the information text semantic matching method based on natural language processing technology as claimed in any one of claims 1 to 9, characterized in that: It includes a text acquisition module, a performance evaluation module, a scene matching module, a scene evaluation module, a text evaluation module and a semantic matching database; The text acquisition module is used to acquire the pre-processed text to be matched and mark it as the target text; The performance evaluation module is used to obtain the network performance data during preprocessing, and obtain the network performance evaluation value based on the comprehensive analysis of the network performance data during preprocessing; The scene matching module is used to extract target text keywords, obtain various text words, assign weights according to the meanings of various text words, and calculate various scene matching values ​​according to various text words and their weights; The scenario evaluation module is used to filter and obtain the scenario to which the target text belongs according to the scenario matching values, obtain the scenario adaptability evaluation value according to the comprehensive analysis of the network performance evaluation value and the scenario matching value to which the target text belongs, and provide evaluation feedback according to the scenario adaptability evaluation value; The text evaluation module is used to obtain each corresponding format text of the scene to which the target text belongs, and to determine the semantic similarity between the target text and each corresponding format text, to obtain the target format text, and to provide feedback based on the target format text.

Citation Information

Patent Citations

  • A method and apparatus for text semantic matching

    CN108132931B

  • Text matching method and system based on joint multi-semantic information

    CN117892733A

Cited By

  • Equipment moving method and system with autonomous navigation function

    CN121384027A

  • Method and system for device movement with autonomous navigation

    CN121384027B