Text entity linking method, system, electronic device and storage medium

By building a dictionary tree of regulatory titles and text numbers and using multi-mode matching algorithms for entity linking, the problem of low efficiency and accuracy in regulatory text entity linking is solved, and efficient and accurate regulatory entity linking and automated updates are achieved.

CN114706993BActive Publication Date: 2024-11-26SHUI YOU INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210169887.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2024-11-26
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

The prior art has low efficiency and accuracy in regulatory text entity links, mainly due to the inability to effectively handle the complexity and update frequency of regulatory texts.

Method used

By constructing a legal title dictionary tree and a document number dictionary tree, using a multi-mode matching algorithm to conduct entity links to the text to be processed, combining AC automata and statistical rules to maximize text matching and sorting, to achieve accurate matching and linking of legal titles and document numbers.

Benefits of technology

It significantly improves the efficiency and accuracy of legal text entity linking, reduces the need for manual intervention, and realizes automated regulatory library updates and real-time linking functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114706993B_ABST
    Figure CN114706993B_ABST
Patent Text Reader

Abstract

The present application discloses a text entity linking method, including: obtaining the regulatory text of the target regulation, extracting the regulatory title and regulatory document number from the regulatory text; generating a corresponding title dictionary tree according to the regulatory title; generating a corresponding document number dictionary tree according to the regulatory document number; if a text to be processed is received, then using the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed. The present application can improve the efficiency and accuracy of entity linking of regulatory texts. The present application also discloses a text entity linking system, a storage medium and an electronic device, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of text processing technology, and in particular to a text entity linking method, system, electronic device and storage medium. Background Art

[0002] Entity linking refers to the task of linking a Mention in a text to an entity in a Knowledge Graph. Knowledge Graph can be understood as a large-scale semantic network that aims to describe concepts, entities, and relationships in the objective world. Sometimes it can also be understood in a narrow sense as a knowledge base. Entity is the basic unit of the knowledge graph, and Mention refers to the language fragment that expresses an entity in a text.

[0003] There are a large number of legal texts and they are updated very quickly. Relying solely on keyword matching and punctuation (such as quotation marks, brackets, etc.) to achieve entity linking requires a lot of work and has low accuracy.

[0004] Therefore, how to improve the efficiency and accuracy of entity linking of regulatory texts is a technical problem that technical personnel in this field currently need to solve. Summary of the invention

[0005] The purpose of this application is to provide a text entity linking method, a text entity linking system, a storage medium and an electronic device, which can improve the efficiency and accuracy of entity linking of regulatory texts.

[0006] In order to solve the above technical problems, the present application provides a text entity linking method, which includes:

[0007] Obtaining the regulatory text of the target regulation, and extracting the regulatory title and regulatory document number from the regulatory text;

[0008] Generate a corresponding title dictionary tree according to the regulation title;

[0009] Generate a corresponding document number dictionary tree according to the regulatory document number;

[0010] If a text to be processed is received, the title dictionary tree and the document number dictionary tree are used to perform entity linking on the text to be processed.

[0011] Optionally, obtain the regulatory text of the target regulation, including:

[0012] Crawling the regulatory text of the target regulation from the target website;

[0013] The regulation association information is extracted from the regulation text of the target regulation, and the regulation text of the target regulation is iteratively crawled using the regulation association information.

[0014] Optionally, after extracting the regulation title and regulation number from the regulation text, it also includes:

[0015] Expanding the regulation title and the regulation document number to obtain multiple regulation titles with the same meaning and multiple regulation document numbers with the same meaning;

[0016] A unique corresponding regulation ID is set for the regulation text, a regulation title dictionary is generated according to the corresponding relationship between the regulation ID and the regulation title, and a regulation document number dictionary is generated according to the corresponding relationship between the regulation ID and the regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID;

[0017] Accordingly, a corresponding title dictionary tree is generated according to the regulation title, including:

[0018] Generate the corresponding title dictionary tree according to the regulation title in the regulation title dictionary;

[0019] Accordingly, a corresponding document number dictionary tree is generated according to the regulatory document number;

[0020] Generate the corresponding document number dictionary tree according to the regulatory document numbers in the regulatory document number dictionary.

[0021] Optionally, the regulation title and regulation number are expanded to include:

[0022] abbreviating the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or expanding the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or adjusting the symbols in the regulatory title to obtain an expanded regulatory title;

[0023] The regulatory document number is abbreviated to obtain an expanded regulatory document number; and / or the regulatory document number is expanded to obtain an expanded regulatory document number.

[0024] Optionally, using the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed includes:

[0025] Performing text matching on the text to be processed using the title dictionary tree and the document number dictionary tree to obtain a text matching result; wherein the text matching result includes the title text and / or the document number text, the title text is the text in the text to be processed that exists in the title dictionary tree, and the document number text is the text in the text to be processed that exists in the document number dictionary tree;

[0026] Perform entity linking on the text to be processed according to the text matching result.

[0027] Optionally, entity linking is performed on the text to be processed according to the text matching result, including:

[0028] Performing entity linking on the title text and the document number text that meet preset rules in the text to be processed; wherein the preset rule is that there is no space between the title text and the document number text, or there are only book title marks and / or brackets between the title text and the document number text;

