International trade contract intelligent auditing system based on natural language processing
Through the intelligent international trade contract audit system based on natural language processing, the problem of meaningless vocabulary interference in contract text and regulatory standard text is solved, the accuracy of keyword extraction and the closeness of text correlation is achieved, and the quality and efficiency of international trade contract audit is improved.
Patent Information
- Application Number
- CN202510476299.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the review of existing technology, due to the large number of vocabulary without practical meaning in the contract text and the legal and regulatory standard text, the vocabulary relationship is inaccurate, which affects the reliability and efficiency of the audit results.
An intelligent international trade contract audit system based on natural language processing is adopted, including a data acquisition preprocessing module, a keyword vocabulary extraction module, a keyword vocabulary analysis and filtering module, and text similarity correlation module. Through word segmentation, segmentation, vocabulary frequency statistics and word vector models, meaningless vocabulary is eliminated, keyword vectors are constructed and the same definition is mapped, and the included cosine value is calculated for text correlation.
It improves the accuracy and efficiency of contract audits, ensures the reliability of audit basis, provides clear comparison clues, and improves the steady development of international trade business.
Smart Images

Figure CN120337921A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent contract auditing, and more specifically, to an intelligent international trade contract auditing system based on natural language processing. Background Art
[0002] In international trade business, in order to achieve efficient auditing of new contracts, enterprises will integrate multi-source data into the enterprise database. This measure aims to help auditors quickly retrieve historical contract cases, policy and regulation bases, and industry background information when facing new contracts, so as to accurately judge the rationality and compliance of contract terms, comprehensively improve the quality and efficiency of contract auditing, and provide strong support for the stable development of enterprises' international trade business.
[0003] However, in the prior art, before contract auditing, vocabulary is usually extracted from the contract text and the regulatory standard text respectively and then associated to enable staff to carry out auditing work more efficiently. However, this method has significant drawbacks. Since there are a large number of meaningless words in the contract text and the regulatory standard text, if the key words cannot be extracted during the extraction process, inaccurate situations will occur during the vocabulary association process, resulting in deviations in the auditing basis and affecting the reliability of the auditing results and the efficient progress of the auditing work. In view of this, we propose an intelligent international trade contract auditing system based on natural language processing. Summary of the Invention
[0004] The purpose of the present invention is to solve the problem that in international trade business, enterprises expect to efficiently audit new contracts. Therefore, it is necessary to integrate multi-source data into the enterprise database to help auditors quickly retrieve historical cases, regulatory bases, and industry backgrounds, accurately judge the rationality and compliance of contracts, improve the quality and efficiency of auditing, and promote the stable development of the business. However, when the prior art extracts and associates vocabulary from contract and regulatory texts, due to the interference of a large number of meaningless words, it is easy to cause inaccurate associations and deviations in the auditing basis, affecting the reliability and efficiency of auditing.
[0005] To achieve the above purpose, the present invention provides an intelligent international trade contract auditing system based on natural language processing, including a data acquisition and preprocessing module, a keyword extraction module, a keyword analysis and screening module, and a text similarity association module, wherein:
[0006] The keyword extraction module determines the set of keyword in a paragraph; analyzes the definitions and parts of speech of the words in the keyword set, and if the keyword is not a noun, it is removed from the keyword set; the text similarity association module constructs keyword vectors, calculates the cosine values of the angles between the keyword vectors in the contract terms and all the keyword vectors in the regulatory standard text in turn, and associates the corresponding paragraphs; when constructing the word vectors, the keyword vectors with the same definition are mapped to the same keyword vector.
[0007] As a further improvement of this technical solution, the data acquisition and preprocessing module includes a text tokenization unit and a text segmentation unit;
[0008] The text tokenization unit establishes connections with an online vocabulary dictionary and an enterprise database through network communication technology, obtains a large number of words in the online vocabulary dictionary, contract texts and regulatory standard texts in the enterprise database, and then tokenizes the text using the words in the online vocabulary dictionary;
[0009] The text segmentation unit uses the symbol indicating the end of a paragraph as the segmentation rule and segments the text according to the segmentation rule.
[0010] As a further improvement of this technical solution, the text tokenization unit specifically uses the forward maximum matching method for text tokenization. The specific steps are as follows:
[0011] Step 1: Set the maximum word length: Use the longest word length in the online vocabulary dictionary as the maximum word length. If the longest word length in the online vocabulary dictionary is , then the maximum word length is ;
[0012] Step 2: Match from left to right: Start from the leftmost side of the text to be tokenized, take a string with a length of , and check if the string exists in the vocabulary dictionary;
[0013] If it exists, then use the string as a word. If it does not exist, reduce the length of the string by , and search in the vocabulary dictionary again;
[0014] Step 3: Continuously repeat the above steps. Each time, continue to select a string to the right from the position of the previous match until the entire text is tokenized.
[0015] As a further improvement of this technical solution, the text segmentation unit traverses the characters in the text. When encountering a symbol that conforms to the segmentation rule, it takes the text before the symbol as a paragraph. If there is still text afterwards, it starts from the characters after the segmentation and continues to find the end symbol of the next paragraph until the end of the text, and divides the text into multiple paragraphs according to the segmentation rule.
[0016] As a further improvement of this technical solution, in the keyword extraction module, the frequency of a word appearing in a paragraph is calculated by the word frequency statistics method to analyze the importance of the word; if the frequency of a word appearing in a paragraph is higher and the frequency of the word appearing in other paragraphs is lower, then the word is determined as the keyword in the corresponding paragraph. The calculation formula is as follows:
[0017] Perceived word in paragraph The number of occurrences in , paragraph The total number of words is , then the word in paragraph The word frequency in is: ;
[0018] The total number of paragraphs in the perceived text is , including the word The number of paragraphs is , to avoid a denominator of 0, add to the denominator, then the text inverse paragraph frequency ;
[0019] When multiple words appear in paragraph , multiply the paragraph word frequency and the text inverse paragraph frequency to get the word in paragraph The comprehensive score ;
[0020] The described keyword extraction module calculates the comprehensive score of each word in the paragraph respectively, sorts them in descending order, and selects the top words as the keyword set in the corresponding paragraph.
[0021] As a further improvement of this technical solution, the keyword analysis and screening module trains a word vector model to combine the word vectors of all keywords in the keyword set, adds the word vectors of all words in the keyword set, and then divides by the number of words to obtain an average vector as the context vector. Its expression is as follows:
[0022] Perceive that there are keywords in the keyword set, which are respectively . Calculate the word vectors of all keywords in the keyword set through the word vector model as: , the context vector is: ;
[0023] Calculate the similarity between each adjacent paraphrase of the keyword and the context vector, and select the paraphrase with the highest similarity as the paraphrase of the keyword in the keyword vector;
[0024] Perceive a paraphrase of the keyword . Calculate its corresponding paraphrase vector through the word vector model as , the context vector is , then the paraphrase vector and the context vector The calculation formula is: ;
[0025] Among them, is the dot product of two vectors, and are respectively the norms of vectors and ;
[0026] When determining the interpretation of the keyword , traverse all its interpretations , calculate the similarity between each interpretation vector and the context vector respectively , and select the interpretation with the largest similarity value as the interpretation of the keyword in the current context.
[0027] As a further improvement of the technical solution, the text similarity association module includes a keyword vector calculation unit and a vocabulary same-interpretation mapping unit;
[0028] The keyword vector calculation unit senses the frequency of each paragraph keyword in the keyword vocabulary analysis and screening module in the text, and constructs a keyword vector for the associated vocabulary set in each paragraph according to the frequency;
[0029] Calculate the cosine value of the angle between the keyword vector in the contract clause and all keyword vectors in the regulatory standard text in turn. The smaller the angle, the closer the cosine value is , it is determined that the two vectors are more similar, that is, the similarity of the two keyword vocabulary sets is the largest. At this time, retrieve the paragraph corresponding to the keyword vector in the contract clause and the paragraph with the largest similarity between the regulatory standard text and the paragraph in the contract clause, and associate the two paragraphs.
[0030] As a further improvement of the technical solution, the vocabulary same-interpretation mapping unit senses the vocabulary with the same interpretation in the keyword vocabulary analysis and screening module. When the keyword vector calculation unit constructs the word vector, the vectors of the keyword vocabulary with the same interpretation in the contract clause and the regulatory standard text are mutually mapped to the same keyword vector.
[0031] Compared with the prior art, the beneficial effects of the present invention:
[0032] In the intelligent audit system for international trade contracts based on natural language processing, the data acquisition and preprocessing module tokenizes and segments the contract text and the regulatory standard text respectively. The keyword extraction module extracts the set of keyword in each paragraph through the vocabulary frequency statistics method. To prevent inaccurate sets of keywords extracted by the keyword extraction module, the keyword analysis and screening module analyzes the meanings of each keyword in the corresponding paragraph, and eliminates the keywords that are not nouns from the set of keywords. The keyword analysis and screening module provides the basis for the same meaning mapping unit of vocabulary, and the latter unifies the vectors of the same meaning words, so that the contract and the regulatory text are deeply associated in terms of vocabulary semantics;
[0033] The keyword vector calculation unit calculates the cosine values of the angles between the keyword vectors in the contract terms and all the keyword vectors in the regulatory standard text in turn, and determines the paragraphs that are mutually related between the contract terms culture and the regulatory standard text in turn. Before that, the same meaning mapping unit of vocabulary maps the vectors of the keywords with the same meaning to the same keyword vectors according to the meanings of each keyword in the keyword analysis and screening module. The same meaning mapping unit of vocabulary unifies the vectors of the same meaning words, so that the contract and the regulatory text are deeply associated in terms of vocabulary semantics, making the semantic association between the contract and the regulatory text closer at the vocabulary level and improving the accuracy of text association.
[0034] In addition to the purposes, features and advantages described above, the present invention has other purposes, features and advantages. The present invention will be further described in detail below with reference to the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is the overall module schematic diagram of the present invention;
[0036] Figure 2 It is the working principle flow chart of the present invention;
[0037] Figure 3 It is the schematic diagram of the data acquisition and preprocessing module of the present invention.
[0038] The meanings of the various labels in the figure are as follows:
[0039] 100. Data acquisition and preprocessing module; 110. Text tokenization unit; 120. Text segmentation unit; 200. Keyword extraction module; 300. Keyword analysis and screening module; 400. Text similarity association module; 410. Keyword vector calculation unit; 420. Same meaning mapping unit of vocabulary. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0041] Embodiment 1, refer to Figures 1 - 3 An intelligent review system for international trade contracts based on natural language processing, including a data acquisition and preprocessing module 100, a keyword extraction module 200, a keyword analysis and screening module 300, and a text similarity association module 400;
[0042] In international trade business, in order to achieve efficient review of new contracts, enterprises will integrate multi-source data into the enterprise database. This measure aims to help reviewers quickly retrieve historical contract cases, policy and regulatory bases, and industry background information when facing new contracts, and then accurately judge the rationality and compliance of contract terms, comprehensively improve the quality and efficiency of contract review, and provide strong support for the steady development of the enterprise's international trade business;
[0043] However, in the prior art, before contract review, vocabulary is usually extracted from contract texts and regulatory standard texts respectively and then associated to enable staff to carry out review work more efficiently. However, this method has significant drawbacks. Since there are a large number of meaningless words in contract texts and regulatory standard texts, if keywords cannot be extracted during the extraction process, inaccurate situations will occur during the vocabulary association process, resulting in deviations in the review basis and affecting the reliability of the review results and the efficient progress of the review work.
[0044] The data acquisition and preprocessing module 100 includes a text word segmentation unit 110 and a text segmentation unit 120;
[0045] The text word segmentation unit 110 establishes connections with an online vocabulary dictionary and an enterprise database through network communication technologies, obtains a large number of words in the online vocabulary dictionary, contract texts and regulatory standard texts in the enterprise database, and then segments the text using the words in the online vocabulary dictionary;
[0046] The network communication transmission control protocol / Internet protocol in the text word segmentation unit 110, and the transmission control protocol / Internet protocol family includes multiple layers. Among them, the Internet protocol is responsible for identifying devices in the network and routing data, transmitting data packets from the source device to the target device, and the transmission control protocol provides a reliable, connection-oriented data transmission service on the basis of the Internet protocol to ensure the integrity and order of data;
[0047] The text tokenization unit 110 sends a request message to the online vocabulary dictionary and the enterprise database server. After receiving the request, the online vocabulary dictionary and the enterprise database server perform verification. After successful verification, they return a response message to the text tokenization unit 110, thereby establishing a connection.
[0048] After the text tokenization unit 110 establishes a connection with the online vocabulary dictionary and the enterprise database server, the vocabulary in the online vocabulary dictionary, the contract texts and the regulatory standard texts in the enterprise database are transmitted to the text tokenization unit 110 in the form of data packets over the network.
[0049] The text tokenization unit 110 specifically adopts the forward maximum matching method for text tokenization. The specific steps are as follows:
[0050] Step 1: Set the maximum vocabulary length: Use the longest vocabulary length in the online vocabulary dictionary as the maximum vocabulary length. If the longest vocabulary length in the online vocabulary dictionary is , then the maximum vocabulary length is .
[0051] Step 2: Match from left to right: Starting from the leftmost side of the text to be tokenized, take a string of length and check if the string exists in the vocabulary dictionary.
[0052] If it exists, then regard the string as a vocabulary. If it does not exist, then reduce the length of the string by and search in the vocabulary dictionary again.
[0053] Step 3: Continuously repeat the above steps. Each time, continue to select a string to the right from the position of the previous match until the entire text tokenization is completed.
[0054] The text segmentation unit 120 uses the symbol indicating the end of a paragraph as the segmentation rule. The text segmentation unit 120 traverses the characters in the text. When encountering the symbol in the segmentation rule, it regards the text before the symbol as a paragraph. If there is still text afterwards, it starts from the characters after the segmentation and continues to find the end symbol of the next paragraph until the end of the text, thereby dividing the text into multiple paragraphs according to the segmentation rule.
[0055] The text segmentation unit 120 provides an accurate paragraph range for the word frequency statistics method in the keyword extraction module 200, making the calculation of the frequency and rarity of words in a paragraph more accurate, and extracting the keyword representing the core of the paragraph.
[0056] At the same time, through segmentation, each paragraph is relatively independent, and its core content is more prominent. When the keyword extraction module 200 extracts keywords and the keyword analysis and screening module 300 analyzes the meanings of each keyword in the keyword set, it can more accurately grasp the key points of the paragraph, providing clear and targeted information for subsequent contract review.
[0057] The keyword extraction module 200 calculates the occurrence frequency of a vocabulary in a paragraph using the vocabulary frequency statistics method, and determines the keyword in the paragraph according to the occurrence frequency of each vocabulary;
[0058] If the frequency of a vocabulary in a paragraph is higher and the frequency in other paragraphs is lower, the vocabulary is determined as the keyword in the corresponding paragraph. The calculation formula of the vocabulary frequency statistics method is as follows:
[0059] Perceived vocabulary The number of times it appears in the paragraph is , the total number of vocabularies in the paragraph is , then the vocabulary frequency of the vocabulary in the paragraph is: ;
[0060] The total number of paragraphs in the perceived text is , the number of paragraphs containing the vocabulary is . To avoid a zero denominator, add to the denominator, then the inverse document frequency ;
[0061] When there are multiple vocabularies in the current paragraph , multiply the paragraph vocabulary frequency and the inverse document frequency to obtain the comprehensive score of the vocabulary in the paragraph ;
[0062] The keyword extraction module (200) calculates the comprehensive score of each vocabulary in the paragraph, sorts them in descending order, and selects the top vocabularies as the keyword set in the corresponding paragraph.
[0063] Since contract texts and regulatory standard texts are usually long and complex in content, containing a large number of vocabularies, the keyword extraction module 200 screens out the vocabularies closely related to the core content of the paragraph through the vocabulary frequency statistics method. Because in a paragraph, keywords often appear multiple times while having a lower frequency in other paragraphs, and keywords can better represent the theme and key points of the paragraph.
[0064] Meanwhile, the present invention fully considers the potential problems existing in the vocabulary frequency statistics method adopted by the keyword extraction module 200 during the process of determining the keyword set. Since the content of contract texts and regulatory standard texts is complex, if the frequency of meaningless words (such as modal particles, common connecting words, etc.) in the text is abnormally high, according to the conventional vocabulary frequency statistics rules, the meaningless words will be misjudged as keywords, affecting the judgment of the associated content between the contract text and the regulatory standard text by the text similarity association module 400. Therefore, the keyword analysis and screening module 300 senses the keyword set, analyzes the definitions of each keyword in the keyword set, senses the online vocabulary dictionary in the text tokenization unit 110, and retrieves the part of speech of the definition corresponding to each keyword in the online vocabulary dictionary. If the word is not a noun, the keyword that is not a noun is removed from the keyword set.
[0065] Nouns are the main vocabulary category that carries the core content and key information in the text. By removing non-noun keywords, it is possible to avoid the situation where inaccurate keyword sets are generated due to the high-frequency interference of meaningless words being included in the keyword set.
[0066] The keyword analysis and screening module 300 uses a large-scale corpus to train a word vector model. The word vector model combines the word vectors of all keywords in the keyword set, adds up the word vectors of all words in the keyword set, and then divides by the number of words to obtain an average vector as the context vector. Its expression is as follows:
[0067] Sense that there are keywords in the keyword set, which are respectively . Calculate the word vectors of all keywords in the keyword set through the word vector model as: . The context vector is: ;
[0068] Calculate the similarity between each adjacent definition of the keyword and the context vector, and select the definition with the highest similarity as the definition of the keyword in the keyword vector.
[0069] Sense a definition of the keyword . Calculate its corresponding definition vector through the word vector model as . The context vector is . Then the calculation formula for the definition vector and the context vector is: ;
[0070] Among them, is the dot product of the two vectors, and They are respectively vectors and moduli;
[0071] When determining the interpretation of keyword , traverse all its interpretations ( is the number of interpretations), calculate the similarity between each interpretation vector and the context vector , and select the interpretation with the largest similarity value as the interpretation of the keyword in the current context. In contract and regulatory texts, words often have multiple meanings, which can easily lead to misunderstandings. By traversing all the interpretations of keywords, calculating the similarity between each interpretation vector and the context vector, and selecting the interpretation with the highest similarity, the meaning of words in the current context can be accurately determined, thus avoiding the situation of incorrectly excluding meaningless words when filtering out meaningless words.
[0072] The keyword analysis and screening module 300 trains a word vector model. The core idea of the word vector model is to represent keywords as vectors, so that keywords with similar semantics are close in the vector space. By training on a large-scale corpus, the word vector model can learn the semantic and syntactic relationships between words;
[0073] The working steps and calculation formulas of the word vector model are as follows:
[0074] Step 1: Obtain a large-scale corpus through the network communication technology in the text segmentation unit 110, segment the corpus using the online dictionary, and segment the text in the corpus by the text segmentation unit 120 to obtain individual words;
[0075] Select keywords in the corpus text through the keyword extraction module 200 to construct a vocabulary list;
[0076] Step 2: Define model parameters: the weight matrix from the input layer to the hidden layer (with a dimension of ): where is the dimension of the keyword vector. For each keyword in the keyword vocabulary, its corresponding row vector is the input keyword vector of the keyword;
[0077] The weight matrix from the hidden layer to the output layer (with a dimension of ): Each of its column vectors is an output keyword vector;
[0078] Step 3: Generate training samples: For each keyword in the corpus, use it as the central keyword, and select the keywords within a certain window size (denoted as ) around it as context keywords to generate training samples;
[0079] For example, for the sentence "I like natural language processing", if the window size , taking "like" as the central keyword, its context keywords are "I" and "natural language processing", then training samples ("like", "I") and ("like", "natural language processing") are generated;
[0080] Step 4: Forward propagation: Sense that the current central keyword is , and its corresponding input keyword vector is (which is the th row vector in the weight matrix);
[0081] Hidden layer output: Since the input keyword vector is directly used as the input to the hidden layer, the hidden layer output is ;
[0082] Output layer score: Calculate the output layer score vector , , where has a dimension of , represents the score for predicting the th keyword as a context keyword;
[0083] Output layer probability distribution: Convert the score vector to a probability distribution through the function, and the calculation formula is:
[0084] ;
[0085] where is the th column vector of the weight matrix;
[0086] Step 5: Calculate the loss function: Sense that the true context keyword of the current training sample is , and use the cross-entropy loss function. The loss is: ;
[0087] Step 6: Backward propagation: Calculate the gradient from the output layer to the hidden layer: ;
[0088] Calculate the gradient of the weight matrix from the input layer to the hidden layer: in which only the th row is non-zero, and the value of the th row is ;
[0089] Calculate the weight matrix from the hidden layer to the output layer Gradient of ;
[0090] where is the true label vector, and only the -th element is , and the rest of the elements are ;
[0091] Step 7: Parameter update: Update the weight matrices and using the gradient descent algorithm; Set the learning rate to , then the update formula is:
[0092] ;
[0093] ;
[0094] By continuously repeating Step , train on a large-scale corpus until the model converges to obtain the keyword vectors for each keyword.
[0095] The text similarity association module 400 includes a keyword vector calculation unit 410 and a same-interpretation mapping unit 420 for vocabulary;
[0096] The keyword vector calculation unit 410 senses the frequency of each paragraph keyword in the keyword vocabulary analysis and screening module 300 in the text, and constructs the associated vocabulary set in each paragraph as a keyword vector according to the frequency;
[0097] Calculate the cosine value of the angle between the keyword vector in the contract terms and all keyword vectors in the regulatory standard text in sequence. The smaller the angle, the closer the cosine value is to , then it is determined that the two vectors are more similar, that is, the similarity of the two keyword vocabulary sets is the largest;
[0098] Retrieve the paragraph corresponding to the keyword vector in the contract terms and the paragraph with the largest similarity between the regulatory standard text and the paragraph in the contract terms, and associate the two paragraphs. The keyword vector calculation unit 410, based on the accurate keywords extracted in the previous steps, establishes an effective association between the contract terms and the regulatory standard text by constructing keyword vectors and calculating the cosine value of the angle, enabling the independent contract paragraphs and regulatory paragraphs to establish connections based on semantic similarity, providing clear comparison clues for the reviewers, and solving the problem of inaccurate vocabulary association in traditional methods. The specific calculation formula is as follows:
[0099] Sense the keyword vector of paragraph in the contract terms, and the keyword vector corresponding to paragraph , calculate the cosine value of the angle between keyword vectors:
[0100] ;
[0101] Among them, is the dot product between paragraph and paragraph : ;
[0102] and are the modulus lengths: ; ;
[0103] The same-interpretation mapping unit 420 of lexical items senses the lexical items with the same interpretation in the keyword analysis and screening module 300. When the keyword vector calculation unit 410 constructs word vectors, the vectors of the keyword lexical items with the same interpretation in the contract terms and the regulatory standard texts are mutually mapped to the same keyword vectors, and its expression is as follows:
[0104] Sense the keyword lexical items in the contract terms and the regulatory standard texts and The vectors of which are and , the keyword lexical items and have the interpretations of and . If when, then . After the vectors of the keyword lexical items with the same interpretation are mutually mapped, the situation where the calculation of the cosine value of the angle in the keyword vector calculation unit 410 is inaccurate is avoided, enabling the keyword vector calculation unit 410 to more directly reflect the semantic consistency of these lexical items, thereby strengthening the semantic connection between the contract and the regulations.
[0105] The above shows and describes the basic principle, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and the descriptions in the specification are only the preferred examples of the present invention and are not used to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent review system for international trade contracts based on natural language processing, characterized in that, It includes a data acquisition and preprocessing module (100), a keyword extraction module (200), a keyword analysis and screening module (300), and a text similarity association module (400), where: The keyword extraction module (200) determines the keyword set in a paragraph; the (300) analyzes the definitions and parts of speech of the words in the keyword set, and if a keyword is not a noun, it is removed from the keyword set; the text similarity association module (400) constructs keyword vectors, calculates the cosine values of the angles between the keyword vectors in the contract terms and all keyword vectors in the regulatory standard text in sequence, and associates the corresponding paragraphs; when constructing word vectors, the keyword vectors with the same definition are mapped to the same keyword vector.
2. The intelligent review system for international trade contracts based on natural language processing according to claim 1, wherein: The data acquisition and preprocessing module (100) includes a text tokenization unit (110) and a text segmentation unit (120); The text tokenization unit (110) establishes connections with an online vocabulary dictionary and an enterprise database through network communication technology, obtains a large number of words in the online vocabulary dictionary, contract texts and regulatory standard texts in the enterprise database, and then tokenizes the text using the words in the online vocabulary dictionary; The text segmentation unit (120) uses the symbol indicating the end of a paragraph as the segmentation rule and segments the text according to the segmentation rule.
3. The intelligent review system for international trade contracts based on natural language processing according to claim 2, characterized in that: The text tokenization unit (110) specifically uses the forward maximum matching method for text tokenization, and the specific steps are as follows: Step 1: Set the maximum word length: Use the longest word length in the online dictionary as the maximum word length. If the longest word length in the online dictionary is , then the maximum word length is ; Step 2: Matching from left to right: Starting from the leftmost of the text to be segmented, take a string with a length of and check whether the string exists in the vocabulary dictionary; If it exists, use the string as a vocabulary item. If it does not exist, subtract the length of the string , and look it up in the vocabulary dictionary again; Step 3: Continuously repeat the above steps, and each time select a string for matching starting from the position of the previous match to the right until the entire text tokenization is completed.
4. The intelligent review system for international trade contracts based on natural language processing according to claim 3, wherein: The text segmentation unit (120) traverses the characters in the text. When encountering a symbol that conforms to the segmentation rule, the text before the symbol is taken as a paragraph. If there is still text afterwards, start from the characters after the segmentation and continue to find the end symbol of the next paragraph until the end of the text, and divide the text into multiple paragraphs according to the segmentation rule.
5. The intelligent review system for international trade contracts based on natural language processing according to claim 4, wherein: In the keyword extraction module (200), the importance of a word is analyzed by calculating the frequency of the word appearing in a paragraph through the word frequency statistics method; if the frequency of a word appearing in a paragraph is higher and the frequency of the word appearing in other paragraphs is lower, then the word is determined as a keyword in the corresponding paragraph, and its calculation formula is as follows: Perceived vocabulary appears times in the paragraph ; the total number of words in the paragraph is ; then the word frequency of the word in the paragraph is: ; The total number of paragraphs in the perceived text is , and the number of paragraphs containing the vocabulary is . To avoid a denominator of 0, add to the denominator. Then the inverse document frequency of the text ; When multiple words appear in a paragraph, multiply the paragraph word frequency and the text inverse paragraph frequency to obtain the word in the paragraph When multiple words appear in a paragraph The comprehensive score in the paragraph ; The keyword extraction module (200) calculates the comprehensive score of each word in the paragraph respectively, sorts them in descending order, and selects the words ranked among the top as the keyword set in the corresponding paragraph.
6. The intelligent international trade contract intelligent review system based on natural language processing according to claim 5, characterized in that: The keyword analysis and screening module (300) trains a word vector model to combine the word vectors of all keywords in the keyword set, adds up the word vectors of all words in the keyword set, and then divides by the number of words to obtain an average vector as the context vector, and its expression is as follows: There are keyword entries in the perceived keyword entry set, which are respectively . The word vectors of all keyword entries in the keyword entry set are calculated through the word vector model as: . The context vector is: ; Calculate the similarity between each definition of the keyword adjacent to the context vector, and select the definition with the highest similarity as the definition of the keyword in the keyword vector; Perceived keyword One paraphrase , and its corresponding paraphrase vector is calculated through the word vector model as , the context vector is , then the paraphrase vector and the context vector The calculation formula is: ; where, is the dot product of two vectors, and are the magnitudes of vectors and respectively; Determine the key vocabulary When determining the definition of , traverse all its definitions and calculate the similarity between each definition vector and the context vector respectively , and select the definition with the largest similarity value as the key vocabulary in the current context.
7. The intelligent international trade contract intelligent review system based on natural language processing according to claim 6, characterized in that: The text similarity association module (400) includes a keyword vector calculation unit (410) and a same-definition mapping unit (420) for words; The keyword vector calculation unit (410) perceives the frequency of each paragraph keyword in the text in the keyword analysis and screening module (300), and constructs an associated keyword set in each paragraph as a keyword vector according to the frequency; Calculate the cosine value of the angle between the keyword vectors in the contract terms and all keyword vectors in the regulatory standard text in sequence. The smaller the angle, the closer the cosine value is to , it is determined that the two vectors are more similar, that is, the similarity between the two keyword sets is the largest. At this time, retrieve the paragraph corresponding to the keyword vector in the contract terms and the paragraph with the largest similarity between the regulatory standard text and the paragraph in the contract terms, and associate the two paragraphs.
8. The intelligent international trade contract intelligent review system based on natural language processing according to claim 7, characterized in that: The same-interpretation vocabulary mapping unit (420) senses the vocabulary with the same interpretation in the keyword vocabulary analysis and screening module (300). When the keyword vector calculation unit (410) constructs word vectors, the vectors of the keywords with the same interpretation in the contract terms and the regulatory standard text are mapped to the same keyword vectors with each other.
Citation Information
Cited By
Foreign business travel certificate structured information extraction method and system based on hybrid model
CN122021615A