An information extraction method, device and equipment supporting text cross coverage and a medium

By generating a tag sequence through character vector encoding and object transition matrix of the target text, the problems of incomplete information extraction and low accuracy are solved, and more complete and accurate information extraction is achieved.

CN114792086BActive Publication Date: 2025-10-28UNIV OF CHINESE ACAD OF SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110105562.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-26
Publication Date
2025-10-28
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

Existing information extraction methods are incomplete when faced with overlapping situations, and they do not balance semantics and the label relationship between characters, resulting in low information extraction accuracy.

Method used

By encoding each character in the target text to generate a character vector, determining the target probability value group of the character vectors, generating an object vector sequence set, and using the object transition matrix to generate a label sequence set, the object information is finally extracted from the text.

Benefits of technology

It improves the completeness and accuracy of information extraction. By using a coding design that shares textual and location information, it fully trains the target and accurately expresses the relationships between words, thus achieving accurate extraction of overlapping information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792086B_ABST
    Figure CN114792086B_ABST
Patent Text Reader

Abstract

This disclosure presents embodiments of an information extraction method, apparatus, device, and computer-readable medium. One specific implementation of the method includes: acquiring target text; encoding each character in the target text to generate character vectors, obtaining a character vector sequence; determining a target probability value group corresponding to each character vector in the character vector sequence, obtaining a target probability value group sequence; generating an object vector sequence set based on the target probability value group sequence and a tag set; generating a tag sequence set based on the object vector sequence set and an object transition matrix set; and extracting object information from the target text corresponding to each tag sequence in the tag sequence set, obtaining an object information set. This implementation enables information extraction from text with overlapping information, providing convenience for applications such as text analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to information extraction methods, apparatus, devices, and computer-readable media. Background Technology

[0002] Information extraction is a text processing technique that extracts information such as entities, relationships, and events from natural language text. Existing information extraction methods generally transform the information extraction task into a sequence labeling problem, that is, labeling each character in the text to extract a portion of the characters as information.

[0003] However, when using the above methods for information extraction, the following technical problems often arise:

[0004] First, in many application scenarios, the information that needs to be extracted often overlaps or is covered, while existing sequence labeling methods can only extract each word once, resulting in incomplete extracted information.

[0005] Second, in many application scenarios, the relationship between semantics and the corresponding tags of characters is not balanced when extracting information, resulting in low accuracy of the extracted information. Summary of the Invention

[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] Some embodiments of this disclosure propose information extraction methods to solve one or more of the technical problems mentioned in the background section above.

[0008] In a first aspect, some embodiments of this disclosure provide a method for information extraction, the method comprising: acquiring target text; encoding each character in the target text to generate character vectors, thereby obtaining a character vector sequence; determining a target probability value group corresponding to each character vector in the character vector sequence, thereby obtaining a target probability value group sequence; generating an object vector sequence set based on the target probability value group sequence and a tag set; generating a tag sequence set based on the object vector sequence set and an object transition matrix set; and extracting object information corresponding to each tag sequence in the tag sequence set from the target text, thereby obtaining an object information set.

[0009] Secondly, some embodiments of this disclosure provide an information extraction apparatus, comprising: an acquisition unit configured to acquire target text; an encoding unit configured to encode each character in the target text to generate a character vector, thereby obtaining a character vector sequence; a determination unit configured to determine a target probability value group corresponding to each character vector in the character vector sequence, thereby obtaining a target probability value group sequence; a first generation unit configured to generate an object vector sequence set based on the target probability value group sequence and a tag set; a second generation unit configured to generate a tag sequence set based on the object vector sequence set and an object transition matrix set; and an extraction unit configured to extract object information corresponding to each tag sequence in the tag sequence set from the target text, thereby obtaining an object information set.