[0029] And / or, setting the title text in the text to be processed that does not conform to the preset rules as the title text without a document number, querying the time text in the text to be processed that is closest to the title text without a document number, and performing entity linking based on the time text and the title text without a document number.

[0030] Optionally, using the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed includes:

[0031] Determine the entity in the text to be processed by using the title dictionary tree and the document number dictionary tree; the entity includes the text of the regulation title and the regulation document number;

[0032] The text to be processed is entity-linked according to the corresponding relationship between the entity and the regulatory text, so that the entity jumps to the corresponding regulatory text after being clicked.

[0033] The present application also provides a text entity linking system, the system comprising:

[0034] A regulation collection module, used to obtain the regulation text of the target regulation, and extract the regulation title and regulation number from the regulation text;

[0035] A dictionary tree generation module is used to generate a corresponding title dictionary tree according to the regulation title; and is also used to generate a corresponding document number dictionary tree according to the regulation document number;

[0036] The entity linking module is used to perform entity linking on the text to be processed by using the title dictionary tree and the document number dictionary tree if the text to be processed is received.

[0037] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned text entity linking method are implemented.

[0038] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned text entity linking method when calling the computer program in the memory.

[0039] The present application provides a text entity linking method, including: obtaining the regulatory text of the target regulation, extracting the regulatory title and regulatory document number from the regulatory text; generating a corresponding title dictionary tree based on the regulatory title; generating a corresponding document number dictionary tree based on the regulatory document number; if a text to be processed is received, using the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed.

[0040] The present application obtains the regulatory text of the target regulation, and extracts the regulatory title and regulatory document number of the regulatory text. The regulatory title is used to describe the name, type, content and other information of the regulation, and the regulatory document number is used to describe the document number of the regulation. The regulatory document number may include information such as the date of issuance and the serial number of issuance. The present application constructs a title dictionary tree based on the regulatory title, generates a corresponding document number dictionary tree based on the regulatory document number, and then uses the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed. Therefore, the present application can improve the efficiency and accuracy of entity linking on the regulatory text. The present application also provides a text entity linking system, a storage medium and an electronic device, which have the above-mentioned beneficial effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 A flowchart of a text entity linking method provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of the structure of a title dictionary tree provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the structure of a document number dictionary tree provided in an embodiment of the present application;

[0045] Figure 4 A structural diagram of a text entity linking system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] See below Figure 1 , Figure 1 A flowchart of a text entity linking method provided in an embodiment of the present application.

[0048] Specific steps may include:

[0049] S101: Obtain the regulatory text of the target regulation, and extract the regulatory title and regulatory document number from the regulatory text;

[0050] Among them, this embodiment can be applied to a text processing device to realize the collection and entity linking of target regulations. The above-mentioned target regulations can be a specific type of regulations or a combination of multiple types of regulations. For example, the target regulations can refer to tax regulations, traffic regulations, etc. This embodiment can obtain the regulatory text of the target regulations from a specific website, or obtain the regulatory text of the target regulations from a database. The regulatory text includes the regulatory title, regulatory document number and regulatory content. The regulatory title refers to the title of the target regulation, the regulatory document number refers to the number of the target regulation, and the regulatory content refers to the specific content of the target regulation.

[0051] For example, the regulatory text of the target regulation is:

[0052] “Announcement of a certain bureau on tax collection and management issues related to the VAT exemption policy for small-scale taxpayers (No. 4 of 2019)

[0053] Article 1: …

[0054] Article 2: ...

[0055] Article 3:…”

[0056] The title of the regulation is "Announcement of a Certain Bureau on Taxation and Administration Issues Related to the Value-Added Tax Exemption Policy for Small-Scale Taxpayers", the regulation number is No. 4 of 2019, and the content of the regulation is Articles 1 to 3.

[0057] Specifically, after obtaining the regulatory text, the regulatory text may be cleaned and formatted to obtain a batch of standardized regulatory titles and regulatory numbers. In this embodiment, the regulatory title and regulatory number in the regulatory text may be determined by punctuation marks, keywords or regular expressions.

[0058] S102: Generate a corresponding title dictionary tree according to the regulation title;

[0059] Among them, on the basis of extracting the regulation title and regulation document number, this embodiment can set a unique corresponding regulation ID for the regulation text, and generate a regulation title dictionary according to the correspondence between the regulation ID and the regulation title, and generate a regulation document number dictionary according to the correspondence between the regulation ID and the regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID. This step can generate the corresponding title dictionary tree according to the regulation title in the regulation title dictionary.

[0060] S103: Generate a corresponding document number dictionary tree according to the regulatory document number;

[0061] S102 and S103 may be executed successively or simultaneously, and this embodiment does not limit the execution order of S102 and S103. This step may generate the corresponding document number dictionary tree according to the regulatory document number in the regulatory document number dictionary.

[0062] S104: If a text to be processed is received, entity linking is performed on the text to be processed using the title dictionary tree and the document number dictionary tree.

