Element extraction method and device, computer device and storage medium

By identifying and dividing the hierarchical ordered list tree of text, open extraction of subjectless elements and subject alignment are performed, solving the problem of decreased extraction accuracy caused by dynamic multi-subject phenomena in the bidding field, and achieving more efficient element extraction.

CN114756644BActive Publication Date: 2025-12-16XIAMEN XINGHAN SHUZHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210261929.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-17
Publication Date
2025-12-16
Estimated Expiration
2042-03-17

AI Technical Summary

Technical Problem

Existing feature extraction methods struggle to effectively identify dynamic multi-agent phenomena in unstructured text, especially in the bidding and tendering field, leading to a decrease in extraction accuracy.

Method used

By identifying the hierarchical ordered list of text, a hierarchical ordered list tree is formed. Based on this, blocks are divided, and information on elements without a subject is extracted. Combined with subject identification and alignment, a second block structure tree is formed. Finally, the element information is associated with and aligned with the subject.

Benefits of technology

It improves the accuracy of feature extraction, can understand the implicit structure and natural sentence information in unstructured text, solves the problem of multi-subject ambiguity, and enhances the feature extraction capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756644B_ABST
    Figure CN114756644B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of text processing, and provides an element extraction method, device, computer equipment and storage medium, the method comprises the following steps: identifying a hierarchical ordered list of a text to be extracted and forming a hierarchical ordered list tree, performing block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree; open extraction of element information of a subjectless element in the text to be extracted and attaching to the first block structure tree to obtain a second block structure tree; subject identification of nodes in the second block structure tree to determine an element subject; associating the element information of the subjectless element with the element subject and aligning with standard elements of the element subject. The method can improve the element extraction capability and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of text processing, and particularly relates to an element extraction method and device, computer equipment and a storage medium. BACKGROUND

[0002] There are a large amount of vertical field data on the Internet, and analyzing and mining high-value information in the data can promote the development of related industries. Element extraction technology is an important role in the text information mining technology system. Element extraction is mainly a process of extracting element information of a specific subject from unstructured text. At present, it can be roughly divided into a method based on a traditional model and a method based on modern machine learning. Among them, the method based on the traditional model mainly uses a keyword library and a pattern rule to identify target element information in the text. In the method based on modern machine learning, there are methods using a generation pattern and methods using a deep neural network. The generation pattern generally uses a probability model to generate element information using input text as observation information, and the deep neural network generally uses a classification or sequence labeling model to extract element information.

[0003] However, whether it is the method based on the traditional model or the method based on modern machine learning, the existing unstructured text information extraction method mainly targets natural sentence expression text. The extraction effect of the connotation structure and the mixed expression of natural sentences existing in the unstructured text in the bidding field is decreased. Moreover, there is a dynamic multi-subject phenomenon in the bidding field, and the existing extraction method does not support dynamic subjects or has poor support, thereby reducing the precision of element extraction in the field. SUMMARY

[0004] Therefore, it is necessary to provide an element extraction method, device, computer equipment and storage medium capable of improving the precision of element extraction to solve the above technical problems.

[0005] The present application provides an element extraction method, comprising:

[0006] recognizing a hierarchical ordered list of a text to be extracted and forming a hierarchical ordered list tree, and performing block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree;

[0007] openly extracting element information of a subject-free element in the text to be extracted and attaching the element information to the first block structure tree to obtain a second block structure tree;

[0008] performing subject recognition on a node in the second block structure tree to determine an element subject;

[0009] associating the element information of the subject-free element with the element subject and aligning the element information with standard elements of the element subject.

[0010] In one of the embodiments, the method comprises the following steps: identifying a hierarchical ordered list of the text to be extracted and forming a hierarchical ordered list tree; dividing the text to be extracted into blocks based on the hierarchical ordered list tree to form a first block structure tree, which comprises the following steps:

[0011] identifying the hierarchical ordered list of the text to be extracted and outputting hierarchical information and ordinal information in the text to be extracted;

[0012] taking the text to be extracted as a root node, dividing the ordinal information into child nodes or leaf nodes according to the hierarchical information, and forming a hierarchical ordered list tree;

[0013] taking a node in the hierarchical ordered list tree as an ordinal block, and dividing the text to be extracted into segments with the ordinal information corresponding to the ordinal block as a split symbol to obtain direct text of the ordinal block;

[0014] identifying a non-ordinal block in the direct text of the ordinal block;

[0015] taking the non-ordinal block as a child node of the corresponding ordinal block to form a new tree to obtain a first block structure tree.

[0016] In one of the embodiments, the step of identifying a non-ordinal block in the direct text of the ordinal block comprises the following steps:

[0017] dividing the direct text of the ordinal block into segments according to line breaks and continuous white spaces of a preset length to obtain subtext segments;

[0018] identifying a block gist of each of the subtext segments to determine a block gist text segment;

[0019] taking the block gist text segment as a non-ordinal block, and a subsequent segment of the block gist text segment as direct text of the non-ordinal block.

[0020] In one of the embodiments, the calculation formula of the step of identifying a block gist of each of the subtext segments to determine a block gist text segment is as follows:

[0021]

[0022] wherein, n bt is a block gist text segment, n1 is the first n1 words of the direct text of the ordinal block, θ bt is a preset empirical parameter, p bt (i|i-1, i-2) is a real-valued feature function outputted when classifying the words at positions i, i-1 and i-2 in the first n1 words of the direct text of the ordinal block, V bt represents a set of block gist ending words, is an indicator function.

[0023] In one embodiment, the open extraction extracts element information of the subjectless element in the text to be extracted and attaches the element information to the first block structure tree to obtain a second block structure tree, including:

[0024] Anchoring a position where a delimiter appears in the text to be extracted to obtain an anchor position;

[0025] Based on the anchor position, identifying an element name of the subjectless element and an element value corresponding to the element name to obtain element information;

[0026] Determining a text block where the element information source text is located, creating the element information node with a node corresponding to the text block in the first block structure tree as a parent node to obtain the second block structure tree.

[0027] In one embodiment, based on the anchor position, identifying an element name and a corresponding element value to obtain element information, including:

[0028] Determining a first position meeting a requirement before the anchor position, taking a text segment between the first position and the anchor position as an element name, and a determination formula of the first position is as follows:

[0029]

[0030] Wherein, n key is the first position, n2 represents a word position in the text to be extracted, n kvs is the anchor position, θ key is a preset experience parameter, p key (i|i-1, i-2, i+1, i+2) is a real number feature function outputted when classifying the words at positions i, i-1, i-2, i+1 and i+2 in the text to be extracted, V key represents a set of text ending words, is an indicator function;

[0031] Based on the element name, determining a second position meeting a requirement after the anchor position, taking a text segment between the anchor position and the second position as an element value of the element name, and a determination formula of the second position is as follows:

[0032]