[0010] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0011] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0012] The embodiments disclosed above have the following beneficial effects: By encoding each character in the acquired target text to generate character vectors, these encoded character vectors contain both textual and positional information. The underlying shared design allows objects with limited training data to be fully trained, improving the learning ability of the entire process. By assigning labels related to each target object to each character in the target text, object information corresponding to each object can be initially extracted. Subsequently, a label transition matrix is ​​introduced to more accurately express the relationship between pairs of adjacent characters, thereby achieving accurate extraction of overlapping information. Attached Figure Description

[0013] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0014] Figure 1 This is a schematic diagram illustrating an application scenario of an information extraction method according to some embodiments of the present disclosure;

[0015] Figure 2 These are flowcharts of some embodiments of the information extraction method according to this disclosure;

[0016] Figure 3 This is a flowchart of some embodiments of the information extraction apparatus according to the present disclosure;

[0017] Figure 4 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure;

[0018] Figure 5 This is a schematic diagram illustrating another application scenario of the information extraction method according to some embodiments of the present disclosure. Detailed Implementation

[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0020] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0022] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] Figure 1 This is a schematic diagram illustrating an application scenario of the information extraction method according to some embodiments of this disclosure.

[0024] exist Figure 1In the application scenario, firstly, the computing device 101 can acquire the target text 102; then, the computing device 101 can encode each character in the target text 102 to generate a character vector, resulting in a character vector sequence 103; next, the computing device 101 can determine the target probability value group corresponding to each character vector in the character vector sequence 103, resulting in a target probability value group sequence 104; then, the computing device 101 can generate an object vector sequence set 106 based on the target probability value group sequence 104 and the tag set 105; then, the computing device 101 can generate a tag sequence set 108 based on the object vector sequence set 106 and the object transition matrix set 107; finally, the computing device 101 can extract object information corresponding to each tag sequence in the tag sequence set 108 from the target text 102, resulting in an object information set 109.

[0025] It should be noted that the aforementioned computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed within the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.

[0026] It should be understood that Figure 1 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.

[0027] Continue to refer to Figure 2 The flowchart 200 illustrates some embodiments of the information extraction method according to the present disclosure. The information extraction method includes the following steps:

[0028] Step 201: Obtain the target text.

[0029] In some embodiments, the entity executing the information extraction method (e.g., computing device 101) can obtain the target text through various means such as web pages, text files, and images. The target text can be an article, paragraph, or sentence. The target object can be a pre-determined noun based on the application scenario requirements.

[0030] As an example, the target object mentioned above could be pork, and the target text could be "corn and pork prices soar".

[0031] Step 202: Encode each character in the target text to generate a character vector, resulting in a character vector sequence.

[0032] In some embodiments, the execution entity can input the character sequence corresponding to the target text into a long short-term memory artificial neural network for encoding, thereby obtaining the character vector sequence. The character sequence is a sequence composed of all characters in the target text, and the character vector is the vector corresponding to the character obtained by encoding the character through the network. As an example, the character vector can be [1, 0, 1, 0, 0, 1, 0, 1, 1, 1].

[0033] In some alternative implementations of certain embodiments, the aforementioned execution entity may input the target text into a pre-trained text encoding model to obtain a sequence of character vectors.

[0034] As an example, a text encoding model could be BERT (Bidirectional Encoder Representations from Transformers).

[0035] Step 203: Determine the target probability value group corresponding to each character vector in the character vector sequence to obtain the target probability value group sequence.

[0036] In some embodiments, the execution entity can sequentially input the word vector sequence into a fully connected layer to obtain a preliminary dimensionality-reduced word vector sequence, then input it into a downsampling layer to obtain a second dimensionality-reduced word vector sequence, and finally input it into a fully connected layer to obtain a third dimensionality-reduced word vector sequence. Each word vector in this sequence can be normalized to generate a target probability value set, resulting in a target probability value set sequence. The number of target probability values ​​in the target probability value set is equal to the number of labels. The i-th target probability value represents the probability that the word corresponding to the word vector is assigned the i-th label. Here, i can take any integer from 1 to 2N+1, and N represents the number of target objects.