[0063] Among them, the text to be processed refers to the text that needs to be entity linked. This embodiment can use a multi-mode matching algorithm to query the entities in the text to be processed from the title dictionary tree and the document number dictionary tree, and link the corresponding entities to complete the entity linking operation on the text to be processed.

[0064] Specifically, this embodiment uses the title dictionary tree and the document number dictionary tree to determine the entities in the text to be processed; the entities include the text of the regulation title and the regulation number; the text to be processed is entity-linked according to the correspondence between the entity and the regulation text, so that the entity jumps to the corresponding regulation text after being clicked. For example, there is an entity "20xx No. 6 "Invoice Management Measures Implementation Rules"" in the text to be processed. After the above text is entity-linked, if the user clicks on the above entity, it will automatically jump to the regulation text corresponding to "20xx No. 6 "Invoice Management Measures Implementation Rules".

[0065] This embodiment obtains the regulatory text of the target regulation and extracts the regulatory title and regulatory document number of the regulatory text. The regulatory title is used to describe the name, type, content and other information of the regulation, and the regulatory document number is used to describe the document number of the regulation. The regulatory document number may include information such as the date of issuance and the serial number of issuance. This embodiment constructs a title dictionary tree based on the regulatory title, generates a corresponding document number dictionary tree based on the regulatory document number, and then uses the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed. Therefore, this embodiment can improve the efficiency and accuracy of entity linking on the regulatory text.

[0066] As for Figure 1 Further introduction to the corresponding embodiment, this embodiment can obtain the regulatory text of the target regulation by iterative crawling. The specific process is as follows: crawl the regulatory text of the target regulation from the target website; extract regulatory association information from the regulatory text of the target regulation, and iteratively crawl the regulatory text of the target regulation using the regulatory association information. The above-mentioned regulatory association information can be regulatory abolition information and / or regulatory revision information. This embodiment can determine the above-mentioned regulatory association information by matching keywords (such as abolition, revision, adjustment, etc.). This embodiment obtains new target regulations based on regulatory association relationships such as abolition and revision between regulations, and automatically expands the regulatory list when the regulatory source website does not have more regulatory directories, thereby ensuring the integrity of tax regulations collection. This embodiment also forms a set of automated regulatory update methods, and the addition of the regulatory library becomes timely and does not rely on manual supplementation.

[0067] Taking the target regulations as tax regulations as an example, the above process is explained:

[0068] When there is no data, tax laws and regulations can be crawled from authoritative websites through standardized web crawlers, web page queries and other methods and stored in the regulations database. At this time, the text of the first batch of tax laws and regulations can be obtained. In actual applications, the first batch of tax laws and regulations obtained are incomplete and defective, and a considerable number of laws and regulations will be revised by other laws and regulations, or revise other laws and regulations, or be repealed by other laws and regulations, and it is mentioned in the text that "this regulation is repealed by xxx regulations". In addition, there are also regulations specifically used to announce the repeal and revision of other laws and regulations. According to the summary of experts' experience, clauses containing words such as "repeale", "revise" and "adjust" in their content are likely to describe a repeal or revision relationship. For example, in Article 7 of the "Notice on the Urban Land Use Tax Policy for Class A Enterprises" (

[2015] No. 76): "VII. This notice shall be implemented from July 1, 2015. The former "Notice on the Exemption of Land Use Tax for the Land Used by the Units of Company B" [(89) No. 088] and "Regulations on the Exemption of Land Use Tax for the Land Used by Company C and Its Affiliates" [(90) No. 003] of a certain bureau are hereby repealed." Based on this clause, two regulations, "Notice on the Exemption of Land Use Tax for the Land Used by the Units of Company B" [(89) No. 088] and "Regulations on the Exemption of Land Use Tax for the Land Used by Company C and Its Affiliates" [(90) No. 003], were extracted using regular expressions such as punctuation marks. If these two regulations are not in the existing regulations database, their contents can be crawled and added to the regulations database. In addition, the content of the first paragraph of Article 5 of the Notice of a Certain Bureau on the Implementation of Preferential Tax Reduction and Exemption Policies for Small and Micro Enterprises (No. 13, 2019) states that “V. The Notice of a Certain Bureau on the Tax Policies Concerning Venture Capital Enterprises and Angel Investors (No. 55, 2018) states that the conditions for start-up technology enterprises in Article 2, Item (1) shall be adjusted from ‘the number of employees shall not exceed 200’ to ‘the number of employees shall not exceed 300’, and ‘the total assets and annual sales revenue shall not exceed RMB 30 million’ to ‘the total assets and annual sales revenue shall not exceed RMB 50 million’.” From this, the Notice of a Certain Bureau on the Tax Policies Concerning Venture Capital Enterprises and Angel Investors (No. 55, 2018) can be extracted… By repeatedly iterating the extraction of the abolition relationship and revision relationship in the text of existing regulations through the above method, a new batch of regulations catalogues are obtained. Based on each regulation in this batch of catalogues, a separate web crawler is performed to supplement the regulations library. After a period of operation, most of the existing regulations can be collected. After organizing the code of the above process, you can automatically complete the process of crawling from authoritative websites - extracting regulatory relationships - crawling new regulations based on the release date.

