Content Traceability Method and Device Based on Key Information Extraction
By extracting and tracing key information from the content generated by the large model, the issues of content interpretability and traceability are resolved, the source and basis of the content are made transparent, and user trust is enhanced.
Patent Information
- Application Number
- CN202510604767.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-05-12
AI Technical Summary
Large models have interpretability and traceability issues when generating content. Users cannot clearly understand the source and basis of the content generated by the model, which affects its credibility and transparency.
By extracting key information from the generated content, including complete paragraphs, indicator data, and key names, and matching it with materials within a preset range, the source of key information is traced using structured data extraction interfaces and semantic matching technology, providing highlighted marks and source information.
It improves the credibility and transparency of model-generated content, enabling users to clearly understand the source and basis of the content and enhancing user trust.
Smart Images

Figure CN120197610B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of content traceability technology, and in particular to a content traceability method and apparatus based on key information extraction. Background Technology
[0002] Large models generally refer to deep learning models with a large number of parameters (typically hundreds of millions to tens of billions of parameters). These models are trained on massive amounts of data, enabling them to exhibit very strong generalization and transfer learning capabilities across a variety of tasks. Large models are not only suitable for optimizing specific tasks, but can also be applied to other related fields through fine-tuning.
[0003] Currently, large models have issues with interpretability and traceability when generating content. Because users cannot clearly understand the source, basis, and relevant evidence of the content generated by the model, the credibility and transparency of the model are low, which in turn affects users' enthusiasm for using it. Summary of the Invention
[0004] The purpose of this invention is to at least address one of the shortcomings of the prior art and to provide a content tracing method and apparatus based on key information extraction.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] Specifically, a content tracing method based on key information extraction is proposed, including the following:
[0007] Obtain the generated content to be traced, and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including people's names, place names, and organization names.
[0008] Match the key name with the preset range of materials to find the paragraph or sentence where the material with the same key name is located, and obtain the key name source tracing results;
[0009] Match the indicator data with the preset range of materials to find the paragraph or sentence where the material that matches the indicator data is located, and obtain the source tracing result of the indicator data;
[0010] The complete paragraph is semantically matched with the materials within a preset range to find materials and paragraphs that meet the preset conditions, thus obtaining the paragraph source tracing results;
[0011] Output the source tracing results for key names, indicator data, and paragraphs.
[0012] Furthermore, specifically, the process of obtaining the source code results for key names includes...
[0013] The structured data extraction interface is called to extract the names of people, places, and organizations from the generated content to obtain the extracted key names;
[0014] The extracted keywords are marked with red circles;
[0015] The extracted key names are numerically matched with the preset range of materials.
[0016] If a match is successful, the paragraph or sentence containing the material that matches the keyword name is found and its source information is marked as the keyword source tracing result.
[0017] If the match fails, the source result of the key name will be marked as empty.
[0018] Furthermore, specifically, the results of tracing the source of the indicator data are obtained, including:
[0019] Step 310: Call the structured data extraction interface to extract indicator data from the generated content. The indicator data includes indicator name, indicator value, and the text position of the indicator in the generated content.
[0020] Step 320: Determine whether indicator data has been extracted. If yes, proceed to step 330. Otherwise, mark the indicator data tracing result as empty.
[0021] Step 330: Determine whether there are cache indicators in the resource content of the preset range of materials. If yes, proceed to step 340. Otherwise, extract indicators from the resource content of the preset range of materials. If indicators are extracted, cache them according to the resource ID of the resource content to obtain cache indicators and then proceed to step 340. If no indicators are extracted, mark the indicator data traceability result as empty.
[0022] Step 340: Match the indicator data with the cached indicators, and mark the source information of the corresponding resource ID of the cached indicator that successfully matches the indicator data as the indicator data tracing result.
[0023] Furthermore, the method also includes,
[0024] Set up a preset sentence recognition interface, call the preset sentence recognition interface, perform specific sentence recognition on the generated content to obtain specific sentence recognition results, the specific sentences include preset sentences and ancient poems, and mark the source information of the specific sentences according to the specific sentence recognition results.
[0025] Furthermore, specifically, the process of obtaining paragraph source tracing results includes,
[0026] The entire paragraph is semantically matched with a preset range of materials. Specifically...
[0027] The system iteratively compares complete paragraphs with materials within a preset range to obtain a first similarity matching result. Paragraphs whose first similarity matching results exceed a first threshold are marked as similar paragraphs, and their source information is also marked.
[0028] If there is no first similarity match result exceeding the first threshold, the complete paragraph is extracted to obtain a complete sentence, and the complete sentence is matched with the preset range of materials to obtain a second similarity match result. Sentences whose second similarity match result exceeds the second threshold are marked as similar sentences and their source information is marked.
[0029] If no second similarity match result exceeding the second threshold is found, then user-preselected word tracing is performed to obtain the user-preselected word tracing result.
[0030] Furthermore, specifically, user-preselected word tracing is performed to obtain user-preselected word tracing results, including:
[0031] The preset range of materials are converted into word form to obtain multiple different words, which are then used to form a set Ptc.
[0032] Based on the user's pre-selected words, calculate the multiple word preference sets of the user's pre-selected words in the set Ptc;
[0033] Calculate the average tendency degree of all elements in each word tendency set, and select the word tendency set whose average tendency degree ranks in the top N items as the trace word tendency set;
[0034] The content in the preset range of materials corresponding to the traceability word tendency set is the traceability result of the user's pre-selected words.
[0035] Furthermore, specifically, the preset range of materials are converted into word forms to obtain multiple different words, which together form a set Ptc, including...
[0036] The text content in the preset range of materials is extracted by removing punctuation marks. The text content is then segmented into multiple different words using a classic word segmentation algorithm. These words are then used to form a set Ptc.
[0037] Furthermore, specifically, based on the user's pre-selected words, calculate multiple word tendency sets for each word in the set Ptc, including:
[0038] Let the set of user-selected words be denoted as the set Querys, let the number of elements in the set Querys be n, and let the index of the elements in the set Querys be i, i∈[1,n], then Querys={Q(1),Q(2),…,Q(n-1),Q(n)};
[0039] Let m be the number of elements in set Ptc, and j be the index of the elements in set Ptc, where j∈[1,m]. Then Ptc={Ptc(1), Ptc(2),…, Ptc(m-1), Ptc(m)};
[0040] Let variable k represent the array length of each word Ptc(j) in the set Ptc, variable h represent the index of the string in word Ptc(j), and Ptc(j) represent the string with index h in the element with index j in the set Ptc, where h∈[1,k]. Then Ptc(j)=[Ptc(j,1),Ptc(j,1),…, Ptc(j,k-1), Ptc(j,k)];
[0041] Let Glv() be the function that calculates the word vector of the input string using the word embedding algorithm. Glv(Ptc(j,h)) represents the word vector of the string with index h in the element with index j in the set Ptc, obtained by the word embedding algorithm. Let G(j,h)=Glv(Ptc(j,h)). Glv(Q(i)) represents the word vector of the string with index i in the set Querys, obtained by the word embedding algorithm. Let Gq(i)=Glv(Q(i)). The variable q represents the q-th dimension of the word vector, the variable p represents the number of dimensions of the word vector, G(j,h)[q] represents the value of the q-th dimension of the word vector G(j,h), and Gq(i)[q] represents the value of the q-th dimension of the word vector Gq(i).
[0042] The function Sim() calculates the tendency between two input vectors. The function Sim(Gq(i),G(j,h)) calculates the tendency between word vectors Gq(i) and G(j,h) using Sim(). The formula for calculating the tendency Sim(Gq(i),G(j,h)) is as follows:
[0043] ;
[0044] Calculate the multiple word preference sets of each user-selected word in the Querys set and each word in the Ptc set, including the following steps.
[0045] S401, set the value of variable i to 1; create an empty set Chianset, which is distinct and ordered; go to S402;
[0046] S402, retrieve the element Q(i) with index i in the Querys; obtain Gq(i) of Q(i) using the function Glv(); go to S403;
[0047] S403, set the value of variable j to 1; go to S404;
[0048] S404, retrieve the element Ptc(j) with index j in Ptc; create an empty array Simset; go to S405;
[0049] S405, set the value of variable h to 1; go to S406;
[0050] S406, retrieve the element Ptc(j,h) with index h in Ptc(j); obtain G(j,h) of Ptc(j,h) through the function Glv(); go to S407;
[0051] S407, obtain the tendency trend Sim(Gq(i),G(j,h)); add the tendency trend Sim(Gq(i),G(j,h)) to the array Simset; go to S408;
[0052] S408, determine whether the constraint condition h≧k is satisfied. If yes, go to S4081; otherwise, go to S4082.
[0053] S4081, calculate the arithmetic mean sim_avg of each element in the array Simset, and take the set of indices of each element in the array Simset whose value is greater than sim_avg as the set Seq; take each element in the set Seq as the target index, extract the element with the target index in Ptc(j) as the array Chain, and add the array Chain to the set Chainset; go to S409;
[0054] S4082, Increment the value of h by 1; Go to S406;
[0055] S409, set the value of h to 1; go to S410;
[0056] S410, determine whether the constraint condition j≥m is satisfied. If yes, go to S411; otherwise, go to S4101.
[0057] S4101, Increment the value of j by 1; Go to S404;
[0058] S411, Set the value of j to 1; Go to S412;
[0059] S412, determine whether the constraint condition i≥n is satisfied. If yes, go to S413; otherwise, go to S4121.
[0060] S4121, Increment the value of i by 1; Go to S402;
[0061] S413, obtain the set Chianset;
[0062] Each array in the set Chianset is a word tendency set for each search ranking keyword in the corresponding set Querys. The set of multiple word tendency sets is called the set Litset.
[0063] The present invention also proposes a device for content tracing based on key information extraction, characterized in that it includes the following:
[0064] The data acquisition module is used to acquire the generated content to be traced and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including people's names, place names, and organization names.
[0065] The keyword tracing module is used to match keywords with preset range of materials, find the paragraph or sentence where the material with the same keyword is located, and obtain the keyword tracing results.
[0066] The indicator data tracing module is used to match indicator data with materials within a preset range, find the paragraph or sentence position where the material that matches the indicator data is located, and obtain the indicator data tracing result.
[0067] The paragraph tracing module is used to semantically match complete paragraphs with materials within a preset range, find materials and paragraphs that meet preset conditions, and obtain paragraph tracing results;
[0068] The results output module is used to output the source tracing results of key names, indicator data, and paragraphs.
[0069] The beneficial effects of this invention are as follows:
[0070] This invention proposes a content tracing method and apparatus based on key information extraction. By extracting key information from the generated content, and tracing key names, indicator data, and complete paragraphs based on the extracted key information, the tracing mechanism added to the content generated by the AI model allows users to clearly understand the source, basis, and relevant evidence of the model-generated content, thereby improving the credibility and transparency of the model. Attached Figure Description
[0071] The above and other features of this disclosure will become more apparent from the detailed description of the embodiments illustrated in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar elements. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings:
[0072] Figure 1 The diagram shows a flowchart of the content tracing method based on key information extraction according to the present invention.
[0073] Figure 2 The diagram shown is a flowchart of a complete paragraph tracing process in one embodiment of the present invention;
[0074] Figure 3 The diagram shown is a flowchart of a preset statement tracing process in one embodiment of the present invention;
[0075] Figure 4 The diagram shown is a flowchart of key name tracing in one embodiment of the present invention;
[0076] Figure 5 The diagram shown is a flowchart of indicator tracing in one embodiment of the present invention. Detailed Implementation
[0077] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The same reference numerals used throughout the accompanying drawings indicate the same or similar parts.
[0078] Example 1, referring to Figure 1 This invention proposes a content tracing method based on key information extraction, including the following:
[0079] Step 110: Obtain the generated content to be traced, and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including personal names, place names, and organization names.
[0080] Step 120: Match the key name with the preset range of materials, find the paragraph or sentence where the material with the same key name is located, and obtain the key name source tracing results;
[0081] Step 130: Match the indicator data with the preset range of materials, find the paragraph or sentence position where the material that matches the indicator data is located, and obtain the indicator data tracing result;
[0082] Step 140: Perform semantic matching between the complete paragraph and the preset range of materials to find the materials and paragraphs that meet the preset conditions and obtain the paragraph source tracing results;
[0083] Step 150: Output the source tracing results of key names, indicator data, and paragraphs.
[0084] In this embodiment 1, by extracting key information from the generated content and tracing key names, indicator data, and complete paragraphs based on the extracted key information, a tracing mechanism is added to the content generated by the AI model, allowing users to clearly understand the source, basis, and relevant evidence of the model-generated content, thereby improving the model's credibility and transparency. In addition, the traced content is highlighted in the original material content location for users to review.
[0085] As a preferred embodiment of the present invention, specifically, the process of obtaining the keyword tracing results includes:
[0086] The structured data extraction interface is called to extract the names of people, places, and organizations from the generated content to obtain the extracted key names;
[0087] The extracted keywords are marked with red circles;
[0088] The extracted key names are numerically matched with the preset range of materials.
[0089] If a match is successful, the paragraph or sentence containing the material that matches the keyword name is found and its source information is marked as the keyword source tracing result.
[0090] If the match fails, the source result of the key name will be marked as empty.
[0091] In this preferred embodiment, the structured data extraction interface is first called to extract personal names, place names, and organization names from the generated content; the extracted data is marked with red circles; based on the extracted data, it is matched with the resource content of the specified range of materials, and if they exist, the source information is marked, including: resource title, resource library identifier, and publication date.
[0092] In a preferred embodiment of the present invention, specifically, obtaining the source tracing results of the indicator data includes,
[0093] Step 310: Call the structured data extraction interface to extract indicator data from the generated content. The indicator data includes indicator name, indicator value, and the text position of the indicator in the generated content.
[0094] Step 320: Determine whether indicator data has been extracted. If yes, proceed to step 330. Otherwise, mark the indicator data tracing result as empty.
[0095] Step 330: Determine whether there are cache indicators in the resource content of the preset range of materials. If yes, proceed to step 340. Otherwise, extract indicators from the resource content of the preset range of materials. If indicators are extracted, cache them according to the resource ID of the resource content to obtain cache indicators and then proceed to step 340. If no indicators are extracted, mark the indicator data traceability result as empty.
[0096] Step 340: Match the indicator data with the cached indicators, and mark the source information of the corresponding resource ID of the cached indicator that successfully matches the indicator data as the indicator data tracing result.
[0097] In this preferred embodiment, the large model interface is first called to extract the metrics of the generated content. The extracted information includes the metric name, metric value, and text position. Then, the metrics of the material resource content are extracted. If the metrics are extracted, they are cached according to the resource ID. The metrics of the generated content and the metrics of the material resources are compared and matched. If the metric name and metric value are the same, the source information of the metric is marked, including: resource ID, resource title, resource library identifier, release date, and text position of the metric.
[0098] In addition, considering the time-consuming nature of the large model interface, a caching mechanism is adopted to cache the indicator data of the specified material (persist to the database). That is, firstly, the cache indicator is obtained based on the resource ID of the material. If it cannot be obtained, the large model interface is called to extract the indicator. After the indicator is extracted, it is cached based on the resource ID.
[0099] Furthermore, to address the issue of multiple specified materials, a method of extraction and comparison is adopted for each material. That is, the generated content and the first material are input for the first time, and the indicators are extracted and compared, and the source of the matched indicator is rendered. The second time, the indicators of the already extracted generated content and the second material are input, and the indicators are extracted and compared, and the source of the newly matched indicator is rendered. Then, the process continues to the next material until the comparison of all specified materials is completed.
[0100] The structure of the resource indicator cache table in specific applications is shown in Table 1 below.
[0101]
[0102] Table 1
[0103] Reference Figure 3 In a preferred embodiment of the present invention, the method further includes,
[0104] Set up a preset sentence recognition interface, call the preset sentence recognition interface, perform specific sentence recognition on the generated content to obtain specific sentence recognition results, the specific sentences include preset sentences and ancient poems, and mark the source information of the specific sentences according to the specific sentence recognition results.
[0105] In this preferred embodiment, a preset sentence recognition interface is invoked to identify specific sentences in the generated content, including preset sentences, ancient poems, etc., and the source information of the specific sentences is marked. The marked content includes: resource ID, resource title, resource library identifier, and publication date.
[0106] In a preferred embodiment of the present invention, the process of obtaining paragraph tracing results specifically includes:
[0107] The entire paragraph is semantically matched with a preset range of materials. Specifically...
[0108] The system iteratively compares complete paragraphs with materials within a preset range to obtain a first similarity matching result. Paragraphs whose first similarity matching results exceed a first threshold are marked as similar paragraphs, and their source information is also marked.
[0109] If there is no first similarity match result exceeding the first threshold, the complete paragraph is extracted to obtain a complete sentence, and the complete sentence is matched with the preset range of materials to obtain a second similarity match result. Sentences whose second similarity match result exceeds the second threshold are marked as similar sentences and their source information is marked.
[0110] If no second similarity match result exceeding the second threshold is found, then user-preselected word tracing is performed to obtain the user-preselected word tracing result.
[0111] In this preferred embodiment, paragraphs (separated by line breaks) with more than 20 characters are first extracted from the generated content to form a generated paragraph list; then, paragraphs with more than 20 characters are extracted from the resource content of the specified range of materials to form a material paragraph list; sentences (separated by commas and periods) with more than 20 characters are extracted from the resources of the specified range of materials to form a material sentence list; the paragraph list is generated cyclically, and its similarity is compared with the resource paragraph list. The paragraph with the highest similarity exceeding a specified threshold (tentatively 80%) is marked with its source information, including: resource ID, resource title, resource library identifier, publication date, and similar paragraph content; if no similar paragraph is found, sentences are extracted from the generated paragraph content and compared with the material sentences. The sentence with the highest similarity exceeding the specified threshold is marked with its source information, including: resource ID, resource title, resource library identifier, publication date, and similar sentence content. In addition, considering that even if the traceable content cannot be found through similarity comparison, users may still have doubts, a traceability algorithm based on user-preselected words is added. This algorithm uses user-preselected words to perform fuzzy traceability of related words, in order to find the source results as much as possible.
[0112] The following are preferred implementations of some interface designs for paragraph tracing, as shown in Table 2 below.
[0113]
[0114] Table 2
[0115] In a preferred embodiment of the present invention, specifically, the process of tracing user-preselected words to obtain user-preselected word tracing results includes,
[0116] The preset range of materials are converted into word form to obtain multiple different words, which are then used to form a set Ptc.
[0117] Based on the user's pre-selected words, calculate the multiple word preference sets of the user's pre-selected words in the set Ptc;
[0118] Calculate the average tendency degree of all elements in each word tendency set, and select the word tendency set whose average tendency degree ranks in the top N items as the trace word tendency set;
[0119] The content in the preset range of materials corresponding to the traceability word tendency set is the traceability result of the user's pre-selected words.
[0120] In this preferred embodiment, by converting tokens from a preset range of materials into word forms, and by calculating the word tendency trend, words most likely to have a traceability relationship with the user's pre-selected words are found, and a word tendency set is formed based on the association relationship. Then, the content in the preset range of materials corresponding to the word tendency set with the top N items in the average tendency trend is used as the traceability result of the user's pre-selected words for feedback. This can accurately trace the user's questionable keywords and meet the user's usage needs.
[0121] In a preferred embodiment of the present invention, specifically, the preset range of materials are converted into word forms to obtain multiple different words, which together form a set Ptc, including,
[0122] The text content in the preset range of materials is extracted by removing punctuation marks. The text content is then segmented into multiple different words using a classic word segmentation algorithm. These words are then used to form a set Ptc.
[0123] In this preferred embodiment, the electrostatic word segmentation algorithm is used to quickly convert materials within a preset range into tokens in the form of words.
[0124] In a preferred embodiment of the present invention, specifically, based on the user-preselected words, multiple word tendency sets of each word in the set Ptc are calculated, including,
[0125] Let the set of user-selected words be denoted as the set Querys, let the number of elements in the set Querys be n, and let the index of the elements in the set Querys be i, i∈[1,n], then Querys={Q(1),Q(2),…,Q(n-1),Q(n)};
[0126] Let m be the number of elements in set Ptc, and j be the index of the elements in set Ptc, where j∈[1,m]. Then Ptc={Ptc(1), Ptc(2),…, Ptc(m-1), Ptc(m)};
[0127] Let variable k represent the array length of each word Ptc(j) in the set Ptc, variable h represent the index of the string in word Ptc(j), and Ptc(j) represent the string with index h in the element with index j in the set Ptc, where h∈[1,k]. Then Ptc(j)=[Ptc(j,1),Ptc(j,1),…, Ptc(j,k-1), Ptc(j,k)];
[0128] Let Glv() be the function that calculates the word vector of the input string using the word embedding algorithm. Glv(Ptc(j,h)) represents the word vector of the string with index h in the element with index j in the set Ptc, obtained by the word embedding algorithm. Let G(j,h)=Glv(Ptc(j,h)). Glv(Q(i)) represents the word vector of the string with index i in the set Querys, obtained by the word embedding algorithm. Let Gq(i)=Glv(Q(i)). The variable q represents the q-th dimension of the word vector, the variable p represents the number of dimensions of the word vector, G(j,h)[q] represents the value of the q-th dimension of the word vector G(j,h), and Gq(i)[q] represents the value of the q-th dimension of the word vector Gq(i).
[0129] The function Sim() calculates the tendency between two input vectors. The function Sim(Gq(i),G(j,h)) calculates the tendency between word vectors Gq(i) and G(j,h) using Sim(). The formula for calculating the tendency Sim(Gq(i),G(j,h)) is as follows:
[0130] ;
[0131] Calculate the multiple word preference sets of each user-selected word in the Querys set and each word in the Ptc set, including the following steps.
[0132] S401, set the value of variable i to 1; create an empty set Chianset, which is distinct and ordered; go to S402;
[0133] S402, retrieve the element Q(i) with index i in the Querys; obtain Gq(i) of Q(i) using the function Glv(); go to S403;
[0134] S403, set the value of variable j to 1; go to S404;
[0135] S404, retrieve the element Ptc(j) with index j in Ptc; create an empty array Simset; go to S405;
[0136] S405, set the value of variable h to 1; go to S406;
[0137] S406, retrieve the element Ptc(j,h) with index h in Ptc(j); obtain G(j,h) of Ptc(j,h) through the function Glv(); go to S407;
[0138] S407, obtain the tendency trend Sim(Gq(i),G(j,h)); add the tendency trend Sim(Gq(i),G(j,h)) to the array Simset; go to S408;
[0139] S408, determine whether the constraint condition h≧k is satisfied. If yes, go to S4081; otherwise, go to S4082.
[0140] S4081, calculate the arithmetic mean sim_avg of each element in the array Simset, and take the set of indices of each element in the array Simset whose value is greater than sim_avg as the set Seq; take each element in the set Seq as the target index, extract the element with the target index in Ptc(j) as the array Chain, and add the array Chain to the set Chainset; go to S409;
[0141] S4082, Increment the value of h by 1; Go to S406;
[0142] S409, set the value of h to 1; go to S410;
[0143] S410, determine whether the constraint condition j≥m is satisfied. If yes, go to S411; otherwise, go to S4101.
[0144] S4101, Increment the value of j by 1; Go to S404;
[0145] S411, Set the value of j to 1; Go to S412;
[0146] S412, determine whether the constraint condition i≥n is satisfied. If yes, go to S413; otherwise, go to S4121.
[0147] S4121, Increment the value of i by 1; Go to S402;
[0148] S413, obtain the set Chianset;
[0149] Each array in the set Chianset is a word tendency set for each search ranking keyword in the corresponding set Querys. The set of multiple word tendency sets is called the set Litset.
[0150] The following is an explanation of some of the content.
[0151] 1. A complete paragraph: refers to a complete expression of a thought or viewpoint, usually containing Chinese periods and commas, and generally more than 20 characters.
[0152] 2. Specific sentences: Sentences within a specified range, such as preset statements, classical poems, etc.
[0153] 3. Indicator data: refers to quantitative data used to measure, evaluate, or compare the state, performance, effects, etc., of things in a specific field or industry. For example, in economics, GDP growth rate, unemployment rate, and inflation rate are important economic indicators; in medicine, blood pressure, heart rate, and blood sugar are important health indicators.
[0154] 4. Key names: personal names, place names, organization names.
[0155] The present invention also proposes a device for content tracing based on key information extraction, characterized in that it includes the following:
[0156] The data acquisition module is used to acquire the generated content to be traced and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including people's names, place names, and organization names.
[0157] The keyword tracing module is used to match keywords with preset range of materials, find the paragraph or sentence where the material with the same keyword is located, and obtain the keyword tracing results.
[0158] The indicator data tracing module is used to match indicator data with materials within a preset range, find the paragraph or sentence position where the material that matches the indicator data is located, and obtain the indicator data tracing result.
[0159] The paragraph tracing module is used to semantically match complete paragraphs with materials within a preset range, find materials and paragraphs that meet preset conditions, and obtain paragraph tracing results;
[0160] The results output module is used to output the source tracing results of key names, indicator data, and paragraphs.
[0161] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0162] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0163] Although the description of the invention has been quite detailed and particularly of several described embodiments, it is not intended to limit it to any of these details or embodiments or any particular embodiment, but should be considered as providing a broad possible interpretation of the claims by referring to the appended claims and taking into account the prior art, thereby effectively covering the intended scope of the invention. Furthermore, the invention has been described above with respect to embodiments foreseeable by the inventors in order to provide a useful description, and non-substantial modifications to the invention that have not yet been foreseen may still represent equivalent modifications.
[0164] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any embodiment that achieves the technical effects of the present invention using the same means should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to the technical solutions and / or implementation methods.
Claims
1. A content tracing method based on key information extraction, characterized in that, Including the following: Obtain the generated content to be traced, and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including people's names, place names, and organization names. Match the key name with the preset range of materials to find the paragraph or sentence where the material with the same key name is located, and obtain the key name source tracing results; Match the indicator data with the preset range of materials to find the paragraph or sentence where the material that matches the indicator data is located, and obtain the source tracing result of the indicator data; The complete paragraph is semantically matched with the materials within a preset range to find materials and paragraphs that meet the preset conditions, thus obtaining the paragraph source tracing results; Output the source tracing results for key names, indicator data, and paragraphs; Specifically, the process of obtaining paragraph source tracing results includes, The entire paragraph is semantically matched with a preset range of materials. Specifically... The system iteratively compares complete paragraphs with materials within a preset range to obtain a first similarity matching result. Paragraphs whose first similarity matching results exceed a first threshold are marked as similar paragraphs, and their source information is also marked. If there is no first similarity match result exceeding the first threshold, the complete paragraph is extracted to obtain a complete sentence, and the complete sentence is matched with the preset range of materials to obtain a second similarity match result. Sentences whose second similarity match result exceeds the second threshold are marked as similar sentences and their source information is marked. If there is no second similarity match result exceeding the second threshold, then user pre-selected word tracing is performed to obtain the user pre-selected word tracing result; Specifically, the user-preselected word tracing results are obtained by performing user-preselected word tracing, including: The preset range of materials are converted into word form to obtain multiple different words, which are then used to form a set Ptc. Based on the user's pre-selected words, calculate the multiple word preference sets of the user's pre-selected words in the set Ptc; Calculate the average tendency degree of all elements in each word tendency set, and select the word tendency set whose average tendency degree ranks in the top N items as the trace word tendency set; The content in the preset range of materials corresponding to the traceability word tendency set is the traceability result of the user's pre-selected words; Specifically, the preset range of materials is converted into word form to obtain multiple different words, which together form a set Ptc, including, The text content in the preset range of materials is extracted by removing punctuation marks, and then the text content is segmented into multiple different words using a classic word segmentation algorithm. These words are then used to form a set Ptc. Specifically, based on the user's pre-selected words, calculate multiple word preference sets of the user's pre-selected words in the set Ptc, including, Assume the user selects a total of n pre-selected words; Let the set of user-selected words be denoted as the set Querys, let the number of elements in the set Querys be n, and let the index of the elements in the set Querys be i, i∈[1,n], then Querys={Q(1),Q(2),…,Q(n-1),Q(n)}; Let m be the number of elements in set Ptc, and j be the index of the elements in set Ptc, where j∈[1,m]. Then Ptc={Ptc(1),Ptc(2),…, Ptc(m-1), Ptc(m)}; Let variable k represent the array length of each word Ptc(j) in set Ptc, variable h represent the index of the string in word Ptc(j), and Ptc(j,h) represent the string with index h in the element with index j in set Ptc, where h∈[1,k]. Then Ptc(j)=[Ptc(j,1),Ptc(j,1),…, Ptc(j,k-1), Ptc(j,k)]; Let Glv() be the function that calculates the word vector of the input string using the word embedding algorithm. Glv(Ptc(j,h)) represents the word vector of the string with index h in the element with index j in the set Ptc, obtained by the word embedding algorithm. Let G(j,h)=Glv(Ptc(j,h)). Glv(Q(i)) represents the word vector of the string with index i in the set Querys, obtained by the word embedding algorithm. Let Gq(i)=Glv(Q(i)). The variable q represents the q-th dimension of the word vector, the variable p represents the number of dimensions of the word vector, G(j,h)[q] represents the value of the q-th dimension of the word vector G(j,h), and Gq(i)[q] represents the value of the q-th dimension of the word vector Gq(i). The function Sim() calculates the tendency between two input vectors. The function Sim(Gq(i),G(j,h)) calculates the tendency between word vectors Gq(i) and G(j,h) using Sim(). The formula for calculating the tendency Sim(Gq(i),G(j,h)) is as follows: ; Calculate the multiple word preference sets of each user-selected word in the Querys set and each word in the Ptc set, including the following steps. S401, set the value of variable i to 1; create an empty set Chianset, which is distinct and ordered; go to S402; S402, retrieve the element Q(i) with index i in the Querys; obtain Gq(i) of Q(i) using the function Glv(); go to S403; S403, set the value of variable j to 1; go to S404; S404, retrieve the element Ptc(j) with index j in Ptc; create an empty array Simset; go to S405; S405, set the value of variable h to 1; go to S406; S406, retrieve the element Ptc(j,h) with index h in Ptc(j); obtain G(j,h) of Ptc(j,h) through the function Glv(); go to S407; S407, obtain the tendency trend Sim(Gq(i),G(j,h)); add the tendency trend Sim(Gq(i),G(j,h)) to the array Simset; go to S408; S408, determine whether the constraint condition h≥k is satisfied. If yes, go to S4081; otherwise, go to S4082. S4081, calculate the arithmetic mean sim_avg of each element in the array Simset, and take the set of indices of each element in the array Simset whose value is greater than sim_avg as the set Seq; take each element in the set Seq as the target index, extract the element with the target index in Ptc(j) as the array Chain, and add the array Chain to the set Chainset; go to S409; S4082, Increment the value of h by 1; Go to S406; S409, set the value of h to 1; go to S410; S410, determine whether the constraint condition j≥m is satisfied. If yes, go to S411; otherwise, go to S4101. S4101, Increment the value of j by 1; Go to S404; S411, Set the value of j to 1; Go to S412; S412, determine whether the constraint condition i≥n is satisfied. If yes, go to S413; otherwise, go to S4121. S4121, Increment the value of i by 1; Go to S402; S413, obtain the set Chianset; Each array in the set Chianset is a word tendency set for each search ranking keyword in the corresponding set Querys. The set of multiple word tendency sets is called the set Litset.
2. The content tracing method based on key information extraction according to claim 1, characterized in that, Specifically, the process of obtaining the source code results for key names includes... The structured data extraction interface is called to extract the names of people, places, and organizations from the generated content to obtain the extracted key names; The extracted keywords are marked with red circles; The extracted key names are numerically matched with the preset range of materials. If a match is successful, the paragraph or sentence containing the material that matches the keyword name is found and its source information is marked as the keyword source tracing result. If the match fails, the source result of the key name will be marked as empty.
3. The content tracing method based on key information extraction according to claim 1, characterized in that, Specifically, the results of the source tracing of the indicator data are obtained, including: Step 310: Call the structured data extraction interface to extract indicator data from the generated content. The indicator data includes indicator name, indicator value, and the text position of the indicator in the generated content. Step 320: Determine whether indicator data has been extracted. If yes, proceed to step 330. Otherwise, mark the indicator data tracing result as empty. Step 330: Determine whether there are cache indicators in the resource content of the preset range of materials. If yes, proceed to step 340. Otherwise, extract indicators from the resource content of the preset range of materials. If indicators are extracted, cache them according to the resource ID of the resource content to obtain cache indicators and then proceed to step 340. If no indicators are extracted, mark the indicator data traceability result as empty. Step 340: Match the indicator data with the cached indicators, and mark the source information of the corresponding resource ID of the cached indicator that successfully matches the indicator data as the indicator data tracing result.
4. The content tracing method based on key information extraction according to claim 1, characterized in that, The method also includes, Set up a preset sentence recognition interface, call the preset sentence recognition interface, perform specific sentence recognition on the generated content to obtain specific sentence recognition results, the specific sentences include preset sentences and ancient poems, and mark the source information of the specific sentences according to the specific sentence recognition results.
5. A device for content tracing based on key information extraction, characterized in that, The steps of applying the method according to any one of claims 1-4 include the following: The data acquisition module is used to acquire the generated content to be traced and extract key information from the generated content. The key information includes complete paragraphs, indicator data, and key names, including people's names, place names, and organization names. The keyword tracing module is used to match keywords with preset range of materials, find the paragraph or sentence where the material with the same keyword is located, and obtain the keyword tracing results. The indicator data tracing module is used to match indicator data with materials within a preset range, find the paragraph or sentence position where the material that matches the indicator data is located, and obtain the indicator data tracing result. The paragraph tracing module is used to semantically match complete paragraphs with materials within a preset range, find materials and paragraphs that meet preset conditions, and obtain paragraph tracing results. The results output module is used to output the source tracing results of key names, indicator data, and paragraphs.
Citation Information
Patent Citations
Article key information tracing method and system, readable medium and equipment
CN114661868A
Document comparison tracing method and device and computer storage medium
CN119808752A