[0037] In some optional implementations of certain embodiments, the execution entity can input the word vector sequence into at least one pre-trained fully connected layer to obtain a target probability value set sequence. Through the at least one fully connected layer, a corresponding target probability value set can be obtained for each word vector.

[0038] Step 204: Generate an object vector sequence set based on the target probability value group sequence and the label group set.

[0039] In some embodiments, the execution entity can filter the target probability values ​​in the target probability value sequence based on the tag group. For example, to extract information on pork price changes from "pork and corn prices have surged this year," the target object can be pork, and the tags B-pork, I-pork, and O can be grouped into one tag group. If corn is another target object, the tags B-corn, I-corn, and O can be grouped into another tag group. Each target object can correspond to one tag group, and all target objects can correspond to one tag group set. Each character in the target text can correspond to a target probability value group, and each target probability value can correspond to a tag. The target probability value represents the probability that the character is identified as the current tag. Thus, the target probability value corresponding to each tag in the target tag group is selected sequentially from each target probability value group in the target probability value sequence, resulting in a target probability value sequence corresponding to each tag in the target tag group. Then, the target probability values ​​at the same position in the sequences corresponding to the tags "BX", "IX", and "O" are sequentially taken to form a triplet, which is used as the object vector. The object vector sequence can be obtained from the three sequences corresponding to the three tags of the target tag group. Here, the target tag group is the tag group in the tag group set.

[0040] In some optional implementations of certain embodiments, the aforementioned execution entity may obtain the object vector sequence set through the following steps:

[0041] The first step is to sequentially select the target probability value corresponding to each target label in the target label group from the target probability value group sequence to obtain the target probability value sequence, where the target label group is the label group in the label group set.

[0042] As an example, the target text can be "Pork prices have skyrocketed this year", and there are two target objects: pork and corn. There are five tags: "B-pork", "I-pork", "B-corn", "I-corn", and "O". The tag group corresponding to "pork" includes three tags: "B-pork", "I-pork", and "O". The target probability value group sequence can be [0.2, 0.5, 0.6, 0.1, 0.3], [0.2, 0.8, 0.3, 0.9, 0.2], [0.5, 0.8, 0.3, 0.4, 0.5], [0.4, 0.2, 0.7, 0.6, 0.1], [0.1, 0.2, 0.5, 0.3, 0.8], [0.7, 0.3, 0.2, 0.5, 0.2]. To extract the change information of pork prices, select the target probability values corresponding to each tag in the tag group of the target object "pork" from the above sequences. For the tag "B-pork", the target probability value sequence 0.2, 0.2, 0.5, 0.4, 0.1, 0.7 can be selected. For the tag "I-pork", the target probability value sequence 0.5, 0.8, 0.8, 0.2, 0.2, 0.3 can be selected. For the tag "O", the target probability value sequence 0.3, 0.2, 0.5, 0.1, 0.8, 0.2 can be selected.

[0043] In the second step, based on the obtained target probability value sequences, generate a set of object vector sequences. Among them, for any tag group, the target probability value sequences corresponding to each tag in the tag group can be obtained through the first step. From the above three target probability value sequences, select the elements at the same positions in the sequences to form a triple, and use this triple as an object vector to obtain an object vector sequence.

[0044] As an example, select the elements at the same positions in the three target probability value sequences selected in the first step to obtain the following object vectors: (0.2, 0.5, 0.3), (0.2, 0.8, 0.2), (0.5, 0.8, 0.5), (0.4, 0.2, 0.1), (0.1, 0.2, 0.8), (0.7, 0.3, 0.2). According to the positions of the elements in the corresponding sequences when selecting, an object vector sequence can be obtained from these object vectors. Among them, the object vectors in this sequence correspond to the words "this", "year", "pork", "prices", "have", "skyrocketed" respectively.