[0069] As for Figure 1Further introduction to the corresponding embodiment, after extracting the regulation title and regulation document number from the regulation text, there may also be an operation of constructing a regulation title dictionary and a regulation document number dictionary, so as to generate the corresponding title dictionary tree according to the regulation title in the regulation title dictionary, and generate the corresponding document number dictionary tree according to the regulation document number in the regulation document number dictionary. Specifically, this embodiment can expand the regulation title and the regulation document number (specifically, quantitative expansion) to obtain multiple regulation titles with the same meaning, and multiple regulation document numbers with the same meaning; set a unique corresponding regulation ID for the regulation text, and generate a regulation title dictionary and a regulation document number dictionary according to the corresponding relationship between the regulation ID, regulation title and regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID. This embodiment can obtain multiple keys according to the combination of the regulation title and regulation document number before and after the expansion, so that the values ​​of the regulation title dictionary and the regulation document number dictionary correspond to multiple keys. This embodiment constructs a dictionary tree of tax laws and regulations by compiling a set of statistical rules through text analysis of a large number of laws and regulations, and uses the maximum text matching method to use AC automata to extract the titles and document numbers of referenced laws and regulations from tax-related texts, and then sorts the results based on certain statistical rules, and automatically returns the laws and regulations linked to the text fragments.

[0070] Although the reference relationship between regulations is established through names and document numbers, some of the texts cited in actual regulations are not absolutely standardized. The cited regulation titles may be missing or redundant, there may be no issuing unit, there may be no document number, etc. In response to the above problems, through the statistical rules after data analysis of the regulation text, we expand the standardized regulation titles and regulation document numbers to obtain multiple regulation titles with the same meaning and multiple regulation document numbers with the same meaning, and use each processed title and document number as the key of the dictionary (dict), and the value is the list of regulation IDs that may correspond to it.

[0071] Assuming that there is a regulation A that cites other regulations, there may be the following different citation methods. In this embodiment, the regulation title can be expanded by any one or more of the following rules 1 to 3:

[0072] Rule 1: Abbreviate the issuing unit in the regulatory title to obtain the expanded regulatory title.

[0073] For example, taking the regulation "Announcement No. 13 of [Name of a Bureau in a City of a Province] in 2019 on Issues Concerning the Issuance of Value-Added Tax Invoices by Enterprises with Anti-Counterfeiting Projects for Chinese Characters such as Rare Earth Enterprises" as an example, when Regulation A quotes this regulation, the quoted text may be "Announcement No. 13 of [Name of a Bureau in a City of a Province] in 2019 on Issues Concerning the Issuance of Value-Added Tax Invoices by Enterprises with Anti-Counterfeiting Projects for Chinese Characters such as Rare Earth Enterprises", or it may be "Announcement No. 13 of [Name of a Bureau in a City] in 2019 on Issues Concerning the Issuance of Value-Added Tax Invoices by Enterprises with Anti-Counterfeiting Projects for Chinese Characters such as Rare Earth Enterprises". That is, there may be abbreviations among the regulation issuing units. Therefore, when processing titles containing issuing units, it is necessary to record both the complete title data of the issuing unit and the abbreviated title of the issuing unit, and add the regulation ID to the list with these texts as keys.

[0074] Rule 2: Expand the issuing unit in the regulation title to obtain the expanded regulation title.

[0075] For example, taking the regulation "Announcement No. 13 of [Name of a Bureau in a City of a Province] in 2019 on Issues Concerning the Issuance of Value-Added Tax Invoices by Enterprises with Anti-Counterfeiting Projects for Chinese Characters such as Rare Earth Enterprises" as an example, when Regulation A quotes this regulation, the quoted text may be "Announcement on Issues Concerning the Issuance of Value-Added Tax Invoices by Enterprises with Anti-Counterfeiting Projects for Chinese Characters such as Rare Earth Enterprises", that is, the document number and the issuing unit are not mentioned. Therefore, when processing titles containing document numbers and issuing units, it is necessary to record both the separate regulation title data and the regulation title data with the issuing unit prefix, and add the regulation ID to the list with these texts as keys.

[0076] Rule 3: Adjust the symbols in the regulation title to obtain the expanded regulation title.

[0077] For example, Regulation A may quote "Decision on Amending the Implementing Rules of the [xxxxxxxxxxx Management Measures]" or "Decision on Amending <Implementing Rules of the [xxxxxxxxxxx Management Measures]>". Therefore, when processing titles containing special symbols, store the titles in both formats and add the regulation ID to the list with these texts as keys.

[0078] This embodiment can also expand the regulatory document number in the following ways: abbreviate the regulatory document number to obtain the expanded regulatory document number; and / or expand the regulatory document number to obtain the expanded regulatory document number. For example, Regulation A may quote "Announcement No. 13 of 2019 by a certain bureau in a certain province and city", or it may quote "No. 13 of 2019". Therefore, when processing the document number, the year and numerical serial number remaining after removing the common prefix will also be saved, and the regulatory ID will be added to the list with these texts as keys. "Announcement No. 13 of 2019 by a certain bureau in a certain province and city" can be abbreviated as "No. 13 of 2019", and "No. 13 of 2019" can be expanded as "Announcement No. 13 of 2019 by a certain bureau in a certain province and city".