[0033] Wherein, n val is the second position, n2 represents a word position in the text, n kvs is the anchor position, θ val is a preset experience parameter, p val (i|i-1, i-2, i+1, i+2; nkey ) is a real-valued feature function output when classifying the word at position i, i-1, i-2, i+1, i+2 in the given text to be extracted with respect to the element name n key val represents a set of end-of-text words, is an indicator function.

[0034] In one embodiment, the element subject includes a dynamic subject and a static subject, and the subject identification of the node in the second block structure tree to determine the element subject includes:

[0035] According to the similarity of the head-tail style between adjacent ordinal information in the hierarchical ordered list, the similarity of the head-tail style of each ordinal information and the dynamic subject expression, and the literal style of each ordinal information, a possibility score of the hierarchical ordered list as a dynamic subject sequence is calculated;

[0036] When the hierarchical ordered list is determined as a dynamic subject sequence according to the possibility score, each ordinal information of the hierarchical ordered list in the corresponding node in the second block structure tree is taken as a dynamic subject;

[0037] According to the similarity of the node text of the non-dynamic subject node in the second block structure tree and the title text of each static subject, a non-dynamic subject node associated with each static subject is determined.

[0038] In one embodiment, the association of the element information of the element without a subject with the element subject and the alignment of the element subject with the standard element include:

[0039] In the second block structure tree, an access node accessed by a backtracking path from an element name to each node is determined in the direction of recursive backtracking from a root node, and a path score is determined according to the similarity of the access node and the element name;

[0040] According to the similarity of the element name and the title text of the standard element, the similarity of the title text of the element subject and the occurrence text, and the path score, a to-be-associated element subject and a to-be-aligned standard element are determined;

[0041] The element information is associated with the to-be-associated element subject, and aligned with the to-be-aligned standard element.

[0042] In one embodiment, before the hierarchical ordered list structure in the text to be extracted is identified, the method further includes: performing text preprocessing on the obtained text, and performing natural language processing on the preprocessed text.

[0043] ​In one of the embodiments, after the element information of the element without a subject is aligned with the standard element of the target field and associated with the element subject, the method further comprises:

[0044] When there are multiple corresponding element values in the element name in the element information, quality evaluation is performed on the multiple element values corresponding to the element name to obtain an element value ranking;

[0045] The optimal element value of the element name is screened according to the element value ranking.

[0046] An element extraction device comprises:

[0047] A tree structure forming module is configured to identify a hierarchically ordered list of a to-be-extracted text and form a hierarchically ordered list tree, and perform block division on the to-be-extracted text based on the hierarchically ordered list tree to form a first block structure tree;

[0048] An open extraction module is configured to open extract element information of an element without a subject in the to-be-extracted text and attach the element information to the first block structure tree to obtain a second block structure tree;

[0049] A subject identification module is configured to identify a subject for a node in the second block structure tree to determine an element subject;

[0050] An alignment and association module is configured to align and associate the element information of the element without a subject with the element subject and the standard element of the element subject.

[0051] The present application also provides a computer device comprising a processor and a memory, wherein the memory stores a computer program, and the processor implements the steps of the element extraction method according to any one of the above embodiments when executing the computer program.

[0052] The present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the element extraction method according to any one of the above embodiments.

[0053] The element extraction method, device, computer device and storage medium extract the element information of the open element without a subject from the first block structure tree to form a second block structure tree, determine the subject of the element by identifying the nodes in the second block structure tree, and finally associate the element information with the subject and align the element information with the standard element of the target field. The method can understand the connotation structure and natural sentence information in the unstructured text by analyzing the structure of the text through the tree, and can further solve the multi-subject ambiguity problem of the element by the open extraction method without limiting the field and the subject alignment association method, thereby improving the range and effect of the element extraction capability and improving the accuracy of the element extraction. BRIEF DESCRIPTION OF DRAWINGS

[0054] Figure 1 An application environment diagram of the element extraction method in an embodiment.

[0055] Figure 2 A flowchart of the element extraction method in an embodiment.

[0056] Figure 3 A schematic diagram of the hierarchical ordered list tree in an embodiment.

[0057] Figure 4 A structural block diagram of the element extraction device in an embodiment. DETAILED DESCRIPTION

[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0059] The element extraction method provided by the present application can be applied in an application environment as shown in Figure 1 The application environment involves a terminal 102 and a server 104. The terminal 102 communicates with the server 104 through a network. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0060] When the terminal 102 receives the element extraction instruction, the above-mentioned element extraction method can be implemented by the terminal 102 alone. The element extraction instruction can also be sent by the terminal 102 to the server 104 for communication, and the above-mentioned element extraction method is implemented by the server 104. Taking the server 104 as an example, specifically, the server 104 identifies the hierarchical ordered list of the text to be extracted and forms a hierarchical ordered list tree, and divides the text into blocks based on the hierarchical ordered list tree to form a first block structure tree; the server 104 opens the element information of the element without a subject in the text to be extracted and attaches it to the first block structure tree to obtain a second block structure tree; the server 104 identifies the subject of the node in the second block structure tree to determine the element subject; and the server 104 associates the element information without a subject with the element subject and aligns it with the standard element of the element subject.

[0061] In one embodiment, as shown in FIG. 1, a method for extracting elements is provided. Taking the server as an example, the method comprises the following steps: Figure 2

[0062] Step S201, identifying the hierarchical ordered list of the text to be extracted and forming a hierarchical ordered list tree, and dividing the text to be extracted into blocks based on the hierarchical ordered list tree to form a first block structure tree.

[0063] The text to be extracted refers to the text that needs to be extracted. The hierarchical ordered list refers to the ordered list with hierarchical relationship in the text. For example, when the text is presented in the format "one, (1), (2), two, three", the chapters "one", "two" and "three" are ordinal information of the same level, but the chapter "three" is after the chapter "two", and the chapter "two" is after the chapter "one", that is, the latter chapter. And the chapters "(1)" and "(2)" are ordinal information within the chapter "one", that is, the lower level of the chapter "one". The tree is a data structure, which is a set of finite nodes with hierarchical relationship. The hierarchical ordered list tree in this embodiment is a tree formed based on the hierarchical relationship between the ordered lists, and the block structure tree is a new tree formed after the text is divided into blocks based on the hierarchical ordered list tree.

[0064] ​Specifically, when the server obtains the text of the element to be extracted, first, the hierarchical ordered list in the text is identified, and the identification method can adopt any existing hierarchical ordered list identification method. For example, the dictionary mapping method and the part-of-speech-based method. The dictionary mapping mainly identifies the ordinal numbers expressed by the dictionary according to the pre-defined dictionary, and then converts them into Arabic numerals for comparison and forms an ordered list. The part-of-speech-based method mainly uses natural language processing tools to tokenize the text and simultaneously label the part-of-speech of each word. Then, the server determines the hierarchical relationship of the ordinal information in the text according to the hierarchical ordered list, and forms a tree structure according to the hierarchical relationship, to obtain a hierarchical ordered list tree. Finally, the server divides the text block of the text to be extracted according to the nodes in the hierarchical ordered list tree, and further forms a first block structure tree based on the divided text block.