[0045] Step 205, based on the set of object vector sequences and the set of object transition matrices, generate a set of tag sequences.

[0046] In some embodiments, the execution entity can use the object vector sequence set as the label sequence set, where all elements in the object transition matrix are constants. The elements in the object transition matrix represent the transition probabilities between labels. The object transition matrix is ​​a 3×3 matrix, where N is the number of target objects. For example, if the target object is pork, and the goal is to extract information about pork price fluctuations, then "This year's pork prices have surged" can be assigned to the label sequence "OOOOO OB-pork I-pork". Assuming the execution entity assigns the label "O" to "today", when assigning a label to "year", it will use the information that "today" is labeled "O" to give the probability that "year" will be assigned each label. This increases the probability that "year" will be assigned the correct label. In this process, the probability of the next character being assigned a certain label based on the current character's label is called the label-to-label transition probability.

[0047] In some optional implementations of certain embodiments, the execution entity can generate a tag sequence using the Viterbi algorithm for each object vector sequence in the object vector sequence set and the corresponding object transition matrix. The object vector sequence corresponding to the target object X can be used to generate a matrix as follows: each object vector in the sequence is sequentially assigned to the first, second, ..., Mth column of the matrix; the elements of the object vectors are sequentially assigned to the elements of the first, second, and third rows of the corresponding columns. Here, M is the length of any vector sequence. The generated matrix is ​​called the emission matrix of the target object X of the target text. Using the emission matrix and the object transition matrix, an optimal sequence can be obtained through the Viterbi algorithm, and this sequence is used as the tag sequence.

[0048] In some optional implementations of certain embodiments, the execution entity can obtain the score of the candidate label sequence for each object vector sequence and the corresponding object transition matrix in the object vector sequence set using the following formula:

[0049]

[0050] in, This represents the score of the candidate label sequence. Indicated by The first score of the sequence starting from the given point. Indicated by The second score of the sequence starting from the given point. λ represents the control factor. j represents the index of the object vector sequence. i j `j` represents the index of the element in the `j`-th object vector. `i` represents the index of the element in the object vector. `M` represents the length of the object vector sequence. `x` represents the element value of the object vector. `y` represents the element value of the object transition matrix. Represents the i-th element in the j-th object vector. j Each element value. Represents the i-th element in the object transition matrix j Line, i j+1 The column contains element values. Here, λ is a control factor that adjusts the weighting of the object vector sequence and the transition matrix according to the application scenario. The first score is obtained by adding one element selected from each object vector in the object vector sequence, with the starting point representing the position of the first element in the first object vector. The second score is obtained by adding the corresponding elements selected from the object transition matrix. For example, λ can be 1, the object vector length can be 5, and M can be 20, resulting in 5 possible starting points and a total of 5 unique paths. 20 These paths constitute the resulting set of sequences, each It corresponds to a sequence.

[0051] Then, select the candidate label sequence with the highest score from the obtained candidate label sequences as the label sequence. The corresponding sequence is used as the label sequence.

[0052] As an example, the above-mentioned at least one fully connected layer and object transition matrix set can be obtained through the following steps:

[0053] The first step is to obtain a training sample set, where the training samples are texts of no more than a preset length selected based on the target object. The preset length can be 100 characters.

[0054] The second step is to perform BIO annotation on the training sample set to obtain the label sequence corresponding to the training samples. Then, the training samples are input into BERT to obtain the vector representation of each character. These vectors are used as character vectors, resulting in a character vector sequence corresponding to the training samples. BIO annotation assigns a label to each character in the text based on a set of target objects; the label is an identifier for the character. Each target object has three types of labels. For example, for target object X, the three types of labels are "BX", "IX", and "O". These three types of labels are grouped into a set, called the label group for target object X. A character labeled "BX" indicates that the word it belongs to describes information about target object X, and that the character is at the beginning of that word. A character labeled "IX" indicates that the word it belongs to describes information about target object X, and that the character is not at the beginning of that word. A character labeled "O" indicates that the information expressed by the character is unrelated to target object X. For example, if the target is pork and the goal is to extract information on pork price changes, then "pork prices have surged this year" can be assigned the label sequence "OOOOOO B-pork I-pork".