[0079] For example, the title text of the regulation "Announcement No. 13 of 2019 by a certain bureau in a certain city in a certain province on issues related to the issuance of value-added tax invoices by rare earth enterprises and other enterprises with Chinese character anti-counterfeiting projects" is "Announcement on issues related to the issuance of value-added tax invoices by rare earth enterprises and other enterprises with Chinese character anti-counterfeiting projects", and the regulation number text is "Announcement No. 13 of 2019 by a certain bureau in a certain city in a certain province".

[0080] By abbreviating the regulation title, we can get the expanded regulation title "Announcement No. 13 of 2019 by a certain bureau of a certain city on the issuance of value-added tax invoices by rare earth enterprises and other Chinese character anti-counterfeiting project enterprises". By abbreviating the regulation number, we can get the expanded regulation number No. 13 of 2019. The regulation ID of "Announcement No. 13 of 2019 by a certain bureau of a certain city on the issuance of value-added tax invoices by rare earth enterprises and other Chinese character anti-counterfeiting project enterprises" is 006. The corresponding relationship between regulation ID, regulation title and regulation number generates the following four keys corresponding to value 006 in the regulation title dictionary:

[0081] Key1: Announcement No. 13 of 2019 issued by a bureau in a certain province and city on the issuance of value-added tax invoices by rare earth enterprises and other Chinese character anti-counterfeiting project enterprises;

[0082] Key2: Announcement No. 13 of 2019 by a certain bureau of a certain city on the issuance of value-added tax invoices by rare earth enterprises and other Chinese character anti-counterfeiting project enterprises;

[0083] Key3: Announcement No. 13 of 2019 on the Issuance of Value-Added Tax Invoices by Rare Earth Enterprises and Other Chinese Character Anti-Counterfeiting Project Enterprises;

[0084] Key4: Announcement on the issuance of value-added tax invoices by rare earth enterprises and other Chinese character anti-counterfeiting project enterprises;

[0085] This regulation will have the value 006 in the regulation document dictionary, corresponding to the following three keys:

[0086] Key1: Announcement No. 13 of 2019 issued by a certain bureau in a certain province and city;

[0087] Key2: Announcement No. 13 of 2019 issued by a certain bureau in a certain city;

[0088] Key3: No. 13, 2019;

[0089] After a series of statistical rules, the regulatory titles and regulatory document numbers are expanded, and the title dictionary tree and document number dictionary tree of the AC automaton are constructed with the title data and document number data respectively. The title dictionary tree and document number dictionary tree are a kind of Trie structure, which is explained by an example below.