[0065] Step S202, open extraction of the element information of the subjectless element in the text to be extracted and attach it to the first block structure tree to obtain a second block structure tree.

[0066] Among them, open extraction refers to the extraction without limiting the type of element, and the subjectless element refers to the element information without a subject, that is, a two-tuple containing the element name and the element value.

[0067] Specifically, after the server forms the first block structure tree, the element information of the subjectless element is extracted from the text in an open extraction manner. Then, the element information of the subjectless element is attached to the first block structure tree as a newly created node, thereby obtaining a newly formed second block structure tree.

[0068] Step S203, subject identification of the nodes in the second block structure tree to determine the element subject.

[0069] Among them, the element subject refers to a collection containing multiple domain elements in the target domain. The target domain can be understood as the actual application domain. For example, taking the target domain as the bidding domain, the "bidding, package, project" in the text are the subjects. For the indefinite number of subjects in the text, this phenomenon is called dynamic subject phenomenon, and the corresponding ordinal information is the dynamic subject, such as "the first package", "the second package", etc. In addition, the element subject also includes static subjects, which are defined in advance.

[0070] Specifically, after the server obtains the second block structure tree, the server first performs subject identification on the nodes in the second block structure tree to determine the nodes belonging to dynamic subjects, and determines the nodes as the identified dynamic subjects. Then, the server further identifies the nodes that are not dynamic subjects in the second block structure tree, and determines the nodes that can be regarded as static subjects as the identified static subjects by associating the nodes with the static subjects. If a node is neither a dynamic subject nor a static subject, the node is not associated with any subject.

[0071] In step S204, the element information of the element without a subject is associated with the element subject and aligned with the standard element of the element subject.

[0072] Specifically, the subject association is to associate the element information with the element subjects involved in the target field, including dynamic subjects and static subjects. The dynamic subjects and static subjects to be associated in the embodiment have been determined in the pre-processing step. The element alignment is a process of aligning the element information extracted by the open extraction to the standard element corresponding to the associated element subject. Since the dynamic subjects and the static subjects have corresponding appellations, and both have a standard element set defined in advance, the difference is that all dynamic subjects have the same standard element set defined in advance, and different static subjects have different standard element sets defined in advance. Each standard element in the standard element set also has a corresponding appellation, which can be understood as a kind of text description for describing an object. Therefore, after the server extracts the element information and determines the element subject, the server can determine the associated element subject and the aligned standard element according to the similarity between the element information and the appellation.

[0073] The above element extraction method, by identifying the hierarchical ordered list tree in the text, and based on the hierarchical ordered list tree, the text is divided into blocks to form a first block structure tree, then the element information of the element without a subject is extracted and attached to the first block structure tree to form a second block structure tree, and then the nodes in the second block structure tree are subjected to subject identification to determine the element subject, and finally the element information is associated with the element subject and aligned with the standard element of the target field. This method can understand the connotation structure and natural sentence information existing in the unstructured text by analyzing the structure of the text through the tree, and can further solve the multi-subject ambiguity problem of the element by the open extraction method without limiting the field and the subject alignment association method, and can improve the range and effect of the element extraction ability, thereby improving the accuracy of the element extraction.

[0074] In one embodiment, step S201 comprises: performing hierarchical ordered list recognition on the text to be extracted, outputting hierarchical information and ordinal information of the text to be extracted; taking the text to be extracted as a root node, dividing the ordinal information into child nodes or leaf nodes according to the hierarchical information, and forming a hierarchical ordered list tree; taking a node in the hierarchical ordered list tree as an ordinal block, and performing segment division on the text to be extracted by taking the ordinal information corresponding to the ordinal block as a split symbol, to obtain direct text of the ordinal block; identifying non-ordinal blocks in the direct text of the ordinal block; taking the non-ordinal blocks as child nodes of the corresponding ordinal block to form a new tree, and obtaining a first block structure tree.

[0075] The ordinal information is characters such as "one, (1), (2), two, three" in the text for indicating chapters and paragraphs. In addition to numbers, other characters for indicating chapters and paragraphs can also be used, such as "i", which can refer to the ninth letter in the English alphabet sequence or the first letter in the Greek alphabet sequence. The hierarchical information is the hierarchical relationship between the ordinal information, including postorder and lower layer. The block in this embodiment refers to a text region, including two types of ordinal blocks and non-ordinal blocks. The ordinal blocks are divided according to the hierarchical ordered list tree, and the non-ordinal blocks are divided from the direct text corresponding to the ordinal blocks. It can be understood that the ordinal blocks are divided according to the hierarchical ordered list tree, and the others are non-ordinal blocks. The adjacent subsequent text segment of a ordinal information is the direct text of the ordinal information, also referred to as the direct text of the ordinal block. The child node in this embodiment is a node with a degree of 0, and the leaf node is a node with a degree of 0.

[0076] Specifically, after the server performs hierarchical ordered list recognition on the text to be extracted by the hierarchical ordered list recognition method to output the hierarchical information and the ordinal information of the text, it takes the text to be extracted as a root node to form a tree, and the child nodes or leaf nodes of the tree are formed by the ordinal information. Whether the ordinal information is a child node or a leaf node is determined by the hierarchical relationship between the ordinal information. As shown in Figure 3 , a schematic diagram of a hierarchical ordered list tree is provided, referring to Figure 3 , the chapters "one, two" are child nodes, and the chapters "(1), (2)" are leaf nodes. Then, a node in the hierarchical ordered list tree forms a block, and the server takes the nodes in the hierarchical ordered list tree as ordinal blocks, and divides the text to be extracted into several segments by taking all identified ordinal information as a split symbol. The adjacent subsequent text segment of each ordinal information is the direct text, that is, the direct text of the ordinal block, such as taking Figure 3The adjacent subsequent text obtained after dividing the text by the "one" is the direct text of the "one". Further, the direct text segment of a ordinal block is taken as the processing range, and all ordinal blocks are identified as non-ordinal blocks, that is, non-ordinal blocks are further identified from all direct texts. Finally, the identified non-ordinal blocks are taken as the child nodes of the corresponding ordinal blocks to form a new tree, thereby obtaining the first block structure tree. For example, when the non-ordinal block A is identified from the direct text segment of the ordinal block "one", the non-ordinal block A is taken as the child node of the ordinal block "one", and at this time, the first block structure tree is obtained by adding a node to the hierarchical ordered list tree.

[0077] In an embodiment, identifying the non-ordinal block in the direct text of the ordinal block comprises: segmenting the direct text of the ordinal block according to line breaks and continuous white characters of a preset length to obtain subtext segments; identifying the block gist of each subtext segment to determine the block gist text segment; and taking the block gist text segment as the non-ordinal block, and the subsequent segment of the block gist text segment being the direct text of the non-ordinal block.

[0078] In the block gist, the gist refers to a segment in the text, representing the core expression of a block structure, and a block has at most one gist.

