Manuscript content recognition and analysis system based on natural language processing and artificial intelligence
By combining the self-attention mechanism and clustering algorithm, the problems of insufficient data quality and context understanding ability of the existing system are solved, and efficient and automated manuscript content recognition and classification are achieved to adapt to large-scale data processing needs.
Patent Information
- Application Number
- CN202411948507.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing manuscript content analysis systems have deficiencies in data quality, context understanding capabilities, and training costs, resulting in low recognition efficiency and susceptibility to bias.
A manuscript content recognition and analysis system based on natural language processing and artificial intelligence is adopted. The self-attention mechanism is used to calculate the dependency between words and sentences, words and paragraphs, and words and manuscripts. The clustering algorithm and cosine similarity algorithm are combined to classify and screen manuscripts. The module is continuously updated to achieve automated processing.
It improves the efficiency and accuracy of manuscript content recognition, reduces manual operation time and costs, adapts to large-scale data processing, and can identify and analyze manuscript content in real time in scenarios with high real-time requirements.
Smart Images

Figure CN119886131B_ABST
Abstract
Description
Technical Field
[0001] The present invention discloses a manuscript content recognition and analysis system based on natural language processing and artificial intelligence, and relates to the field of text processing. Background Art
[0002] The existing manuscript content analysis system has the following shortcomings:
[0003] Data quality issues: The training effect of existing systems is highly dependent on the quality of the input data. If there is noise or inaccurate labels in the data, it will lead to recognition errors or performance degradation of the existing systems. If there is a certain bias in the training data, the existing systems will also have corresponding biases.
[0004] Insufficient contextual understanding: Although existing AI systems can understand the grammar and semantics of text to a certain extent, they still have difficulty understanding complex contexts and implicit intentions. In the analysis of short texts, AI often lacks contextual completeness, which can lead to some information not being fully understood or misjudged.
[0005] High training costs: Advanced AI models such as deep learning require large amounts of labeled data and high computing resources for training; at the same time, the deployment and maintenance of AI systems still require expensive hardware and software resources. Summary of the Invention
[0006] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a manuscript content recognition and analysis system based on natural language processing and artificial intelligence, aiming to solve the problem of low efficiency in manuscript content recognition.
[0007] In order to achieve the above-mentioned purpose, the present invention is implemented through the following technical solutions: A manuscript content recognition and analysis system based on natural language processing and artificial intelligence includes:
[0008] Manuscript acquisition module: used to obtain the number of submission information, obtain the manuscript corresponding to each submission information, and obtain the manuscript to be analyzed;
[0009] Content Identification Module: This module extracts all the words in the manuscript to be analyzed and uses the self-attention mechanism to calculate the dependency relationships between words and sentences, words and paragraphs, and words and manuscripts in each manuscript to be analyzed, thereby obtaining the self-attention value of each manuscript. It also obtains and calculates the self-attention value of the standard manuscript to obtain the quasi-attention value. Based on the self-attention value and quasi-attention value of each manuscript, the manuscript to be analyzed is classified and a content label is added to each manuscript to be analyzed.
[0010] Content screening module: Uses a clustering algorithm to convert each manuscript to be analyzed into a text vector to obtain the original text vector; obtains and converts the error-corrected manuscript to obtain the marked text vector; uses the cosine similarity algorithm based on the original text vector and the marked text vector to screen out the manuscripts to be analyzed for false content and bad content;
[0011] Continuous update module: used to continuously obtain manuscripts to be analyzed, and perform content identification and content screening on newly obtained manuscripts to be analyzed.
[0012] Furthermore, the workflow of the content identification module is as follows:
[0013] Process A1: The number of content identification information is recorded as pn;
[0014] Get the number of manuscripts submitted by the first submission information, recorded as im(1); and so on, the number of manuscripts submitted by the pnth submission information, recorded as im(pn);
[0015] Calculate the sum of im(1)~im(pn), denoted as aim;
[0016] The manuscripts submitted from the 1st to the pnth submission information are recorded as mu(1,1)~mu(pn,im(pn));
[0017] Among them, mu ( 1,1 ) represents the first manuscript submitted by the first submission; similarly, mu(pn, im(pn)) represents the im(pn)th manuscript submitted by the pnth submission;
[0018] Process A2: Submit the manuscript ( 1,1 ) As manuscript A; use the self-attention mechanism to calculate the dependency relationship of each word in manuscript A and obtain the manuscript mu ( 1,1 ) The self-attention value is denoted as aMA(1,1);
[0019] Process A3: Repeat the same process of calculating aMA(1,1) to calculate the self-attention values corresponding to mu(1,2)~mu(pn,im(pn)) to obtain aMA(1,2)~aMA(pn,im(pn));
[0020] Obtain scientific manuscripts, life manuscripts, shopping manuscripts, and entertainment manuscripts as standard manuscripts; repeat the same process of calculating aMA(1,1), and calculate the self-attention values corresponding to scientific manuscripts, life manuscripts, shopping manuscripts, and entertainment manuscripts in turn to obtain MA(a), MA(b), MA(c), and MA(d);
[0021] Process A4: Classify the manuscript mu(1,1) and add content tags;
[0022] Process A41: Calculate the correlation coefficient between the manuscript mu(1,1) and the scientific manuscript, denoted as bx(1,1-1); the calculation formula is: bx(1,1-1) = |aMA(1,1)-MA(a)| / MA(a);
[0023] The correlation coefficient between the manuscript mu(1,1) and the life manuscript is recorded as bx(1,1-2); the calculation formula is: bx(1,1-2)=|aMA(1,1)-MA(b)| / MA(b);
[0024] The correlation coefficient between the manuscript mu(1,1) and the shopping manuscript is denoted as bx(1,1-3); the calculation formula is: bx(1,1-3)=|aMA(1,1)-MA(c)| / MA(c);
[0025] The correlation coefficient between the article mu(1,1) and the entertainment article is denoted as bx(1,1-4); the calculation formula is: bx(1,1-4)=|aMA(1,1)-MA(d)| / MA(d);
[0026] Process A42: Extract the minimum value among bx(1,1-1) to bx(1,1-4), denoted as bxl;
[0027] The standard manuscript type corresponding to bxl is used as the content label of the manuscript mu(1,1);
[0028] If the minimum value among bx(1,1-1) to bx(1,1-4) is not unique, the smallest correlation coefficient among bx(1,1-1) to bx(1,1-4) is recorded as bxl(1) to bxl(m);
[0029] Where bxl(1) represents the first smallest value among bx(1,1-1) to bx(1,1-4), bxl(m) represents the mth smallest value among bx(1,1-1) to bx(1,1-4), and the value range of m is 2 to 4.
[0030] The standard manuscript types corresponding to bxl(1) to bxl(m) are used as content labels for the manuscript mu(1,1);
[0031] Content tags include: technology articles, life articles, shopping articles and entertainment articles.
[0032] Furthermore, it is characterized in that the specific process of process A2 is as follows:
[0033] Process A21: Count the number of paragraphs in manuscript A, denoted as pa;
[0034] Count the number of sentences in the first paragraph of manuscript A, record it as se(1); and so on, count the number of sentences in the pa-th paragraph, record it as se(pa);
[0035] Process A22: Count the number of words corresponding to all sentences in manuscript A, recorded as wo(1,1)~wo(pa,se(pa));
[0036] Among them, wo(1,1) represents the number of words in the first sentence of the first paragraph; similarly, wo(pa,se(pa)) represents the number of words in the se(pa)th sentence of the pa-th paragraph;
[0037] Extract the maximum value from wo(1,1) to wo(pa,se(pa)) and record it as wo(max), and the minimum value as wo(min); calculate the average value from wo(1,1) to wo(pa,se(pa)) and record it as wo(avg);
[0038] Process A23: Let the size of the text scanning box be tC; define the relationship A1:
[0039]
[0040] Determine whether the relationship A1 is satisfied and determine the calculation formula for tC;
[0041] If the relation A1 is satisfied, the calculation formula of tC is:
[0042] If the relation A1 is not satisfied, then compare the values of bi(1) and bi(2) to determine the formula for tC;
[0043] If bi(1)≥bi(2), then the calculation formula for tC is:
[0044] If bi(1)<bi(2), then the calculation formula of tC is:
[0045] Wherein, bi(1) and bi(2) both represent transition coefficients. The calculation formula of bi(1) is: bi(1) = [(wo(avg) - wo(min)) / wo(avg)], and the calculation formula of bi(2) is: bi(2) = [(wo(max) - wo(avg)) / wo(max)];
[0046] Process A24: Process the first paragraph in manuscript A to obtain word vectors vc(1,1,1)~vc(1,se(1)1,wo(1,se(1)));
[0047] Among them, vc(1,1,1) represents the word vector of the first word in the first sentence of the first paragraph; similarly, vc(1,se(1)1,wo(1,se(1))) represents the word vector of the wo(1,se(1))th word in the se(1)th sentence of the first paragraph.
[0048] Furthermore, the subsequent process of the process A24 is as follows:
[0049] Process A25: Repeat the same process as for the first paragraph in document A to process paragraphs 2 to pa, and obtain word vectors vc(2,1,1)~vc(pa,se(pa),wo(pa,se(pa)));
[0050] vc(2,1,1) represents the word vector of the first word in the first sentence of the second paragraph;
[0051] Similarly, vc(pa,se(pa),wo(pa,se(pa))) represents the word vector of the wo(pa,se(pa))th word in the se(pa)th sentence in the pa-th paragraph;
[0052] Process A26: Use Xavier initialization as the initialization strategy for the query-key-value weight matrix to obtain the weight matrices WQ, WK, and WV;
[0053] Define calculation formula A2-1: Qi(x,y,z)=(WQ)×(vc(x,y,z));
[0054] Formula A2-2: Ki(x,y,z) = (WK) × (vc(x,y,z));
[0055] Formula A2-3: Vi(x,y,z)=(WV)×(vc(x,y,z));
[0056] Where × represents matrix multiplication, vc(x,y,z) represents the word vector of the zth word in the yth sentence of the xth paragraph (in manuscript A); the value range of x is 1 to pa; the value range of y is determined by x, and the value range of z is determined by both x and y.
[0057] Qi(x,y,z) represents the query vector of vc(x,y,z), Ki(x,y,z) represents the key vector of vc(x,y,z), and Vi(x,y,z) represents the value vector of vc(x,y,z);
[0058] Substituting vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))) into equations A2-1 to A2-3, we obtain the corresponding values for vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))) as follows:
[0059] Query vector: Qi(1,1,2)~Qi(pa,se(pa),wo(pa,se(pa)));
[0060] Key vector: Ki(1,1,2)~Ki(pa,se(pa),wo(pa,se(pa)));
[0061] Value vector: Vi(1,1,2)~Vi(pa,se(pa),wo(pa,se(pa)));
[0062] Process A27: Count the number of vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))), recorded as nw; nw is equal to WOB, and WOB represents the sum of wo(1,1) to wo(pa,se(pa));
[0063] Get the Unicode codes of the words vc(1,1,2)~vc(pa,se(pa),wo(pa,se(pa))) and get Unz(1)~Unz(nw);
[0064] Take the word vectors vc(1,1,2)~vc(pa,se(pa),wo(pa,se(pa))) as quasi-vectors and get vcx(1)~vcx(nw);
[0065] Arrange the query vector, key vector and value vector corresponding to the quasi-vector in ascending order of Unz(1) to Unz(nw) to obtain: the query vector corresponding to the 1st to nwth quasi-vectors: Qix(1) to Qix(nw); the key vector: Kix(1) to Kix(nw); the value vector: Vix(1) to Vix(nw);
[0066] in,
[0067]
[0068] Process A28: Calculate the attention score of the first quasi-vector, denoted as MA(1);
[0069] Process A29: Repeat the same process of calculating MA(1) to calculate the attention scores of the 2nd to nwth quasi-vectors, and obtain MA(2)~MA(nw);
[0070] Calculate the sum of MA(1)~MA(nw), record it as aMA(1,1); take aMA(1,1) as the manuscript mu ( 1,1 ) The self-attention value.
[0071] Furthermore, it is characterized in that the specific process of the process A24 is as follows:
[0072] Process A241: Process the first sentence and obtain word vectors vc(1,1,1) to vc(1,1,wo(1,1));
[0073] Set the size of the context box to tC, use the Word2Vec model to process all the words in manuscript A, and obtain the initial word vectors: vca(1,1,1)~vca(pa,se(pa),wo(pa,se(pa)));
[0074] Among them, vca(1,1,1) represents the initial word vector of the first word in the first sentence of the first paragraph; similarly, vca(pa,se(pa),wo(pa,se(pa))) represents the initial word vector of the wo(pa,se(pa))th word in the se(pa)th sentence of the pa-th paragraph;
[0075] Process A242: Extract the initial word vectors of the first to wo(1,1)th words in the first sentence: vca(1,1,1)~vca(1,1,wo(1,1));
[0076] Calculate the sum of wo(1,1)~wo(1,se(1)), recorded as WOA; calculate the sum of wo(1,1)~wo(pa,se(pa)), recorded as WOB;
[0077] Process A243: Cluster the initial vector vca(1,1,1) to obtain the word vector vc(1,1,1);
[0078] Process A2431: Calculate the word frequency of the first word in the first to se(1)th sentences and record it as TF(1) to TF(se(1));
[0079] The word frequencies in paragraphs 1 to pa are recorded as TF(1-1) to TF(1-pa);
[0080] The word frequency of all words in manuscript A is recorded as TF(1-1-e);
[0081] Calculate the inverse document frequency of the first word in all manuscripts and record it as IDF(1,1,1);
[0082] Process A2432: Calculate the average values of TF(1) to TF(se(1)) and TF(1-1) to TF(1-pa) in sequence, and denote them as aTF and bTF;
[0083] Perform a linear change on vca(1,1,1) to obtain the word vector vc(1,1,1); the calculation formula of the word vector vc(1,1,1) is:
[0084]
[0085] Process A244: Repeat the same process of processing vca(1,1,1) to process vca(1,1,2)~vca(1,1,wo(1,1)) to obtain word vectors vc(1,1,2)~vc(1,1,wo(1,1)).
[0086] Furthermore, the specific process of the process A28 is as follows:
[0087] Process A281: Define calculation formula A3:
[0088] Where soc(1,j) represents the dot product of the first quasi-vector and the jth quasi-vector; Kix(j) represents the key vector of the jth quasi-vector, and the value of j ranges from 2 to nw.
[0089] dk represents the dimension of the weight matrix WK; × represents matrix multiplication, and T represents the transpose of the matrix;
[0090] Substituting Kix(1) to Kix(nw) into equation A3, we obtain the dot product of the first quasi-vector and the second to nw-th quasi-vectors: soc(1,2) to soc(1,nw);
[0091] Process A282: Calculate the sum of soc(1,2) to soc(1,nw) and denote it as so(1);
[0092] Define calculation formula A4: Among them, α(1, j) represents the weight of the first quasi-vector relative to the jth quasi-vector;
[0093] Substituting into equation A4, we can obtain the weights of the first quasi-vector relative to the second to nw-th quasi-vectors: α(1,2) to α(1,nw);
[0094] Process A282: Calculate the attention score MA(1) of the first quasi-vector based on soc(1,2) to soc(1,nw) and α(1,2) to α(1,nw). The calculation formula of MA(1) is:
[0095]
[0096] Furthermore, the workflow of the content screening module is as follows:
[0097] Process B1: Use the K-means clustering algorithm to convert the manuscript mu(1,1)~mu(pn,im(pn)) into text vectors, and obtain the text vectors ve(1,1)~ve(pn,im(pn));
[0098] Among them, the vector ve(1,1) represents the text vector corresponding to the manuscript mu(1,1); the vector ve(pn,im(pn)) represents the text vector corresponding to the manuscript mu(pn,im(pn));
[0099] Process B2: Obtain a manuscript with false content as correction manuscript A, and obtain a manuscript with inappropriate content as correction manuscript B;
[0100] The number of statistically corrected manuscripts A is recorded as wa, and the number of statistically corrected manuscripts B is recorded as wb;
[0101] Using the K-means clustering algorithm, the 1st to wath correction manuscripts A are converted into text vectors, and the text vectors wve(1, 1) to wve(1, wa) are obtained;
[0102] Convert the 1st to wbth error correction manuscripts A into text vectors, and obtain text vectors wve(2,1)~wve(2,wb);
[0103] Process B3: Based on the vectors ve(1,1) to ve(pn, im(pn)) and the vectors wve(1,1) to wve(1,wa), remove the false content manuscripts from the manuscripts mu(1,1) to mu(pn, im(pn));
[0104] Process B4: Repeat the same process of judging whether the manuscripts mu(1,1)~mu(pn,im(pn)) are false content manuscripts, and use ve(1,1)~ve(pn,im(pn)) and vectors wve(2,1)~wve(2,wb) as the basis to eliminate the manuscripts with bad content from mu(1,1)~mu(pn,im(pn)).
[0105] Furthermore, the specific process of process B3 is as follows:
[0106] Process B31: Determine whether the manuscript mu(1,1) is a false content manuscript;
[0107] Calculate the dot product of the manuscript mu(1,1) with respect to the error correction manuscript A, denoted as jd; the calculation formula of jd is: Where, × represents matrix multiplication, T represents matrix transpose; wve(1, j) represents the text vector of the jth error-corrected manuscript A, and the value range of j is: 1 to wa;
[0108] Process B32: Calculate the norm of vector ve(1,1), denoted as fa; the calculation formula of fa is:
[0109] fa=|ve( 1,1 )× ( ve( 1,1 ) )T |;
[0110] Calculate the average norm of wve(1,1) to wve(1,wa), denoted as fb; the calculation formula of fb is:
[0111]
[0112] Process B33: Calculate the cosine similarity of vector ve(1,1) with respect to vectors wve(1,1) to wve(1,wa), denoted as csi; the calculation formula of csi is: csi = jd / (fa × fb);
[0113] Determine whether (1-csi) is less than ε; where ε represents the judgment coefficient;
[0114] If (1-csi) is greater than or equal to ε, then the manuscript mu(1,1) is not a false content manuscript;
[0115] If (1-csi) is less than ε, it means that the manuscript mu(1,1) is a false content manuscript;
[0116] Process B34: Repeat the same process of determining whether the manuscript mu(1,1) is a false content manuscript, using ve(1,2) to ve(pn, im(pn)) and vectors wve(1,1) to wve(1,wa) as the benchmark, and eliminate the false content manuscripts from the manuscripts mu(1,2) to mu(pn, im(pn));
[0117] Among them, the vector ve(1, 2) represents the text vector corresponding to the manuscript mu(1, 2).
[0118] Compared with the prior art, the present invention has the following beneficial effects:
[0119] Efficiency and automation: The present invention can process large amounts of document data, reducing the time and cost of manual operations. By conducting in-depth learning and mining of manuscript texts, the present invention enables the system to identify potential connections and relationships between words, between words and paragraphs, and between words and manuscripts from massive amounts of data, thereby reducing subjective bias in manual identification.
[0120] Support for large-scale data processing: The present invention can extract information from massive data, adapt to the needs of the big data era, and automatically identify and process ultra-large-scale texts.
[0121] Improve the quality of text analysis: The system can process and analyze large amounts of manuscript content in a very short time. Especially in scenarios with high real-time requirements (such as social media monitoring), the system can identify and analyze content in real time, and accurately classify, filter and label manuscript content, providing a reference for media workers. BRIEF DESCRIPTION OF THE DRAWINGS
[0122] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0123] Figure 1 Schematic diagram of the system of the present invention;
[0124] Figure 2 This is a schematic diagram of data processing in the present invention;
[0125] Figure 3 Schematic diagram of the self-attention value calculation of the present invention. DETAILED DESCRIPTION
[0126] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0127] See also Figure 1 and Figure 2 ,The manuscript content recognition and analysis system based on natural language processing and artificial intelligence includes: manuscript acquisition module, content recognition module, content screening module and continuous update module;
[0128] Manuscript acquisition module: used to obtain the number of submission information, obtain the manuscript corresponding to each submission information, and obtain the manuscript to be analyzed;
[0129] It should be noted that the “submission information” in the present invention refers to: the identity of the contributor or the contributing unit who submits the manuscript to the present invention (the manuscript content recognition and analysis system based on natural language processing and artificial intelligence);
[0130] Content Identification Module: This module extracts all the words in the manuscript to be analyzed and uses the self-attention mechanism to calculate the dependency relationships between words and sentences, words and paragraphs, and words and manuscripts in each manuscript to be analyzed, thereby obtaining the self-attention value of each manuscript. It also obtains and calculates the self-attention value of the standard manuscript to obtain the quasi-attention value. Based on the self-attention value and quasi-attention value of each manuscript, the manuscript to be analyzed is classified and a content label is added to each manuscript to be analyzed.
[0131] Process A: Please refer to Figure 3 ,The workflow of the content identification module is as follows:
[0132] Process A1: The number of content identification information is recorded as pn;
[0133] Get the number of manuscripts submitted by the first submission information, recorded as im(1); the number of manuscripts submitted by the second submission information, recorded as im(2); and so on, the number of manuscripts submitted by the pnth submission information, recorded as im(pn);
[0134] Calculate the sum of im(1)~im(pn), denoted as aim;
[0135] The manuscripts submitted from the 1st to the pnth submission information are recorded as mu(1,1), mu(1,2)~mu(1,im(1))~mu(pn,im(pn));
[0136] Among them, mu ( 1,1 ) represents the first manuscript submitted by the first submission; mu(1, 2) represents the second manuscript submitted by the first submission; and so on, mu(1, im(1)) represents the im(1)th manuscript submitted by the first submission; mu(pn, im(pn)) represents the im(pn)th manuscript submitted by the pnth submission.
[0137] Process A2: Submit the manuscript ( 1,1 ) As manuscript A; use the self-attention mechanism to calculate the dependency relationship of each word in manuscript A and obtain the manuscript mu ( 1,1 ) The self-attention value is denoted as aMA(1,1);
[0138] Process A21: Count the number of paragraphs in manuscript A, denoted as pa;
[0139] Count the number of sentences in the first paragraph of manuscript A, record it as se(1); the number of sentences in the second paragraph, record it as se(2); and so on, the number of sentences in the pa-th paragraph, record it as se(pa);
[0140] Process A22: Count the number of words corresponding to all sentences in manuscript A, recorded as wo(1,1), wo(1,2)~wo(1,se(1))~wo(pa,se(pa));
[0141] Among them, wo(1,1) represents the number of words in the first sentence of the first paragraph (in manuscript A); wo(1,2) represents the number of words in the second sentence of the first paragraph (in manuscript A); and so on, wo(1,se(1)) represents the number of words in the se(1) sentence of the first paragraph (in manuscript A); wo(pa,se(pa)) represents the number of words in the se(pa) sentence of the pa paragraph (in manuscript A);
[0142] Extract the maximum value from wo(1,1) to wo(pa,se(pa)) and record it as wo(max), and the minimum value as wo(min); calculate the average value from wo(1,1) to wo(pa,se(pa)) and record it as wo(avg);
[0143] Process A23: Let the size of the text scanning box be tC; define the relationship A1:
[0144]
[0145] Determine whether the relationship A1 is satisfied and determine the calculation formula for tC;
[0146] If the relation A1 is satisfied, the calculation formula of tC is:
[0147] If the relation A1 is not satisfied, then compare the values of bi(1) and bi(2) to determine the formula for tC;
[0148] If bi(1)≥bi(2), then the calculation formula for tC is:
[0149] If bi(1)<bi(2), then the calculation formula of tC is:
[0150] Wherein, bi(1) and bi(2) both represent transition coefficients. The calculation formula of bi(1) is: bi(1) = [(wo(avg) - wo(min)) / wo(avg)], and the calculation formula of bi(2) is: bi(2) = [(wo(max) - wo(avg)) / wo(max)];
[0151] Process A24: Process the first paragraph in manuscript A to obtain word vectors vc(1,1,1), vc(1,1,2)~vc(1,1,wo(1,1))~vc(1,se(1)1,wo(1,se(1)));
[0152] Among them, vc(1,1,1) represents the word vector of the first word in the first sentence of the first paragraph (in manuscript A); vc(1,1,2) represents the word vector of the second word in the first sentence of the first paragraph (in manuscript A);
[0153] Similarly, vc(1,1,wo(1,1)) represents the word vector of the wo(1,1)th word in the first sentence of the first paragraph (in manuscript A);
[0154] vc(1,se(1)1,wo(1,se(1))) represents the word vector of the wo(1,se(1))th word in the se(1)th sentence in the first paragraph (in manuscript A);
[0155] Process A241: Process the first sentence (of the first paragraph in document A) to obtain word vectors vc(1,1,1), vc(1,1,2) to vc(1,1,wo(1,1));
[0156] Set the size of the context box to tC, use the Word2Vec model to process all the words in manuscript A, and obtain the initial word vectors: vca(1,1,1), vca(1,1,2)~vca(1,1,wo(1,1))~vca(pa,se(pa),wo(pa,se(pa)));
[0157] Among them, vca(1,1,1) represents the initial word vector of the first word in the first sentence of the first paragraph (in manuscript A); vca(1,1,2) represents the initial word vector of the second word in the first sentence of the first paragraph (in manuscript A);
[0158] Similarly, vca(1,1,wo(1,1)) represents the initial word vector of the wo(1,1)th word in the first sentence of the first paragraph (in manuscript A);
[0159] vca(pa,se(pa),wo(pa,se(pa))) represents the initial word vector of the wo(pa,se(pa))th word in the se(pa)th sentence in the pa-th paragraph (in manuscript A);
[0160] Process A242: Extract the initial word vectors of the first to wo(1,1)th words in the first sentence (of the first paragraph in manuscript A): vca(1,1,1) to vca(1,1,wo(1,1));
[0161] Calculate the sum of wo(1,1)~wo(1,se(1)), recorded as WOA; calculate the sum of wo(1,1)~wo(pa,se(pa)), recorded as WOB;
[0162] Process A243: Cluster the initial vector vca(1,1,1) to obtain the word vector vc(1,1,1);
[0163] Process A2431: Calculate the word frequency of the first word (in the first sentence of the first paragraph of manuscript A) in the first to se(1)th sentences of the first paragraph of manuscript A, and record it as TF(1) to TF(se(1));
[0164] The word frequencies of (the first word in the first sentence of the first paragraph of manuscript A) in the first to pa paragraphs of (manuscript A) are recorded as TF(1-1) to TF(1-pa);
[0165] The frequency of the first word in the first sentence of the first paragraph of manuscript A is denoted as TF(1-1-e);
[0166] Calculate the inverse document frequency of the first word (in the first sentence of the first paragraph in manuscript A) in all manuscripts (i.e., the first to aimth manuscripts) and record it as IDF(1,1,1);
[0167] Process A2432: Calculate the average values of TF(1) to TF(se(1)) and TF(1-1) to TF(1-pa) in sequence, and denote them as aTF and bTF;
[0168] Perform a linear change on vca(1,1,1) to obtain the word vector vc(1,1,1); the calculation formula of the word vector vc(1,1,1) is:
[0169]
[0170] Process A244: Repeat the same process of processing vca(1,1,1) (i.e., process A243), process vca(1,1,2) to vca(1,1,wo(1,1)), and obtain word vectors vc(1,1,2) to vc(1,1,wo(1,1));
[0171] Process A25: Repeat the same process as that for the first paragraph in document A (i.e., process A24) to process paragraphs 2 to pa (in document A) and obtain word vectors vc(2,1,1) to vc(pa,se(pa),wo(pa,se(pa))).
[0172] vc(2,1,1) represents the word vector of the first word in the first sentence of the second paragraph (in manuscript A);
[0173] Similarly, vc(pa,se(pa),wo(pa,se(pa))) represents the word vector of the wo(pa,se(pa))th word in the se(pa)th sentence in the pa-th paragraph (in manuscript A);
[0174] Process A26: Use Xavier initialization as the initialization strategy for the query-key-value weight matrix to obtain the weight matrices WQ, WK, and WV;
[0175] Define calculation formula A2-1: Qi(x,y,z)=(WQ)×(vc(x,y,z));
[0176] Formula A2-2: Ki(x,y,z) = (WK) × (vc(x,y,z));
[0177] Formula A2-3: Vi(x,y,z)=(WV)×(vc(x,y,z));
[0178] Wherein, × represents matrix multiplication, vc(x,y,z) represents the word vector of the zth word in the yth sentence of the xth paragraph (in manuscript A); the value range of x is 1 to pa; the value range of y is determined by x (for example, if x is 1, the value range of y is 1 to se(1); if x is 2, the value range of y is 1 to se(2); and so on, if x is pa, the value range of y is 1 to se(pa);), and the value range of z is determined by both x and y; for example, if x is 1 and y is 1, the value range of z is 1 to wo(1,1); if x is 1 and y is 2, the value range of z is 1 to wo(1,2); and so on, if x is pa and y is se(pa), the value range of z is 1 to wo(pa,se(pa));
[0179] Qi(x,y,z) represents the query vector of vc(x,y,z), Ki(x,y,z) represents the key vector of vc(x,y,z), and Vi(x,y,z) represents the value vector of vc(x,y,z);
[0180] Substituting vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))) into equations A2-1 to A2-3, we obtain the corresponding values for vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))) as follows:
[0181] Query vector: Qi(1,1,2)~Qi(pa,se(pa),wo(pa,se(pa)));
[0182] Key vector: Ki(1,1,2)~Ki(pa,se(pa),wo(pa,se(pa)));
[0183] Value vector: Vi(1,1,2)~Vi(pa,se(pa),wo(pa,se(pa)));
[0184] Process A27: Count the number of vc(1,1,2) to vc(pa,se(pa),wo(pa,se(pa))), recorded as nw; nw is equal to WOB, and WOB represents the sum of wo(1,1) to wo(pa,se(pa));
[0185] Get the Unicode codes of the words vc(1,1,2)~vc(pa,se(pa),wo(pa,se(pa))) and get Unz(1)~Unz(nw);
[0186] Take the word vectors vc(1,1,2)~vc(pa,se(pa),wo(pa,se(pa))) as quasi-vectors and get vcx(1)~vcx(nw);
[0187] Arrange the query vector, key vector and value vector corresponding to the quasi-vector in ascending order of Unz(1) to Unz(nw) to obtain: the query vector corresponding to the 1st to nwth quasi-vectors: Qix(1) to Qix(nw); the key vector: Kix(1) to Kix(nw); the value vector: Vix(1) to Vix(nw);
[0188] in,
[0189]
[0190] Process A28: Calculate the attention score of the first quasi-vector, denoted as MA(1);
[0191] Process A281: Define calculation formula A3:
[0192] Where soc(1,j) represents the dot product of the first quasi-vector and the jth quasi-vector; Kix(j) represents the key vector of the jth quasi-vector, and the value of j ranges from 2 to nw.
[0193] dk represents the dimension of the weight matrix WK; × represents matrix multiplication, and T represents the transpose of the matrix;
[0194] Substituting Kix(1) to Kix(nw) into equation A3, we obtain the dot product of the first quasi-vector and the second to nw-th quasi-vectors: soc(1,2) to soc(1,nw);
[0195] Process A282: Calculate the sum of soc(1,2) to soc(1,nw) and denote it as so(1);
[0196] Define calculation formula A4: Among them, α(1, j) represents the weight of the first quasi-vector relative to the jth quasi-vector;
[0197] Substituting into equation A4, we can obtain the weights of the first quasi-vector relative to the second to nw-th quasi-vectors: α(1,2) to α(1,nw);
[0198] Process A282: Calculate the attention score MA(1) of the first quasi-vector based on soc(1,2) to soc(1,nw) and α(1,2) to α(1,nw). The calculation formula of MA(1) is:
[0199]
[0200] Process A29: Repeat the same process of calculating MA(1) to calculate the attention scores of the 2nd to nwth quasi-vectors, and obtain MA(2)~MA(nw);
[0201] Calculate the sum of MA(1)~MA(nw), record it as aMA(1,1); take aMA(1,1) as the manuscript mu ( 1,1 ) The self-attention value of
[0202] Process A3: Repeat the same process of calculating aMA(1,1) to calculate the self-attention values corresponding to mu(1,2)~mu(pn,im(pn)) to obtain aMA(1,2)~aMA(pn,im(pn));
[0203] Obtain (existing) scientific manuscripts, life manuscripts, shopping manuscripts, and entertainment manuscripts (online) as standard manuscripts; repeat the same process of calculating aMA(1,1), and calculate the self-attention values corresponding to scientific manuscripts, life manuscripts, shopping manuscripts, and entertainment manuscripts in turn to obtain MA(a), MA(b), MA(c), and MA(d);
[0204] Process A4: Classify the manuscript mu(1,1) and add content tags;
[0205] Process A41: Calculate the correlation coefficient between the manuscript mu(1,1) and the scientific manuscript, denoted as bx(1,1-1); the calculation formula is: bx(1,1-1) = |aMA(1,1)-MA(a)| / MA(a);
[0206] The correlation coefficient between the manuscript mu(1,1) and the life manuscript is recorded as bx(1,1-2); the calculation formula is: bx(1,1-2)=|aMA(1,1)-MA(b)| / MA(b);
[0207] The correlation coefficient between the manuscript mu(1,1) and the shopping manuscript is denoted as bx(1,1-3); the calculation formula is: bx(1,1-3)=|aMA(1,1)-MA(c)| / MA(c);
[0208] The correlation coefficient between the article mu(1,1) and the entertainment article is denoted as bx(1,1-4); the calculation formula is: bx(1,1-4)=|aMA(1,1)-MA(d)| / MA(d);
[0209] Process A42: Extract the minimum value among bx(1,1-1) to bx(1,1-4), denoted as bxl;
[0210] The standard manuscript type corresponding to bxl is used as the content label of the manuscript mu(1,1);
[0211] If the minimum value among bx(1,1-1) to bx(1,1-4) is not unique, the smallest correlation coefficient among bx(1,1-1) to bx(1,1-4) is recorded as bxl(1) to bxl(m);
[0212] Where bxl(1) represents the first smallest value among bx(1,1-1) to bx(1,1-4), bxl(m) represents the mth smallest value among bx(1,1-1) to bx(1,1-4), and the value range of m is 2 to 4.
[0213] The standard manuscript types corresponding to bxl(1) to bxl(m) are used as content labels for the manuscript mu(1,1);
[0214] Content tags include: science and technology articles, life articles, shopping articles and entertainment articles;
[0215] It should be noted that the present invention only lists four specific types of labels: "technology, life, shopping, and entertainment". Media workers or relevant technical personnel can define or design more labels on their own when using the present invention to increase the benefits of the present invention to different user groups.
[0216] Content screening module: Uses a clustering algorithm to convert each manuscript to be analyzed into a text vector to obtain the original text vector; obtains and converts the error-corrected manuscript to obtain the marked text vector; uses the cosine similarity algorithm based on the original text vector and the marked text vector to screen out the manuscripts to be analyzed for false content and bad content;
[0217] Process B: The workflow of the content screening module is as follows:
[0218] Process B1: Use the K-means clustering algorithm to convert the manuscript mu(1,1)~mu(pn,im(pn)) into text vectors, and obtain text vectors ve(1,1)~ve(pn,im(pn)); (original text vector);
[0219] Among them, the vector ve(1,1) represents the text vector corresponding to the manuscript mu(1,1); the vector ve(pn,im(pn)) represents the text vector corresponding to the manuscript mu(pn,im(pn));
[0220] Process B2: (Online or from the Internet regulatory authorities) obtain the manuscript of false content as the error correction manuscript A, and obtain the manuscript of inappropriate content as the error correction manuscript B;
[0221] The number of statistically corrected manuscripts A is recorded as wa, and the number of statistically corrected manuscripts B is recorded as wb;
[0222] Using the K-means clustering algorithm, the 1st to wath error correction manuscripts A are converted into text vectors, and the text vectors wve(1,1)~wve(1,wa) are obtained; (labeled text vectors);
[0223] Convert the 1st to wbth error correction manuscripts A into text vectors, and obtain text vectors wve(2,1)~wve(2,wb); (label text vectors);
[0224] Process B3: Based on the vectors ve(1,1) to ve(pn, im(pn)) and the vectors wve(1,1) to wve(1,wa), remove the false content manuscripts from the manuscripts mu(1,1) to mu(pn, im(pn));
[0225] Process B31: Determine whether the manuscript mu(1,1) is a false content manuscript;
[0226] Calculate the dot product of the manuscript mu(1,1) with respect to the error correction manuscript A, denoted as jd; the calculation formula of jd is: Where, × represents matrix multiplication, T represents matrix transpose; wve(1, j) represents the text vector of the jth error-corrected manuscript A, and the value range of j is: 1 to wa;
[0227] Process B32: Calculate the norm of vector ve(1,1), denoted as fa; the calculation formula of fa is:
[0228] fa=|ve( 1,1 )× ( ve( 1,1 ) )T |;
[0229] Calculate the average norm of wve(1,1) to wve(1,wa), denoted as fb; the calculation formula of fb is:
[0230]
[0231] Process B33: Calculate the cosine similarity of vector ve(1,1) with respect to vectors wve(1,1) to wve(1,wa), denoted as csi; the calculation formula of csi is: csi = jd / (fa × fb);
[0232] Determine whether (1-csi) is less than ε; where ε represents the judgment coefficient; the value of ε is generally 0.2; users or relevant technical personnel can adjust the value of ε according to actual needs;
[0233] If (1-csi) is greater than or equal to ε, then the manuscript mu(1,1) is not a false content manuscript;
[0234] If (1-csi) is less than ε, it means that the manuscript mu(1,1) is a false content manuscript;
[0235] Process B34: Repeat the same process (i.e., process B31 to process B33) of determining whether the manuscript mu(1,1) is a false content manuscript, and use ve(1,2) to ve(pn,im(pn)) and vectors wve(1,1) to wve(1,wa) as the benchmark to eliminate the false content manuscripts from the manuscripts mu(1,2) to mu(pn,im(pn));
[0236] Among them, the vector ve(1, 2) represents the text vector corresponding to the manuscript mu(1, 2);
[0237] Process B4: Repeat the same process (i.e., process B3) of judging whether the manuscripts mu(1, 1) to mu(pn, im(pn)) are false content manuscripts, and use ve(1, 1) to ve(pn, im(pn)) and vectors wve(2, 1) to wve(2, wb) as the basis to eliminate the manuscripts with bad content from mu(1, 1) to mu(pn, im(pn)).
[0238] Continuous update module: used to continuously obtain manuscripts to be analyzed, and perform content identification and content screening on newly obtained manuscripts to be analyzed.
[0239] The above formulas are all dimensionless and calculated by taking their numerical values. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions. For example, if there are weight coefficients and proportional coefficients, the size of the settings is to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. Regarding the size of the weight coefficient and the proportional coefficient, as long as it does not affect the proportional relationship between the parameter and the quantized value, it is fine.
[0240] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A manuscript content recognition and analysis system based on natural language processing and artificial intelligence, characterized by: The system comprises: Manuscript acquisition module: used to obtain the number of submission information, obtain the manuscript corresponding to each submission information, and obtain the manuscript to be analyzed; Content Identification Module: This module extracts all the words in the manuscript to be analyzed and uses the self-attention mechanism to calculate the dependency relationships between words and sentences, words and paragraphs, and words and manuscripts in each manuscript to be analyzed, thereby obtaining the self-attention value of each manuscript. It also obtains and calculates the self-attention value of the standard manuscript to obtain the quasi-attention value. Based on the self-attention value and quasi-attention value of each manuscript, the manuscript to be analyzed is classified and a content label is added to each manuscript to be analyzed. Get the number of manuscripts submitted by submission information im(pn), and record the number of manuscripts submitted by pn submission information as mu (1,1) ~mu (pn,im(pn)) ;Write the manuscript (1,1) As manuscript A; Process A21: Count the number of paragraphs in manuscript A, denoted as pa; Count the number of sentences in the first paragraph of manuscript A, record it as se(1); and so on, count the number of sentences in the pa-th paragraph, record it as se(pa); Process A22: Count the number of words corresponding to all sentences in manuscript A, recorded as wo (1,1) ~wo (pa,se(pa)) ; Among them, (1,1) Indicates the number of words in the first sentence of the first paragraph; and so on. (pa,se(pa)) Indicates the number of words in the se(pa)th sentence of the path paragraph; Extract wo (1,1) ~wo (pa,se(pa)) The maximum value in is denoted as wo (max) , the minimum value is recorded as wo (min) ; Calculate wo (1,1) ~wo (pa,se(pa)) The average value, denoted as wo (avg) ; Process A23: Let the size of the text scanning box be tC; define the relationship A1: ; Determine whether the relationship A1 is satisfied and determine the calculation formula for tC; If the relation A1 is satisfied, the calculation formula of tC is: ; If the relation A1 is not satisfied, then calculate bi (1) andbi (2) The size of , determine the calculation formula of tC; If bi (1) ≥bi (2) , then the calculation formula of tC is: ; If bi (1) <bi (2) , then the calculation formula of tC is: ; Among them, bi (1) andbi (2) Both represent transition coefficients, bi (1) The calculation formula is: bi (1) =[(wo (avg) -wo (min) ) / wo (avg) ],bi (2) The calculation formula is: bi (2) =[(wo (max) -wo (avg) ) / wo (max) ]; Process A24: Process the first paragraph in manuscript A and obtain word vectors vc(1,1,1)~vc(1,se(1)1,wo (1,se(1)) ); Among them, vc(1,1,1) represents the word vector of the first word in the first sentence of the first paragraph; vc(1,se(1)1,wo (1,se(1)) ) means the woth sentence in the se(1) sentence of the first paragraph (1,se(1)) word vectors of words; Process A25: Repeat the same process of processing the first paragraph in manuscript A, process the second to pa paragraphs, and obtain word vectors vc(2,1,1)~vc(pa,se(pa),wo (pa,se(pa)) ); vc(2,1,1) represents the word vector of the first word in the first sentence of the second paragraph; By analogy, vc (pa, se (pa), wo (pa,se(pa)) ) means the woth sentence in the se(pa)th paragraph (pa,se(pa)) word vectors of words; Process A26: Use Xavier initialization as the initialization strategy for the query-key-value weight matrix to obtain the weight matrix W Q 、W K and W V ; Define calculation formula A2-1: Qi (x,y,z) =(W Q )×(vc (x,y,z) ); Formula A2-2: Ki (x,y,z) =(W K )×(vc (x,y,z) ); Formula A2-3: Vi (x,y,z) =(W V )×(vc (x,y,z) ); Among them, × represents matrix multiplication, vc (x,y,z) The word vector representing the zth word in the yth sentence of the xth paragraph; the value range of x is 1 to pa; the value range of y is determined by x, and the value range of z is determined by both x and y; Qi (x,y,z) Indicates vc (x,y,z) The query vector Ki (x,y,z) Indicates vc (x,y,z) The key vector, Vi (x,y,z) Indicates vc (x,y,z) A vector of values for ; Change vc(1,1,2)~vc(pa,se(pa),wo (pa,se(pa)) ) into equations A2-1 to A2-3, we get vc(1,1,2)~vc(pa,se(pa),wo (pa,se(pa)) ) corresponds to: Query vector: Qi (1, 1, 2) ~ Qi (pa, se (pa), wo (pa,se(pa)) ); Key vector: Ki (1,1,2) ~ Ki (pa,se (pa),wo (pa,se(pa)) ); Value vector: Vi(1,1,2)~Vi(pa,se(pa),wo (pa,se(pa)) ); Process A27: Statistics vc (1, 1, 2) ~ vc (pa, se (pa), wo (pa,se(pa)) ), denoted as nw; Get vc (1,1,2) ~ vc (pa,se (pa),wo (pa,se(pa)) ) The Unicode code of the corresponding word is obtained as Unz (1) to Unz (nw); The word vector vc (1,1,2) ~ vc (pa,se (pa,wo (pa,se(pa)) ) as a quasi-vector, we get vcx (1) ~vcx (nw) ; Arrange the query vector, key vector, and value vector corresponding to the quasi-vector in ascending order from Unz (1) to Unz (nw) to obtain the query vector corresponding to the 1st to nwth quasi-vectors: Qix (1) ~Qix (nw) ; Key vector: Kix (1) ~Kix (nw) ; Value vector: Vix (1) ~Vix (nw) ; Process A28: Calculate the attention score of the first quasi-vector, denoted as MA (1) ; Process A29: Repeated calculation of MA (1) The same process as above is used to calculate the attention scores of the 2nd to nwth quasi-vectors, and obtain MA (2) ~MA (nw) ; Calculating MA (1) ~MA (nw) The sum of (1,1) ; aMA (1,1) As a manuscript (1,1) The quasi-self-attention value of The manuscripts to be analyzed are categorized as follows: Obtain scientific manuscripts, life manuscripts, shopping manuscripts and entertainment manuscripts as standard manuscripts; calculate the self-attention values corresponding to scientific manuscripts, life manuscripts, shopping manuscripts and entertainment manuscripts in turn, and obtain MA (a) 、MA (b) 、MA (c) and MA (d) ; Calculate manuscript mu (1,1) The correlation coefficient with scientific manuscripts is denoted as bx (1,1-1) ; The calculation formula is: bx (1,1-1) =|aMA (1,1) -MA (a) | / MA (a) ; Manuscript (1,1) The correlation coefficient with life manuscripts is denoted as bx (1,1-2) ; The calculation formula is: bx (1,1-2) =|aMA (1,1) -MA (b) | / MA (b) ; Manuscript (1,1) The correlation coefficient with the shopping manuscript is denoted as bx (1,1-3) ; The calculation formula is: bx (1,1-3) =|aMA (1,1) -MA (c) | / MA (c) ; Manuscript (1,1) The correlation coefficient with entertainment articles is denoted as bx (1,1-4) ; The calculation formula is: bx (1,1-4) =|aMA (1,1) -MA (d) | / MA (d) ; Extract bx (1,1-1) ~bx (1,1-4) The minimum value in is denoted as bxl; Use the standard manuscript type corresponding to bxl as the manuscript mu (1,1) Content tags; If bx (1,1-1) ~bx (1,1-4) If the minimum value in is not unique, then bx (1,1-1) ~bx (1,1-4) The smallest correlation coefficient among the two is denoted as bxl (1) ~bxl (m) ; Among them, bxl (1) Indicates bx (1,1-1) ~bx (1,1-4) The first tied smallest value in bxl (m) Indicates bx (1,1-1) ~bx (1,1-4) The mth smallest value in the list, the value range of m is: 2 to 4; bxl (1) ~bxl (m) The corresponding standard manuscript type, as the manuscript mu (1,1) Content tags include: science and technology articles, life articles, shopping articles and entertainment articles; Content screening module: Uses a clustering algorithm to convert each manuscript to be analyzed into a text vector to obtain the original text vector; obtains and converts the error-corrected manuscript to obtain the marked text vector; uses the cosine similarity algorithm based on the original text vector and the marked text vector to screen out the manuscripts to be analyzed for false content and bad content; Continuous update module: used to continuously obtain manuscripts to be analyzed, and perform content identification and content screening on newly obtained manuscripts to be analyzed.
2. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 1 is characterized in that: The workflow of the content identification module is as follows: Process A1: The number of content identification information is recorded as pn; Get the number of manuscripts submitted by the first submission information, recorded as im(1); and so on, the number of manuscripts submitted by the pnth submission information, recorded as im(pn); Calculate the sum of im(1)~im(pn), denoted as aim; The manuscripts submitted from the 1st to the pnth submission information are recorded as mu (1,1) ~mu (pn,im(pn)) ; Among them, mu (1,1) Indicates the first submission of the first submission; and so on, mu (pn,im(pn)) Indicates the im(pn)th manuscript delivered by the pnth submission information; Process A2: Submit the manuscript (1,1) As manuscript A; use the self-attention mechanism to calculate the dependency relationship of each word in manuscript A and obtain the manuscript mu (1,1) The self-attention value is denoted as aMA (1,1) ; Process A3: Repeated calculation of aMA (1,1) The same process as above, calculate mu (1,2) ~mu (pn,im(pn)) The corresponding self-attention value is obtained as aMA (1,2) ~aMA (pn,im(pn)) .
3. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 1 is characterized in that: The specific process of the process A24 is as follows: Process A241: Process the first sentence and get word vectors vc(1,1,1)~vc(1,1,wo (1,1) ); Set the size of the context box to tC, use the Word2Vec model to process all the words in manuscript A, and get the initial word vector: vca (1,1,1) ~ vca (pa,se (pa,wo (pa,se(pa)) ); Among them, vca (1,1,1) represents the initial word vector of the first word in the first sentence of the first paragraph; and so on, vca (pa,se (pa),wo (pa,se(pa)) ) means the woth sentence in the se(pa)th paragraph (pa,se(pa)) The initial word vector of each word; Process A242: Extract the first to the second (1,1) The initial word vector of each word: vca (1, 1, 1) ~ vca (1, 1, wo (1,1) ); Calculate wo (1,1) ~wo (1,se(1)) The sum of is recorded as WOA; calculate wo (1,1) ~wo (pa,se(pa)) The sum of is recorded as WOB; Process A243: Cluster the initial vector vca (1, 1, 1) to obtain the word vector vc (1, 1, 1); Process A244: Repeat the same process of processing vca (1,1,1) to process vca (1,1,2) ~ vca (1,1,wo (1,1) ), get the word vector vc (1,1,2) ~ vc (1,1,wo (1,1) ).
4. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 1 is characterized in that: The specific process of the process A28 is as follows: Process A281: Define calculation formula A3: ; Among them, soc (1,j) represents the dot product of the first quasi-vector and the jth quasi-vector; Kix(j) represents the key vector of the jth quasi-vector, and the value range of j is: 2~nw; dk represents the weight matrix W K The dimension of ;× represents matrix multiplication, and T represents the transpose of the matrix; Kix (1) ~Kix (nw) Substituting into formula A3, we can get the dot product of the first quasi-vector and the second to nwth quasi-vectors: soc (1,2) ~soc (1,nw) ; Process A282: Calculate soc (1,2) ~soc (1,nw) De is written as so (1) ; Define calculation formula A4: ; Among them, α (1,j) represents the weight of the first quasi-vector relative to the jth quasi-vector; Substituting into formula A4, we can obtain the weight of the first quasi-vector relative to the second to nw quasi-vectors: (1,2) ~α (1,nw) ; Process A282: According to soc (1,2) ~soc (1,nw) and α (1,2) ~α (1,nw) Calculate the attention score MA of the first quasi-vector (1) , MA (1) The calculation formula is: 。 5. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 1 is characterized in that: The workflow of the content screening module is as follows: Process B1: Use K-means clustering algorithm to cluster manuscripts (1,1) ~mu (pn,im(pn)) Convert to text vector and get text vector ve (1,1) ~ve (pn,im(pn)) ; Among them, the vector ve (1,1) Indicates manuscript mu (1,1) The corresponding text vector; vector ve (pn,im(pn)) Indicates manuscript mu (pn,im(pn)) The corresponding text vector; Process B2: Obtain a manuscript with false content as correction manuscript A, and obtain a manuscript with inappropriate content as correction manuscript B; The number of statistically corrected manuscripts A is recorded as wa, and the number of statistically corrected manuscripts B is recorded as wb; Using the K-means clustering algorithm, the 1st to wath correction manuscripts A are converted into text vectors to obtain the text vector wve (1,1) ~wve (1,wa) ; Convert the 1st to wbth error correction manuscripts A into text vectors to obtain the text vector wve (2,1) ~wve (2,wb) ; Process B3: According to vector ve (1,1) ~ve (pn,im(pn)) and vector wve (1,1) ~wve (1,wa) , remove the manuscript mu (1,1) ~mu (pn,im(pn)) False content in the manuscript; Process B4: Repeated judgment of manuscript mu (1,1) ~mu (pn,im(pn)) Is it a fake content manuscript? The same process, with ve (1,1) ~ve (pn,im(pn)) and vector wve (2,1) ~wve (2,wb) As a benchmark, remove the manuscript mu (1,1) ~mu (pn,im(pn)) Manuscripts with inappropriate content.
6. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 5 is characterized in that: The specific process of process B3 is as follows: Process B31: Determine manuscript mu (1,1) Whether the content is false; Calculate manuscript mu (1,1) The dot product of the corrected manuscript A is denoted as jd; the calculation formula of jd is: ; Where × represents matrix multiplication and T represents matrix transpose; wve (1,j) Represents the text vector of the jth error-corrected manuscript A, where the value of j ranges from 1 to wa; Process B32: Calculate vector ve (1,1) The norm of , denoted as fa; the calculation formula of fa is: ; Calculate wve (1,1) ~wve (1,wa) The average norm of is denoted as fb; the calculation formula of fb is: ; Process B33: Calculate vector ve (1,1) About vector wve (1,1) ~wve (1,wa) The cosine similarity of is denoted as csi; the calculation formula of csi is: csi = jd / (fa×fb); Determine whether (1-csi) is less than ε; where ε represents the judgment coefficient; If (1-csi) is greater than or equal to ε, then the manuscript mu (1,1) It is not a false content manuscript; If (1-csi) is less than ε, then the manuscript mu (1,1) It is a manuscript with false content; Process B34: Repeated judgment of manuscript mu (1,1) Is it a fake content manuscript? The same process, with ve (1,2) ~ve (pn,im(pn)) and vector wve (1,1) ~wve (1,wa) As a benchmark, remove the manuscript mu (1,2) ~mu (pn,im(pn)) False content in the manuscript; Among them, the vector ve (1,2) Indicates manuscript mu (1,2) The corresponding text vector.
7. The manuscript content recognition and analysis system based on natural language processing and artificial intelligence according to claim 3 is characterized in that: The details of the process A243 are as follows: Process A2431: Calculate the frequency of the first word in the first to se(1) sentences and record it as TF (1) ~TF (se(1)) ; The word frequency in paragraphs 1 to pa is recorded as TF (1-1) ~TF (1-pa) ; The frequency of all words in manuscript A is recorded as TF (1-1-e) ; Calculate the inverse document frequency of the first word in all manuscripts and record it as IDF (1,1,1) ; Process A2432: Calculate TF in sequence (1) ~TF (se(1)) and TF (1-1) ~TF (1-pa) The average values of are denoted as aTF and bTF; Perform a linear change on vca (1,1,1) to obtain the word vector vc (1,1,1); the calculation formula of the word vector vc (1,1,1) is: 。
Citation Information
Patent Citations
Automatic text generation method and device, electronic device and storage medium
CN112417846A
Construction land acquisition immigrant archive management method and system based on natural language processing
CN117828007A