[0090] According to the titles ["Announcement on the VAT exemption for small and micro enterprises", "Announcement on the VAT policy for small-scale commercial enterprises", "Notice on the preferential income tax policy for small and micro-profit enterprises", "Reply on the VAT exemption for rare earth phosphate fertilizers", "Announcement on the VAT invoice issuance for rare earth enterprises and other Chinese character anti-counterfeiting project enterprises"], the generated title dictionary tree is as follows: Figure 2 As shown. According to the document number ["D Department

[2012] No. 10", "D Department

[2009] No. 4", "D Department Letter

[2013] No. 25", "E Department

[2012] No. 55", "E Department Letter

[1997] No. 42"], the generated dictionary tree is as follows Figure 3 shown. Figure 2 and Figure 3 Just for example, in fact, a dictionary tree of 200,000 words is very complex. The above can be regarded as a very small subtree fragment in the title dictionary tree and the document number dictionary tree. The dictionary tree generation time is relatively fast, and it only takes less than 2 seconds to generate 200,000 words (single thread, CPU model is Intel Xeon Silver 4210@2.20GHz). 100,000 tax laws can complete the process from reading raw data to generating title dictionary trees and document number dictionary trees within 10 minutes. Since tax laws themselves are limited, this solution has no performance bottleneck.

[0091] As for Figure 1 For further introduction to the corresponding embodiment, entity linking can be performed in the following manner: using the title dictionary tree and the document number dictionary tree to perform text matching on the text to be processed to obtain a text matching result; wherein the text matching result includes title text and / or document number text, the title text is the text in the text to be processed that exists in the title dictionary tree, and the document number text is the text in the text to be processed that exists in the document number dictionary tree; entity linking is performed on the text to be processed based on the text matching result.

[0092] Specifically, entity linking is performed on the text to be processed according to the text matching result, including: entity linking is performed on the title text and the document number text that meet the preset rules in the text to be processed; wherein the preset rule is that there is no space between the title text and the document number text, or there are only book title marks and / or brackets between the title text and the document number text; and / or, the title text that does not meet the preset rules in the text to be processed is set as a title text without a document number, the time text in the text to be processed that is closest to the title text without a document number is queried, and entity linking is performed based on the time text and the title text without a document number.

[0093] After the dictionary tree of the regulation title and document number is constructed, the embodiment can use a multi-mode matching algorithm (such as AC automaton) to find the title and document number in any text that exist in the tree, that is, entity linking of tax-related texts can be performed. The entity linking of regulations is divided into two steps: maximum text matching recall and statistical rule sorting.

[0094] Maximum text matching means that for the words found by the AC automaton in a text, if the long word completely contains the short word, we return the longest word. Taking the sentence "This announcement shall come into effect on April 1, 2021. The "Announcement of a Certain Bureau on Tax Collection and Administration Issues Related to the VAT Exemption Policy for Small-Scale Taxpayers" (No. 4 of 2019) is repealed at the same time." as an example, the tree will find three results: 1. An announcement of a certain bureau on tax collection and administration issues related to the VAT exemption policy for small-scale taxpayers. 2. An announcement on tax collection and administration issues related to the VAT exemption policy for small-scale taxpayers. 3. No. 4 of 2019. Among them, 1 and 2 refer to the title of the same regulation, 2 is completely contained by 1, and we choose fragment 1. In the application scenario of regulatory entity linking, the accuracy of maximum text matching has been well verified.

[0095] After maximum text matching, we obtained a series of regulation titles and regulation numbers mentioned in the text of Regulation A. Since a certain text fragment may correspond to multiple regulations (for example, the Personal Income Tax Law, different Personal Income Tax Laws issued in different years are all called the Personal Income Tax Law), we organized the following statistical rules for screening.

[0096] Statistical rule 1: When the title precedes the document number and is separated from the document number only by quotation marks and parentheses, they refer to the same regulation.

[0097] Statistical rule 2: When only the title is found but no document number is found, compare the year of the specific document number of the regulation that the title may correspond to with the timestamp closest to the title and return the result.

[0098] The entity link of a single tax-related regulation can be completed within 30ms in a single thread (CPU model is Intel Xeon Silver 4210@2.20GHz).

[0099] See also Figure 4 , Figure 4 A structural diagram of a text entity linking system provided in an embodiment of the present application;

[0100] The system may include:

[0101] The regulation collection module 401 is used to obtain the regulation text of the target regulation and extract the regulation title and regulation number from the regulation text;

[0102] The dictionary tree generation module 402 is used to generate a corresponding title dictionary tree according to the regulation title; and is also used to generate a corresponding document number dictionary tree according to the regulation document number;

[0103] The entity linking module 403 is used to perform entity linking on the text to be processed by using the title dictionary tree and the document number dictionary tree if a text to be processed is received.

[0104] This embodiment obtains the regulatory text of the target regulation and extracts the regulatory title and regulatory document number of the regulatory text. The regulatory title is used to describe the name, type, content and other information of the regulation, and the regulatory document number is used to describe the document number of the regulation. The regulatory document number may include information such as the date of issuance and the serial number of issuance. This embodiment constructs a title dictionary tree based on the regulatory title, generates a corresponding document number dictionary tree based on the regulatory document number, and then uses the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed. Therefore, this embodiment can improve the efficiency and accuracy of entity linking on the regulatory text.

[0105] Specifically, the regulations collection module 401 can collect regulations from authoritative websites and supplement the regulations according to the revision relationship in the regulations. The automated update tool can realize the update of regulations. The dictionary tree generation module 402 can perform text processing, AC automaton processing and dictionary tree generation operations on the regulations to obtain the title dictionary tree and document number dictionary tree. The entity linking module 403 can perform maximum text matching and give statistical rules for entity linking. This embodiment establishes a complete and timely updated regulations library, and secondly constructs a fully automatic regulation entity linking algorithm that does not rely on manual labor. For all tax-related texts such as regulations, interpretations of regulatory policies, and regulatory-related questions and answers, links to referenced regulations can be achieved without distinction.

[0106] Furthermore, the regulation collection module 401 is used to crawl the regulation text of the target regulation from the target website; extract regulation association information from the regulation text of the target regulation, and iteratively crawl the regulation text of the target regulation using the regulation association information.

[0107] Furthermore, it also includes:

[0108] A dictionary construction module is used for, after extracting the regulation title and regulation document number from the regulation text, expanding the regulation title and regulation document number to obtain multiple regulation titles with the same meaning and multiple regulation document numbers with the same meaning; it is also used for setting a unique corresponding regulation ID for the regulation text, generating a regulation title dictionary according to the correspondence between the regulation ID and the regulation title, and generating a regulation document number dictionary according to the correspondence between the regulation ID and the regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID;

[0109] Correspondingly, the dictionary tree generation module 402 is used to generate the corresponding title dictionary tree according to the regulatory titles in the regulatory title dictionary; and is also used to generate the corresponding document number dictionary tree according to the regulatory document number in the regulatory document number dictionary.

[0110] Furthermore, the process of expanding the regulatory title and the regulatory document number by the dictionary construction module includes: abbreviating the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or, expanding the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or, adjusting the symbols in the regulatory title to obtain an expanded regulatory title; abbreviating the regulatory document number to obtain an expanded regulatory document number; and / or, expanding the regulatory document number to obtain an expanded regulatory document number.

[0111] Furthermore, the entity linking module 403 is used to perform text matching on the text to be processed using the title dictionary tree and the document number dictionary tree to obtain a text matching result; wherein the text matching result includes title text and / or document number text, the title text is the text in the text to be processed that exists in the title dictionary tree, and the document number text is the text in the text to be processed that exists in the document number dictionary tree; and is also used to perform entity linking on the text to be processed based on the text matching result.

[0112] Furthermore, the process of entity linking the text to be processed by the entity linking module 403 according to the text matching result includes: entity linking the title text and the document number text in the text to be processed that meet the preset rules; wherein the preset rules are that there is no space between the title text and the document number text, or there are only book title marks and / or brackets between the title text and the document number text; and / or, setting the title text in the text to be processed that does not meet the preset rules as a title text without a document number, querying the time text in the text to be processed that is closest to the title text without a document number, and entity linking based on the time text and the title text without a document number.

[0113] Furthermore, the entity linking module 403 is used to determine the entities in the text to be processed using the title dictionary tree and the document number dictionary tree; the entities include the text of the regulatory title and the regulatory document number; and is also used to entity link the text to be processed based on the correspondence between the entity and the regulatory text, so that the entity jumps to the corresponding regulatory text after being clicked.

[0114] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.

[0115] The following is an example of an actual application to illustrate the application of the above text entity linking system to tax law processing:

[0116] Regulating the economy and promoting social equity have become the main goals of the current national taxation. The formally drafted and promulgated regulations are the basis for all taxation behaviors of tax practitioners and taxpayers. Tax regulations should not only cover multiple taxes and the completely different business conditions of taxpayers from all walks of life, but also be constantly updated and revised according to the progress of the times and the development of science and technology. A single policy and regulation may be continuously updated, and there may be a mutual reference relationship between multiple regulations. Local regulations may be a supplement and extension of the regulations issued by the central government... Taxpayers may need to consult multiple regulations to get answers to a single specific business question. Therefore, if there is a text fragment in the tax-related text (including regulations, interpretation documents, tax-related questions and answers, etc.) that mentions other regulations, it is very urgent to be able to link this text to the correct regulations. Taxation is one of the fields with high industry barriers. For various reasons, there is currently no complete and comprehensive (including from central to local levels) tax regulations and policy library on the Internet. Existing tax regulations products basically rely on keywords or pure manual matching of regulations. At the same time, the frequency of tax policy issuance is relatively frequent, which means that the entity link function of this regulation needs to be able to link to all the regulations mentioned, and to link to the newly added regulations in a timely manner.

[0117] The existing entity linking results for tax-related texts are incomplete in the laws and regulations they link to. At the same time, since the same law may have multiple different reference formats, it is not accurate to match keywords and punctuation marks (book title marks, brackets, etc.) alone, which leads to a large workload and heavy tasks for operators in the future; coupled with the rapid update of laws and regulations, the real-time demand for entity linking has greatly increased the demand for human resources. In order to solve the above problems, this embodiment proposes a law entity linking solution based on the tax knowledge graph, which can fully include all policies and regulations, and can be automatically updated, and quickly and well complete the law entity linking task in tax-related texts. This embodiment proposes a method for automating the law entity linking task in tax-related texts by first collecting complete laws and regulations and then realizing the automated technical solution of law entity linking through AC automata and statistical rules, which greatly reduces the demand for human resources.

[0118] When there is no data, the regulations collection module crawls tax laws and regulations from authoritative websites through standardized web crawlers, web page queries and other methods and stores them in the regulations library. A new batch of regulations catalogs are obtained based on the regulatory association information in the existing tax regulations. Based on each regulation in this batch of catalogs, a separate web crawler is used to crawl to supplement the regulations library. After a period of operation, we have collected almost all the existing regulations. After that, we organize the code of the above process, and then automatically complete the process of crawling from authoritative websites-extracting regulatory relations-crawling new regulations according to the release date. Although the reference relationship between regulations is carried out through names and document numbers, some of the texts cited in actual regulations are not absolutely standardized. The titles of the cited regulations may be missing or redundant, there may be no issuing unit, and there may be no document number. In response to the above problems, the dictionary tree generation module uses statistical rules after data analysis of the regulatory text, and we perform special processing and expansion on the standardized titles and document numbers. And each processed title and document number is used as the key of the dictionary (dict), and the value is the list of IDs of the regulations that may correspond to it. After constructing the dictionary tree of regulation titles and document numbers, the entity linking module can find the regulation titles and regulation document numbers in any text that exist in the tree, that is, it can perform entity linking of tax-related texts. This embodiment proposes and successfully explores a solution for entity linking of regulations in the field of taxation. This solution can be transformed and reused in entity linking of regulations in other fields. This embodiment establishes a complete and timely updated tax regulations library, and then constructs a fully automatic regulation entity linking algorithm that does not rely on manual labor. For all tax-related texts such as tax regulations, interpretation of regulatory policies, tax-related questions and answers, etc., links to referenced regulations can be achieved without distinction.

[0119] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0120] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0121] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0122] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A text entity linking method, characterized in that: include: Obtaining the regulatory text of the target regulation, and extracting the regulatory title and regulatory document number from the regulatory text; Generate a corresponding title dictionary tree according to the regulation title; Generate a corresponding document number dictionary tree according to the regulatory document number; If a text to be processed is received, entity linking is performed on the text to be processed using the title dictionary tree and the document number dictionary tree; Wherein, after extracting the regulation title and regulation number from the regulation text, it also includes: Expanding the regulation title and the regulation document number to obtain multiple regulation titles with the same meaning and multiple regulation document numbers with the same meaning; A unique corresponding regulation ID is set for the regulation text, a regulation title dictionary is generated according to the corresponding relationship between the regulation ID and the regulation title, and a regulation document number dictionary is generated according to the corresponding relationship between the regulation ID and the regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID; Accordingly, a corresponding title dictionary tree is generated according to the regulation title, including: Generate the corresponding title dictionary tree according to the regulation title in the regulation title dictionary; Accordingly, a corresponding document number dictionary tree is generated according to the regulatory document number, including: Generate the corresponding document number dictionary tree according to the regulatory document number in the regulatory document number dictionary; Among them, the regulatory titles and regulatory numbers are expanded to include: abbreviating the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or expanding the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or adjusting the symbols in the regulatory title to obtain an expanded regulatory title; The regulatory document number is abbreviated to obtain an expanded regulatory document number; and / or the regulatory document number is expanded to obtain an expanded regulatory document number.