[0079] Specifically, first, the direct text is segmented into several segments according to line breaks and continuous white characters of a length L cw , and the obtained text segments are taken as subtext segments. L cw is an integer parameter, representing the number of continuous white characters as a divider, and an integer greater than 1 and less than 10 is preferably taken as L cw in this embodiment. Then, a binary classification model is constructed, which is used to identify each subtext segment to determine whether it can be a block gist. When it is determined that a certain subtext segment can be a block gist, it is determined to be a block gist text segment. Then, the block gist text segment is taken as ordinal information in the ordinal block, and the block gist text segment is taken as a non-ordinal block, and the adjacent subsequent segment obtained by segmenting the block gist text segment is taken as the direct text of the non-ordinal block.

[0080] In an embodiment, the calculation formula for identifying the block gist of each subtext segment to determine the block gist text segment is as follows:

[0081]

[0082] wherein n bt is the block gist text segment, n1 is the first n1 words of the direct text of the ordinal block, log is a natural logarithm function, θ bt is a preset empirical parameter, and p bt(i|i-1, i-2) is the real-valued feature function output when classifying the words at positions i, i-1, and i-2 in the first n1 words of the ordinal block's direct text, V bt This represents a set of block-end words, which can be defined empirically or derived from dataset statistics. It is an indicator function that indicates when the word at position i among the first n1 words in the direct text is not in the set V. bt The value is 1 if n is active, and 0 otherwise. According to the formula, n... bt Depend on To find, that is, to find in the direct text, the function that satisfies θ. bt The longest first n1 words, the first n words directly in the text bt The text formed by these words constitutes the block's main idea. This can be understood as identifying the main idea of ​​an ordinal block by finding the first n words from its directly related text. bt The process of writing each character.

[0083] In one embodiment, step S202 includes: anchoring the position of the separator in the text to be extracted to obtain the anchor position; identifying the element name without a subject element and the element value corresponding to the element name based on the anchor position to obtain element information; determining the text block where the source text of the element information is located, and creating an element information node with the node corresponding to the text block in the first structure tree as the parent node to obtain the second structure tree.

[0084] Specifically, the positions of delimiters in the text are found, and their positions are anchored to obtain the anchor position n. kvs Here, the delimiters are all words included in a preset set of delimiters. Then, the server calculates based on each anchor position n. kvs The process involves identifying element names without a subject element and identifying the element values ​​corresponding to those element names to obtain element information. Finally, the text block from which the extracted element information originates is determined. The corresponding node in the first structure tree is then identified, and this node is used as the parent node to create a node for the extracted element information, which is then attached to the first structure tree. This adds a new element information node to the first structure tree, resulting in a second structure tree. For example, if element information A is extracted from the direct text corresponding to the ordinal block "one," then the element information node is created with the node "one" in the first structure tree as its parent node.

[0085] In one embodiment, feature information is obtained by identifying the feature name and the corresponding feature value of the feature name without a subject based on the anchor position, including:

[0086] Specifically, for a given anchoring position n kvs Element name identification is to find an element located at the anchor position n. kvsthe first position n key , and the text segment formed by the words between n key and n kvs is the identified element name. kvs The calculation formula is as follows:

[0087]

[0088] wherein n key is the first position, n2 represents the position of the word in the text to be extracted, n2 will not be greater than the anchor position n kvs , log is a natural logarithm function, θ key is a preset experience parameter, i.e. the requirement that the first position n key needs to meet, p key (i|i-1, i-2, i+1, i+2) is an output real feature function when the word classification of the i, i-1, i-2, i+1, i+2 positions in the text to be extracted, which can be obtained based on the statistical experience distribution of the constructed data set, V key represents a set of text ending words, which can be set by experience or by data set statistics, is an indicator function, which takes the value 1 when the word at the i position in the text to be extracted is not in the set of text ending words V key , and otherwise takes the value 0. According to the formula, n key is obtained from , i.e. finding the smallest n2 in the text to be extracted that makes the function satisfy θ key , which will not be greater than n kvs , n key to n kvs in the text to be extracted is the element name.

[0089] The identification of the element name corresponding to the element value is based on the element name n key and the anchor position n kvs , finding a second position n val that is located after the anchor position n kvs and meets the preset requirements to form a text segment, i.e. the text segment between the anchor position n kvs and the position n val is the element name n key corresponding to the element value, and the calculation formula of the position n val is as follows:

[0090]

[0091] wherein, n2 represents the word position in the text, n2 will not be greater than the length of the text to be extracted, and θval is a preset empirical parameter, i.e., the second position n val requirements to be met, p val (i|i-1, i-2, i+1, i+2; n key ) is a real-valued feature function output when the word classification of the i, i-1, i-2, i+1, i+2 positions in the text to be extracted given the element name n key is obtained based on the statistical experience distribution of the constructed data set, V val represents a set of text ending words, which can be empirically set or statistically obtained from the data set, is an indicator function, which takes the value 1 when the word at the i-th position of the given text is not in the set of ending words V val , otherwise it takes the value 0. According to the formula, n val is obtained by , i.e., find the maximum n2 in the text to be extracted that satisfies θ val , which will not be greater than the length of the text to be extracted, and the text segment from n kvs to n val is the element value corresponding to the element name.

[0092] In one embodiment, step S203 comprises: calculating the possibility score of the hierarchical ordered list as the dynamic subject sequence according to the similarity of the head-tail style between adjacent ordinal information in the hierarchical ordered list, the similarity of the head-tail style of each ordinal information and the dynamic subject expression, and the literal style of each ordinal information; when it is determined according to the possibility score that the hierarchical ordered list is the dynamic subject sequence, taking each node of the hierarchical ordered list corresponding to the node in the second block structure tree as the dynamic subject; and determining the non-dynamic subject node associated with each static subject according to the similarity of the node text of the non-dynamic subject node in the second block structure tree and the appellation text of each static subject.

[0093] Specifically, a text can be identified with multiple hierarchical ordered lists. For each hierarchical ordered list, it is a sequence of ordinal information, and an ordinal information includes four information: head style, tail style, literal style, and standard number. The head style and the tail style are texts, and the head-tail style in the embodiment refers to the two-tuple of the head style and the tail style. The literal style is a scalar taking a value from a discrete value set, and the standard number is a non-negative integer. Therefore, the embodiment identifies the nodes belonging to the dynamic subject in the second block structure tree by means of the information in the hierarchical ordered list, and then determines the nodes that can be regarded as static subjects in the non-dynamic subject nodes.

[0094] For the identification of dynamic subjects, firstly, the possibility score S of the hierarchical ordered list as a dynamic subject sequence is calculated according to the similarity of the head-tail pattern between adjacent ordinal information, the similarity of the head-tail pattern of each ordinal information and the dynamic subject expression, and the literal pattern of each ordinal information dpr , and the specific calculation formula is as follows:

[0095]