[0055] The third step involves inputting the character vector sequence into several fully connected layers, one after the other, to output a probability value set corresponding to each character in the training sample, resulting in a probability value set sequence. The number of neurons in the first fully connected layer can be a preset length multiplied by the length of the character vector, and the number of neurons in the last fully connected layer can also be a preset length. During output, the dimension corresponding to each character is 2N+1, the number of labels, where N is the number of target objects. The above probability value sets and target probability value sets are only used to distinguish between different outputs during training and testing; they are identical except for the possible differences in the probability values ​​they contain. Each probability value set in the probability value set sequence is then mapped to a column of a matrix. The first element of a probability value set corresponds to the first element of the corresponding column in the matrix, with the remaining elements arranged sequentially. This matrix is ​​called the emission matrix of the training sample. By extracting the elements from each column of the emission matrix, the corresponding probability value set sequence can be obtained.

[0056] Fourth, based on the emission and transition matrices described above, the probability of the corresponding optimal sequence can be obtained using the Viterbi algorithm. The optimal sequence is the label sequence corresponding to the training samples labeled in the second step. The objective function is the function that maximizes the probability of this optimal sequence. Using gradient descent, all weights and transition matrices of at least one fully connected layer can be continuously updated, ultimately obtaining a trained at least one fully connected layer and its transition matrix. This trained transition matrix is ​​called the label transition matrix. Each row of the transition matrix corresponds to a unique label, called the row label, and each column also corresponds to a unique label, called the column label. The elements in the transition matrix are the transition probabilities between any two labels out of all 2N+1 labels, where N represents the number of target objects.

[0057] Fifth, for target object X, select the elements with the line label "BX" and column labels "BX", "IX", and "O" from the label transition matrix to obtain the first triplet; then select the elements with the line label "IX" and column labels "BX", "IX", and "O" to obtain the second triplet; then select the elements with the line label "O" and column labels "BX", "IX", and "O" to obtain the third triplet. Place the three elements from the first triplet into the first row and first column, the second row and second column, and the third column of a 3×3 matrix, respectively. Place the other two triplets into the matrix using the same rule to obtain the object transition matrix for target object X. Similarly, the object transition matrices for the remaining target objects can be obtained.

[0058] The above formula and related content, as an inventive point of this disclosure, solve the second technical problem mentioned in the background art: "In many application scenarios, the relationship between semantics and word attributes is not balanced during information extraction, resulting in low accuracy of the extracted information." Factors leading to low accuracy often include: insufficient consideration of the relationship between semantics and the tags corresponding to the words. Solving these factors can improve the accuracy of information extraction. To achieve this, this disclosure introduces a control factor to improve the accuracy of information extraction. When the application focuses more on the semantic information of the target text, the control factor can be reduced to obtain more semantic information. When the application focuses more on the relationship between the tags corresponding to the words in the target text, the control factor can be increased to make the extracted information grammatically more accurate.

[0059] Step 206: Extract object information corresponding to each tag sequence in the tag sequence set from the target text to obtain the object information set.

[0060] In some embodiments, the aforementioned execution entity can extract the words corresponding to non-"O" tags from the tag sequence in the target text to obtain a piece of object information.

[0061] As an example, such as Figure 5 The target objects are pork and corn. The tag sequence corresponding to the text "Pork and corn prices have soared" is "OOOO B-Pork I-Pork", so the "surge" in pork can be extracted. The tag sequence corresponding to the text "Pork and corn prices have soared" is "OOOO B-Corn I-Corn", so the "surge" in corn can be extracted.