2. The text entity linking method according to claim 1, characterized in that: The regulatory text of the target regulation to be obtained includes: Crawling the regulatory text of the target regulation from the target website; The regulation association information is extracted from the regulation text of the target regulation, and the regulation text of the target regulation is iteratively crawled using the regulation association information.

3. The text entity linking method according to claim 1, characterized in that: Utilizing the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed includes: Performing text matching on the text to be processed using the title dictionary tree and the document number dictionary tree to obtain a text matching result; wherein the text matching result includes the title text and / or the document number text, the title text is the text in the text to be processed that exists in the title dictionary tree, and the document number text is the text in the text to be processed that exists in the document number dictionary tree; Perform entity linking on the text to be processed according to the text matching result.

4. The text entity linking method according to claim 3, characterized in that: Performing entity linking on the text to be processed according to the text matching result includes: Performing entity linking on the title text and the document number text that meet preset rules in the text to be processed; wherein the preset rule is that there is no space between the title text and the document number text, or there are only book title marks and / or brackets between the title text and the document number text; And / or, setting the title text in the text to be processed that does not conform to the preset rules as the title text without a document number, querying the time text in the text to be processed that is closest to the title text without a document number, and performing entity linking based on the time text and the title text without a document number.

5. The text entity linking method according to any one of claims 1 to 4, characterized in that: Utilizing the title dictionary tree and the document number dictionary tree to perform entity linking on the text to be processed includes: Determine the entity in the text to be processed by using the title dictionary tree and the document number dictionary tree; the entity includes the text of the regulation title and the regulation document number; The text to be processed is entity-linked according to the corresponding relationship between the entity and the regulatory text, so that the entity jumps to the corresponding regulatory text after being clicked.