[0096] Wherein, W (slt) is the set of head-tail patterns of all ordinal information in the hierarchical ordered list, |W (slt) | represents the number of elements in the set, w(slt)i is the head-tail pattern of the i-th ordinal information. S cslt is a normalized similarity function for evaluating the head-tail pattern of adjacent ordinal information, which can be an indicator function requiring adjacent similarity. S pslt is a normalized similarity function for evaluating the head-tail pattern of the ordinal information and the dynamic subject expression, which can be an indicator function requiring the head-tail pattern to appear in a specified set. V dpslt is a parameter representing the head-tail pattern that can be a dynamic subject expression, which can be pre-set by experience or obtained by data set statistics. F fsty represents the literal pattern of the hierarchical ordered list, V dpsf represents the acceptable literal pattern, which can be pre-set by experience or obtained by data set statistics. is an indicator function, which takes the value 1 when F fsty is in V dpsf , otherwise takes the value 0. Further, when the calculated possibility score S dpr is greater than the pre-set score, the hierarchical ordered list is determined as a dynamic subject sequence, and the nodes corresponding to each ordinal information in the second block structure tree are determined as dynamic subjects.

[0097] For the identification of static subjects, the identification of static subjects refers to the process of finding the appearance of the text segment as a static subject. Therefore, for the non-dynamic subject nodes in the second block structure tree other than the nodes belonging to the dynamic subjects, the nodes that can be regarded as static subjects e*s are determined by the similarity of the node text t(e1)g of the block node and the pre-set title text of each static subject. The node text of the block node is the block theme, and the node text of the element node is the element name. The determination formula of the static subject e*s is as follows:

[0098]

[0099] Wherein, E sta is a pre-set static subject set, T(e1)n is the title text of the static subject e1, S engsIt is a normalized similarity function used to measure the similarity between the node text t(e1)g and the appellation text t(e1)n, θ esa is an empirical value. According to the formula, the static subject e*s is obtained from the solution, that is, from the set of static subjects E sta find the static subject in it that makes the function value the largest and satisfies the inequality condition, and then associate the non-dynamic subject node corresponding to the node text t(e1)g with the static subject as the static subject. If the condition cannot be met, the node will not be associated with any subject.

[0100] In one embodiment, step S204 includes: determining the access nodes for accessing the backtracking paths from the element name to each node in the second block structure tree with the root node as the recursive backtracking direction, and determining the path score according to the similarity between the access nodes and the element name; determining the element subject to be associated and the standard element to be aligned according to the similarity between the element name and the appellation text of the standard element, the similarity between the appellation text of the element subject and the occurrence text, and the path score; associating the element information with the element subject to be associated and aligning it with the standard element to be aligned.

[0101] Among them, the appellation text of the dynamic subject in the element subject is the identified dynamic subject name. For example Figure 3 the node "one" in the structure tree shown in is identified as a dynamic subject, then its corresponding appellation text is "one". The appellation text of the static subject in the element subject is obtained by prior definition or dataset learning. The occurrence in this embodiment refers to the node identified as the element subject after the element subject recognition process, that is, the node identified as the dynamic subject and the non-dynamic subject node that is identified as associated with the static subject and regarded as the static subject. The occurrence text of the dynamic subject is also its dynamic subject name, and the occurrence text of the static subject is the direct text of the node associated with it. For example, if the node "one" is associated with a certain static subject and regarded as the static subject, then the direct text corresponding to "one" is the occurrence text of the static subject.

[0102] Specifically, first determine the access nodes for accessing the backtracking paths from the element name to each node in the second block structure tree with the root node as the recursive backtracking direction, and determine the path score according to the similarity between the access nodes and the element name. Then, according to the similarity between the element name and the appellation text of the standard element, the similarity between the appellation text of the element subject and the occurrence text, and the path score, determine the element subject to be associated and the standard element to be aligned. The calculation formulas for the path score and the element subject to be associated e* and the standard element to be aligned p*e are as follows respectively:

[0103]

[0104] Among them, E is the set of all element subjects, P eS is the standard element set of the subject e, T(e)p is the title text of the standard element p of subject e, and S pans The function is a normalized text-to-text similarity evaluation function. In this embodiment, it is used to evaluate the similarity of the element name t. key The terminology text of the standard element t p The similarity between them. T(e)n is the title text of element subject e, T(e)g is the occurrence text of element subject e, S engs The function is also a normalization function, used to measure the similarity between the text in which the element's subject appears and the text in which it is called. path The function represents the element name t. key The path score between the text t(e)g and the occurrence text, where [t key →t(e)g] represents the access nodes accessed via the recursive backtracking path from the feature name to each node, determined by the root node as the recursive backtracking direction in the second structure tree. If path S does not exist... path Then it directly takes the value 0. θ pea These are preset empirical parameters. The formula shows that the subject e* to be associated and the standard element p* to be aligned are obtained by solving argmax e∈E,p∈Pe. That is, from all possible subject subjects, we find a subject subject and from all standard elements of that subject subject, we find a standard element that maximizes the formula value and satisfies the inequality condition. This standard element is then used as the subject subject to be associated and the standard element to be aligned for the element information, and the association and alignment operation is performed.

[0105] In one embodiment, before step S201, the method further includes: performing text preprocessing on the acquired text, and performing natural language processing on the preprocessed text.

[0106] Specifically, the preprocessing mainly includes conventional text preprocessing, such as cleaning dirty data, conversion between traditional Chinese and simplified Chinese, removing stop words, and part-of-speech reduction. The cleaning of dirty data is achieved by using preset rules, a word table or any other existing algorithm. The preferred cleaning targets include, but are not limited to, HTML tags, garbled characters, and business-unrelated character expressions. The conversion between traditional Chinese and simplified Chinese is the process of converting traditional Chinese characters into simplified Chinese characters. Whether to perform the conversion can be determined according to different business purposes. The removal of stop words is the process of removing stop words in the text by using a given stop word table. The part-of-speech reduction mainly occurs in the processing of English text. Due to the language characteristics, a word in English and other languages has multiple forms. Therefore, different forms are standardized to the prototype through the part-of-speech reduction. Natural language processing (NLP) refers to some basic language processing operations on the preprocessed text. The present embodiment mainly includes some basic natural language processing, including three processes of word segmentation, part-of-speech tagging, and named entity recognition. Word segmentation is the process of segmenting a sentence in the text to divide the text into a sequence of words. The present embodiment performs preliminary processing on the text through preprocessing and basic NLP before the text enters the element extraction processing, so as to reduce noise data in the text and facilitate subsequent word-based analysis, thereby improving the accuracy of extraction.

[0107] In one embodiment, after step S204, further comprising: when there are multiple corresponding element values for an element name in the element information, performing quality evaluation on the multiple element values corresponding to the element name to obtain an element value ranking; and filtering an optimal element value of the element name according to the element value ranking.

[0108] Specifically, the quality evaluation is a process of evaluating the information quality of the element value after the element alignment and the subject association. Multiple element values may be extracted for an element during the element extraction. Therefore, the quality evaluation can be used for element value ranking to achieve the purpose of selecting the best. The present embodiment preferably uses the "cross-entropy" method to implement the quality evaluation. The smaller the cross-entropy of an element value is, the higher the quality of the element value is. The cross-entropy formula of the element value is as follows:

[0109]