[0062] The embodiments disclosed above have the following beneficial effects: By encoding each character in the acquired target text to generate character vectors, these encoded character vectors contain both textual and positional information. The underlying shared design allows objects with limited training data to be fully trained, improving the learning ability of the entire process. By assigning labels related to each target object to each character in the target text, it is possible to initially extract the object information corresponding to each object. Subsequently, multiple object transition matrices are introduced to more accurately express the relationship between pairs of adjacent characters, thereby achieving accurate extraction of overlapping information.

[0063] Further reference Figure 3 As an implementation of the method described above, this disclosure provides some embodiments of an information extraction device, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0064] like Figure 3As shown, the information extraction device 300 in some embodiments includes: an acquisition unit 301, an encoding unit 302, a determination unit 303, a first generation unit 304, a second generation unit 305, and an extraction unit 306. The acquisition unit 301 is configured to acquire target text; the encoding unit 302 is configured to encode each character in the target text to generate a character vector, resulting in a character vector sequence; the determination unit 303 is configured to determine the target probability value group corresponding to each character vector in the character vector sequence, resulting in a target probability value group sequence; the first generation unit 304 is configured to generate an object vector sequence set based on the target probability value group sequence and a tag set; the second generation unit 305 is configured to generate a tag sequence set based on the object vector sequence set and an object transition matrix set; and the extraction unit 306 is configured to extract object information corresponding to each tag sequence in the tag sequence set from the target text, resulting in an object information set.

[0065] It is understandable that the units described in the device 300 are related to the reference. Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 300 and the units contained therein, and will not be repeated here.

[0066] The following is for reference. Figure 4 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of the computing device 101)400. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0067] like Figure 4 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.

[0068] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.

[0069] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined above in the methods of some embodiments of this disclosure.

[0070] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0071] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0072] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire target text; encode each character in the target text to generate a character vector, obtaining a character vector sequence; determine the target probability value group corresponding to each character vector in the character vector sequence, obtaining a target probability value group sequence; generate an object vector sequence set based on the target probability value group sequence and a tag set; generate a tag sequence set based on the object vector sequence set and an object transition matrix set; and extract object information corresponding to each tag sequence in the tag sequence set from the target text, obtaining an object information set.

[0073] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0074] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0075] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit, an encoding unit, a determining unit, a first generation unit, a second generation unit, and an extraction unit. The names of these units do not necessarily limit the specific unit; for example, an acquisition unit may also be described as a "unit for acquiring target text."

[0076] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0077] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. An information extraction method, comprising: Get the target text; Each character in the target text is encoded to generate a character vector, resulting in a sequence of character vectors. Determine the target probability value group corresponding to each character vector in the character vector sequence to obtain a target probability value group sequence. This determination includes: sequentially inputting the character vector sequence into a fully connected layer to obtain a pre-reduced dimensionality character vector sequence; inputting the pre-reduced dimensionality character vector sequence into a downsampling layer to obtain a second dimensionality-reduced character vector sequence; inputting the second dimensionality-reduced character vector sequence into a fully connected layer to obtain a third dimensionality-reduced character vector sequence; and normalizing each character vector in the third dimensionality-reduced character vector sequence to generate a target probability value group, thus obtaining a target probability value group sequence. The target probability value represents the probability that the character corresponding to the character vector is assigned a corresponding label. Based on the target probability value group sequence and the tag group set, an object vector sequence set is generated, including: each character in the target text corresponds to a target probability value group, and each target probability value corresponds to a tag, wherein the target probability value represents the probability that the character is determined to be the current tag; the target probability value corresponding to each tag in the target tag group is selected sequentially from each target probability value group in the target probability value group sequence to obtain the target probability value sequence corresponding to each tag in the target tag group; the target probability values ​​at the same position in the sequence corresponding to the tag are taken sequentially to form a triplet, and the triplet is used as the object vector; the object vector sequence is obtained from the three sequences corresponding to the three tags of the target tag group, wherein the target tag group is the tag group in the tag group set; and the obtained object vector sequence corresponding to each tag group in the tag group set is determined as the object vector sequence set. Based on the object vector sequence set and the object transition matrix set, a label sequence set is generated; Extract object information corresponding to each tag sequence in the tag sequence set from the target text to obtain an object information set.