6. A text entity linking system, characterized in that: include: A regulation collection module, used to obtain the regulation text of the target regulation, and extract the regulation title and regulation number from the regulation text; A dictionary tree generation module, used to generate a corresponding title dictionary tree according to the regulation title; It is also used to generate a corresponding document number dictionary tree according to the regulatory document number; An entity linking module, for performing entity linking on the text to be processed by using the title dictionary tree and the document number dictionary tree if a text to be processed is received; Wherein, the text entity linking system further includes: A dictionary construction module is used to, after extracting the regulation title and regulation document number from the regulation text, expand the regulation title and the regulation document number to obtain multiple regulation titles with the same meaning and multiple regulation document numbers with the same meaning; set a unique corresponding regulation ID for the regulation text, generate a regulation title dictionary according to the correspondence between the regulation ID and the regulation title, and generate a regulation document number dictionary according to the correspondence between the regulation ID and the regulation document number; wherein the key of the regulation title dictionary is the regulation title, and the value of the regulation title dictionary is the regulation ID; the key of the regulation document number dictionary is the regulation document number, and the value of the regulation document number dictionary is the regulation ID; Correspondingly, the dictionary tree generation module is used to: generate the corresponding title dictionary tree according to the regulation title in the regulation title dictionary; Correspondingly, the dictionary tree generation module is used to: generate the corresponding document number dictionary tree according to the regulatory document number in the regulatory document number dictionary; Among them, the process of expanding the regulatory title and the regulatory document number in the dictionary construction module includes: abbreviating the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or, expanding the issuing unit in the regulatory title to obtain an expanded regulatory title; and / or, adjusting the symbols in the regulatory title to obtain an expanded regulatory title; abbreviating the regulatory document number to obtain an expanded regulatory document number; and / or, expanding the regulatory document number to obtain an expanded regulatory document number.

7. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the text entity linking method according to any one of claims 1 to 5 are implemented.

8. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the text entity linking method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Tax knowledge data semantic annotation method and related device

    CN111488741A

  • Method and device for identifying association laws and regulations of letters

    CN112199466A

  • Method and system for analyzing law and regulation texts based on RUTA rule language

    CN112364621A

  • Law rule atlas construction method and system based on law and regulation texts

    CN113420126A

  • Tax field-oriented knowledge map construction method and system

    WO2021196520A1