[0110] wherein Q(e)p is the true distribution of the element value of the standard element p of the subject e corresponding to the element value to be evaluated, which can be obtained by statistics of the data set; is the distribution of the element value to be evaluated with respect to words, which is directly obtained by statistics of the element value; V tral is a set of non-repeated words obtained from the element value.

[0111] It should be understood that, although Figure 2The steps in the flowchart are shown in sequence according to the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, there is no strict order limitation for the execution of the steps, and the steps can be executed in other orders. Moreover, Figure 2 At least one part of the steps in the flowchart can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0112] In one embodiment, as shown in Figure 4 An element extraction device is provided, comprising:

[0113] The tree structure forming module 401 is configured to identify a hierarchical ordered list of the text to be extracted and form a hierarchical ordered list tree, and perform block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree.

[0114] The open extraction module 402 is configured to open extract element information of non-subject elements in the text to be extracted and attach the element information to the first block structure tree, to obtain a second block structure tree.

[0115] The subject identification module 403 is configured to identify subjects in the nodes of the second block structure tree, and determine element subjects.

[0116] The alignment and correlation module 404 is configured to correlate the element information of non-subject elements with the element subjects and align the element information with standard elements of the element subjects.

[0117] In one embodiment, the tree structure forming module 401 is further configured to identify a hierarchical ordered list of the text to be extracted, and output hierarchical information and ordinal information of the text to be extracted; take the text to be extracted as a root node, divide the ordinal information into child nodes or leaf nodes according to the hierarchical information, and form a hierarchical ordered list tree; perform fragment segmentation on the text to be extracted by taking the nodes in the hierarchical ordered list tree as ordinal blocks and using the ordinal information corresponding to the ordinal blocks as a segmentation symbol, to obtain direct text of the ordinal blocks; identify non-ordinal blocks in the direct text of the ordinal blocks; form a new tree by taking the non-ordinal blocks as child nodes of the corresponding ordinal blocks, to obtain a first block structure tree.

[0118] In one embodiment, the tree structure forming module 401 is further configured to perform fragment segmentation on the direct text of the ordinal blocks according to line breaks and continuous white space characters of a preset length, to obtain subtext fragments; perform block main idea identification on each subtext fragment, to determine block main idea text fragments; take the block main idea text fragments as non-ordinal blocks, and the subsequent fragments of the block main idea text fragments as direct text of the non-ordinal blocks.

[0119] In one embodiment, the open extraction module 402 is further configured to anchor a position where a delimiter appears in the text to be extracted, to obtain an anchor position; identify an element name of a non-subject element and an element value corresponding to the element name based on the anchor position, to obtain element information; determine a text block where a text of the element information is located, and create an element information node with a node corresponding to the text block in the first block structure tree as a parent node, to obtain a second block structure tree.

[0120] In one embodiment, the open extraction module 402 is further configured to determine a first position satisfying a requirement before the anchor position, and take a text segment between the first position and the anchor position as the element name; and determine a second position satisfying the requirement after the anchor position based on the element name, and take a text segment between the anchor position and the second position as an element value of the element name.

[0121] In one embodiment, the subject identification module 403 is further configured to calculate a possibility score of the hierarchical ordered list as a dynamic subject sequence according to a similarity of head-tail styles between adjacent ordinal information in the hierarchical ordered list, a similarity of the head-tail styles of each ordinal information and a dynamic subject expression, and a literal style of each ordinal information in the hierarchical ordered list; determine each ordinal information of the hierarchical ordered list as a dynamic subject in the second block structure tree when the hierarchical ordered list is determined as the dynamic subject sequence according to the possibility score; and determine a non-dynamic subject node associated with each static subject according to a similarity of node text of the non-dynamic subject node and a title text of each static subject in the second block structure tree.

[0122] In one embodiment, the alignment association module 404 is further configured to determine an access node visited by a backtracking path from the element name to each node in the second block structure tree with the root node as a recursive backtracking direction, and determine a path score according to a similarity of the access node and the element name; determine a to-be-associated element subject and a to-be-aligned standard element according to a similarity of the element name and a title text of the standard element, a similarity of a title text of the element subject and the appearing text, and the path score; and associate the element information with the to-be-associated element subject, and align the element information with the to-be-aligned standard element.

[0123] In one embodiment, the element extraction device further comprises a preprocessing module configured to perform text preprocessing on the obtained text, and perform natural language processing on the preprocessed text.

[0124] In one embodiment, the element extraction device further comprises a screening module configured to, when there are multiple element values corresponding to an element name in the element information, perform quality evaluation on the multiple element values corresponding to the element name, to obtain an element value order; and screen an optimal element value of the element name according to the element value order.

[0125] The specific limitation of the element extraction device can refer to the limitation of the element extraction method in the above, which will not be repeated here. Each module in the above element extraction device can be realized by software, hardware and their combination in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operation corresponding to each module by the processor. Based on such understanding, all or part of the processes in the above embodiment method can also be completed by the computer program to instruct the related hardware. The computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of each element extraction method embodiment can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc.

[0126] In one embodiment, a computer device, which can be a server, is provided, including a processor, a memory and a network interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an element extraction method. Illustratively, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. One or more modules can be a series of computer program instruction segments that can complete a specific function, which are used to describe the execution process of the computer program in the computer device.

[0127] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like, and is a control center of the computer device that connects all parts of the computer device through various interfaces and lines.

[0128] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the computer device by running or executing the computer program and / or modules stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.

[0129] Those skilled in the art can understand that the computer device structure shown in the embodiment only relates to part of the structure related to the application scheme, and does not constitute a limitation on the computer device to which the application is applied. The specific computer device can include more or fewer components, or combine certain components, or have a different component arrangement.

[0130] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor realizing the following steps when executing the computer program:

[0131] A hierarchical ordered list of the text to be extracted is identified and a hierarchical ordered list tree is formed, and the text to be extracted is block-divided based on the hierarchical ordered list tree to form a first block structure tree;

[0132] Open the element information of the element without a subject element in the text to be extracted and attach it to the first block structure tree to obtain a second block structure tree;

[0133] Subject identification is performed on the nodes in the second block structure tree to determine the element subject;

[0134] The element information of the element without a subject element is associated with the element subject and aligned with the standard element of the element subject.