2. The method according to claim 1, wherein, The process of encoding each character in the target text to generate a character vector, resulting in a character vector sequence, includes: The target text is input into a pre-trained text encoding model to obtain the character vector sequence.

3. The method according to claim 1, wherein, The step of generating a label sequence set based on the object vector sequence set and the object transition matrix set includes: For each object vector sequence in the object vector sequence set and the corresponding object transition matrix, a label sequence is generated using the Viterbi algorithm.

4. The method according to claim 3, wherein, For each object vector sequence in the object vector sequence set and the corresponding object transition matrix, the label sequence is generated using the Viterbi algorithm, including: For each object vector sequence in the object vector sequence set and the corresponding object transition matrix, the score of the candidate label sequence is obtained using the following formula: , in, This represents the score of the candidate label sequence. Indicated by The first score of the sequence starting from the given point. Indicated by The second score of the sequence starting from the given point. Indicates regulatory factor, The index represents the sequence number of the object vector. Indicates the first The index of the element in a vector of objects. Indicates the index of an element in the object vector. This indicates the length of the object vector sequence. Represents the element values ​​of an object vector. This represents the element value of the object's transition matrix. Indicates the first The nth object vector Each element value Represents the first in the object transition matrix Okay, number The element values ​​of the column; Select the candidate label sequence with the highest score from the obtained candidate label sequences as the label sequence.

5. An information extraction device, comprising: The acquisition unit is configured to acquire the target text; The encoding unit is configured to encode each character in the target text to generate a character vector, resulting in a sequence of character vectors; The determining unit is configured to determine the target probability value group corresponding to each character vector in the character vector sequence, and obtain a target probability value group sequence. The determination of the target probability value group corresponding to each character vector in the character vector sequence and obtaining the target probability value group sequence includes: sequentially inputting the character vector sequence into a fully connected layer to obtain a preliminary dimensionality-reduced character vector sequence; inputting the preliminary dimensionality-reduced character vector sequence into a downsampling layer to obtain a second dimensionality-reduced character vector sequence; inputting the second dimensionality-reduced character vector sequence into a fully connected layer to obtain a third dimensionality-reduced character vector sequence; and normalizing each character vector in the third dimensionality-reduced character vector sequence to generate a target probability value group, thus obtaining a target probability value group sequence. The target probability value represents the probability that the character corresponding to the character vector is assigned a corresponding label. The first generation unit is configured to generate an object vector sequence set based on the target probability value group sequence and the tag group set, including: each character in the target text corresponds to a target probability value group, and each target probability value corresponds to a tag, wherein the target probability value represents the probability that the character is determined to be the current tag; sequentially selecting the target probability value corresponding to each tag in the target tag group from each target probability value group in the target probability value group sequence to obtain the target probability value sequence corresponding to each tag in the target tag group; sequentially taking the target probability values ​​at the same position in the sequence corresponding to the tag to form a triplet; using the triplet as an object vector; obtaining the object vector sequence from the three sequences corresponding to the three tags of the target tag group, wherein the target tag group is a tag group in the tag group set; and determining the obtained object vector sequence corresponding to each tag group in the tag group set as the object vector sequence set. The second generation unit is configured to generate a tag sequence set based on the object vector sequence set and the object transition matrix set; The extraction unit is configured to extract object information corresponding to each tag sequence in the tag sequence set from the target text to obtain an object information set.

6. An electronic device / terminal / server, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-4.

7. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Sequence labeling method and system and computer equipment

    CN111222317A

  • Text regeneration method and device, electronic equipment and computer readable medium

    CN111666418A