[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: hierarchical ordered list identification is performed on the text to be extracted, and hierarchical information and ordinal information of the text to be extracted are output; the text to be extracted is taken as a root node, the ordinal information is divided into child nodes or leaf nodes according to the hierarchical information, and a hierarchical ordered list tree is formed; nodes in the hierarchical ordered list tree are taken as ordinal blocks, and the text to be extracted is segmented by taking the ordinal information corresponding to the ordinal block as a segmentation symbol to obtain the direct text of the ordinal block; non-ordinal blocks are identified in the direct text of the ordinal block; the non-ordinal blocks are taken as child nodes of the corresponding ordinal blocks to form a new tree to obtain the first block structure tree.

[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the direct text of the ordinal block is segmented according to the line break symbol and the continuous blank character of the preset length to obtain a subtext segment; block gist identification is performed on each subtext segment to determine a block gist text segment; the block gist text segment is taken as a non-ordinal block, and the subsequent segment of the block gist text segment is the direct text of the non-ordinal block.

[0137] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the position where the delimiter appears in the text to be extracted is anchored to obtain an anchor position; the element name of the element without a subject element and the element value corresponding to the element name are identified based on the anchor position to obtain element information; the text block where the element information source text is located is determined, and an element information node is created with the node corresponding to the text block in the first block structure tree as the parent node to obtain the second block structure tree.

[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: a first position meeting the requirements is determined before the anchor position, and the text segment between the first position and the anchor position is taken as the element name; based on the element name, a second position meeting the requirements is determined after the anchor position, and the text segment between the anchor position and the second position is taken as the element value of the element name.

[0139] In one embodiment, the processor, when executing the computer program, further implements the following steps: calculating a possibility score of the hierarchical ordered list as the dynamic subject sequence according to the similarity between the head-tail patterns of adjacent ordinal information in the hierarchical ordered list, the similarity between the head-tail patterns of each ordinal information and the dynamic subject expression, and the literal pattern of each ordinal information; when determining that the hierarchical ordered list is the dynamic subject sequence according to the possibility score, taking each node of the hierarchical ordered list in the second block structure tree corresponding to the dynamic subject as the dynamic subject; and determining the non-dynamic subject nodes associated with each static subject according to the similarity between the node text of the non-dynamic subject nodes in the second block structure tree and the appellation text of each static subject.

[0140] In one embodiment, the processor, when executing the computer program, further implements the following steps: determining the access nodes accessed by the backtracking path from the element name to each node in the second block structure tree with the root node as the recursive backtracking direction, and determining a path score according to the similarity between the access nodes and the element name; determining the element subject to be associated and the standard element to be aligned according to the similarity between the element name and the appellation text of the standard element, the similarity between the appellation text of the element subject and the occurrence text, and the path score; and associating the element information with the element subject to be associated, and aligning the element information with the standard element to be aligned.

[0141] In one embodiment, the processor, when executing the computer program, further implements the following steps: performing text preprocessing on the obtained text, and performing natural language processing on the preprocessed text.

[0142] In one embodiment, the processor, when executing the computer program, further implements the following steps: when there are multiple corresponding element values for the element name in the element information, performing quality evaluation on the multiple element values corresponding to the element name to obtain an element value ranking; and screening the optimal element value of the element name according to the element value ranking.

[0143] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:

[0144] identifying a hierarchical ordered list of the text to be extracted and forming a hierarchical ordered list tree, and performing block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree

[0145] openly extracting element information of a non-subject element in the text to be extracted and attaching the element information to the first block structure tree to obtain a second block structure tree;

[0146] performing subject identification on the nodes in the second block structure tree to determine an element subject;

[0147] associating the element information of the non-subject element with the element subject and aligning the element information with the standard element of the element subject.

[0148] In one embodiment, the computer program, when executed by the processor, further implements the following steps: performing hierarchical ordered list identification on the text to be extracted, and outputting hierarchical information and ordinal information of the text to be extracted; taking the text to be extracted as a root node, dividing the ordinal information into child nodes or leaf nodes according to the hierarchical information, and forming a hierarchical ordered list tree; taking a node in the hierarchical ordered list tree as an ordinal block, and performing fragment segmentation on the text to be extracted by taking the ordinal information corresponding to the ordinal block as a split symbol, to obtain direct text of the ordinal block; identifying non-ordinal blocks in the direct text of the ordinal block; taking the non-ordinal blocks as child nodes of the corresponding ordinal block to form a new tree, and obtaining a first block structure tree.

[0149] In one embodiment, the computer program, when executed by the processor, further implements the following steps: performing fragment segmentation on the direct text of the ordinal block according to the line break and the continuous blank characters of the preset length, to obtain subtext fragments; performing block gist identification on each subtext fragment, and determining block gist text fragments; taking the block gist text fragments as non-ordinal blocks, and taking subsequent fragments of the block gist text fragments as direct text of the non-ordinal blocks.

[0150] In one embodiment, the computer program, when executed by the processor, further implements the following steps: anchoring a position where a delimiter appears in the text to be extracted, to obtain an anchor position; identifying an element name of an element without a subject and an element value corresponding to the element name based on the anchor position, to obtain element information; determining a text block where the element information originates from, taking a node corresponding to the text block in the first block structure tree as a parent node to create an element information node, and obtaining a second block structure tree.

[0151] In one embodiment, the computer program, when executed by the processor, further implements the following steps: determining a first position that meets the requirements before the anchor position, taking a text fragment between the first position and the anchor position as the element name; based on the element name, determining a second position that meets the requirements after the anchor position, and taking a text fragment between the anchor position and the second position as an element value of the element name.

[0152] In one embodiment, the computer program, when executed by the processor, further implements the following steps: calculating a possibility score of the hierarchical ordered list as a dynamic subject sequence according to a similarity between head and tail styles of adjacent ordinal information in the hierarchical ordered list, a similarity between the head and tail styles of each ordinal information and a dynamic subject expression, and a literal style of each ordinal information; when determining that the hierarchical ordered list is the dynamic subject sequence according to the possibility score, taking a node corresponding to each ordinal information of the hierarchical ordered list in the second block structure tree as a dynamic subject; and determining non-dynamic subject nodes associated with each static subject according to a similarity between node text of the non-dynamic subject nodes in the second block structure tree and a title text of each static subject.

[0153] In one embodiment, the computer program, when executed by the processor, further implements the following steps: determining, in the second block structure tree, the accessed nodes accessed by the backtracking paths from the element name to each node in the backtracking direction of the root node, and determining the path score according to the similarity between the accessed nodes and the element name; determining the element subject to be associated and the standard element to be aligned according to the similarity between the element name and the title text of the standard element, the similarity between the title text of the element subject and the occurrence text, and the path score; and associating the element information with the element subject to be associated, and aligning with the standard element to be aligned.

[0154] In one embodiment, the computer program, when executed by the processor, further implements the following steps: performing text preprocessing on the obtained text, and performing natural language processing on the preprocessed text.

[0155] In one embodiment, the computer program, when executed by the processor, further implements the following steps: when there are multiple corresponding element values in the element name in the element information, performing quality evaluation on the multiple element values corresponding to the element name to obtain an element value ranking; and screening the optimal element value of the element name according to the element value ranking.

[0156] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0157] Any combination of the technical features of the above embodiments can be made. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0158] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific and detailed manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are all within the scope of the present application. Therefore, the scope of protection of the patent of the present application should be subject to the appended claims.

Claims

1. An element extraction method characterized by comprising: The method comprises the following steps: identifying a hierarchical ordered list of the text to be extracted and forming a hierarchical ordered list tree, and performing block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree; openly extracting element information of a non-subject element in the text to be extracted and attaching the element information to the first block structure tree to obtain a second block structure tree; the open extraction refers to extraction without limitation of the type of element, and the non-subject element refers to element information without a subject, that is, a two-tuple containing an element name and an element value; subject identification is performed on nodes in the second block structure tree to determine an element subject; the element information of the non-subject element is associated with the element subject and aligned with a standard element of the element subject; specifically, an access node accessed by a backtracking path from an element name to each node is determined in the second block structure tree with a root node as a recursive backtracking direction, a path score is determined according to the similarity between the access node and the element name, a to-be-associated element subject and a to-be-aligned standard element are determined according to the similarity between the element name and the address text of the standard element, the similarity between the address text of the element subject and the occurrence text, and the path score, and the element information is associated with the to-be-associated element subject and aligned with the to-be-aligned standard element.

2. The method of claim 1, wherein, The method of identifying a hierarchical ordered list of the text to be extracted and forming a hierarchical ordered list tree, and performing block division on the text to be extracted based on the hierarchical ordered list tree to form a first block structure tree comprises the following steps: performing hierarchical ordered list identification on the text to be extracted, and outputting hierarchical information and ordinal information in the text to be extracted; taking the text to be extracted as a root node, dividing the ordinal information into child nodes or leaf nodes according to the hierarchical information, and forming a hierarchical ordered list tree; taking a node in the hierarchical ordered list tree as an ordinal block, and performing fragment segmentation on the text to be extracted with the ordinal information corresponding to the ordinal block as a segmentation symbol to obtain direct text of the ordinal block; identifying a non-ordinal block in the direct text of the ordinal block; taking the non-ordinal block as a child node of a corresponding ordinal block to form a new tree to obtain a first block structure tree.

3. The method of claim 2, wherein, The method of identifying a non-ordinal block in the direct text of the ordinal block comprises the following steps: segmenting the direct text of the ordinal block into subtext fragments according to line breaks and continuous white space characters of a preset length; performing block main idea identification on each subtext fragment to determine a block main idea text fragment; taking the block main idea text fragment as a non-ordinal block, and a subsequent fragment of the block main idea text fragment as direct text of the non-ordinal block.

4. The method of claim 3, wherein, The calculation formula of the block main idea identification on each subtext fragment to determine a block main idea text fragment is as follows: where n bt is the block main theme text segment, n1 is the first n1 words of the immediate text of the ordinal block, θ bt is a preset empirical parameter, p bt (i|i-1, i-2) is a real-valued feature function outputted when the i, i-1, i-2 position words of the first n1 words of the immediate text of the ordinal block are classified, V bt denotes a block main theme ending word set, is an indicator function.

5. The method of claim 1, wherein, The method of openly extracting element information of a non-subject element in the text to be extracted and attaching the element information to the first block structure tree to obtain a second block structure tree comprises the following steps: anchoring a position where a delimiter appears in the text to be extracted to obtain an anchor position; identifying an element name of a non-subject element and an element value corresponding to the element name based on the anchor position to obtain element information; Determine the text block where the element information source text is located, create the element information node with the node corresponding to the text block in the first block structure tree as the parent node, and obtain a second block structure tree.

6. The method of claim 5, wherein, Based on the anchor position, identify the element name and the corresponding element value, and obtain element information, including: Determine a first position that meets the requirements before the anchor position, and take the text segment between the first position and the anchor position as the element name, and the determination formula of the first position is as follows: wherein n key is a first position, n2represents a word position in the text to be extracted, n kvs is an anchor position, θ key is a preset empirical parameter, p key (i|i-1, i-2, i+1, i+2) is a real-valued feature function outputted when the word classification at the i, i-1, i-2, i+1, i+2 positions in the text to be extracted is i, V key represents a set of text ending words, is an indicator function; Based on the element name, determine a second position that meets the requirements after the anchor position, and take the text segment between the anchor position and the second position as the element value of the element name, and the determination formula of the second position is as follows: where n val is the second position, n2 represents the word position in the text, n kvs is the anchor position, θ val is a preset empirical parameter, p val (i|i-1, i-2, i+1, i+2; n key ) is a real-valued feature function output when the word classification at the i, i-1, i-2, i+1, i+2 positions in the text to be extracted is given the element name n key , V val represents a set of text ending words, is an indicator function.

7. The method of claim 1, wherein, The element subject includes a dynamic subject and a static subject, and the subject identification on the node in the second block structure tree determines the element subject, including: According to the similarity of the head and tail styles between the adjacent sequence numbers in the hierarchical ordered list, the similarity of the head and tail styles of each sequence number information and the dynamic subject expression, and the literal style of each sequence number information, calculate the possibility score of the hierarchical ordered list as a dynamic subject sequence; When it is determined according to the possibility score that the hierarchical ordered list is a dynamic subject sequence, take the node corresponding to each sequence number information of the hierarchical ordered list in the second block structure tree as a dynamic subject; According to the similarity of the node text of the non-dynamic subject node in the second block structure tree and the appellation text of each static subject, determine the non-dynamic subject node associated with each static subject.

8. The method of claim 1, wherein, Before the identification of the hierarchical ordered list structure in the text to be extracted, the text preprocessing is further included, and the natural language processing is performed on the preprocessed text.

9. The method of claim 1, wherein, After the alignment of the element information of the element without a subject with the standard element of the target field and the association with the element subject, the following is further included: When there are multiple corresponding element values in the element name in the element information, quality evaluation is performed on the multiple element values corresponding to the element name to obtain an element value ranking; According to the element value ranking, the optimal element value of the element name is screened.

10. An element extraction apparatus characterized by comprising: Including: A tree structure forming module is configured to identify a hierarchical ordered list of a text to be extracted and form a hierarchical ordered list tree, and divide the text to be extracted into blocks based on the hierarchical ordered list tree to form a first block structure tree; An open extraction module is configured to open extract element information of an element without a subject in the text to be extracted and attach the element information to the first block structure tree to obtain a second block structure tree; the open extraction refers to extraction without limitation of the type of element, and the element without a subject refers to element information without an element subject, that is, a two-tuple including an element name and an element value; A subject identification module is configured to identify a subject of an element by identifying a node in the second block structure tree; An alignment module is configured to align the element information of the element without a subject with a standard element of the element subject and associate the element information with the element subject. Specifically, in the second block structure tree, an access node is determined by recursively tracing back from a root node to a node along a path of an element name, and a path score is determined according to a similarity between the access node and the element name; According to a similarity between the element name and a title text of the standard element, a similarity between a title text and an occurrence text of an element subject, and the path score, a to-be-associated element subject and a to-be-aligned standard element are determined; The element information is associated with the to-be-associated element subject and aligned with the to-be-aligned standard element. 11.A computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer device is configured to execute the computer program to perform the method according to any one of claims 1-10. The processor is configured to implement the element extraction method in any one of claims 1-9 when executing the computer program.

12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is configured to implement the element extraction method in any one of claims 1-9 when executed by the processor.

Citation Information

Patent Citations

  • Information extraction method and device for judgment documents

    CN111310446A

  • Logical structure tree construction method and system for listed company reports, storage medium and terminal

    CN113642291A