Information extraction method, device, computer equipment, and storage medium for reward announcement
By separating and grouping the reward announcement data, extracting and classifying the announcement fields and the parties fields, the problem of poor extraction of reward announcements in the existing technology is solved, and efficient and accurate automatic extraction and classification is achieved.
Patent Information
- Application Number
- CN202111339175.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-11-12
AI Technical Summary
It is difficult for the prior art to efficiently and accurately extract the content of reward announcements in the news, especially when multiple collections appear, and each field has multiple values in the text, resulting in poor extraction results.
Provide a method to obtain reward announcement data, use preset text separation method to separate the data, and obtain a sentence set. Then use preset field extraction method to extract fields in the sentence set, process announcement fields and party fields in groups to form an announcement information group Collection and party information group collection.
It realizes efficient and accurate automatic extraction of reward announcement information, reduces manual intervention, improves extraction speed and accuracy, and facilitates information query.
Smart Images

Figure CN114090734B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of electrical data processing, and in particular to a method, device, computer equipment, and storage medium for extracting information from a reward announcement. Background Art
[0002] With the development of electronic data processing technology, information extraction technology has emerged. This technology uses algorithm models to extract the information people need from various text information. However, this type of information extraction technology is generally aimed at regular text. When the text is a reward announcement in the news, since the reward announcements in the news often appear in the form of a collection of multiple articles, and each field may have multiple values in the text, it is difficult to directly extract and group them using existing technologies, and the extraction effect is not good. At present, there is no electronic data information extraction method specifically for reward announcements.
[0003] In traditional technology, people use manpower to extract relevant information for reward announcements, which is time-consuming and costly. Therefore, there is an urgent need for a method that can extract the content of reward announcements faster, more efficiently, and more accurately, so that people can obtain reward announcement information more conveniently and accurately. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, and storage medium that can automatically and efficiently extract information from reward announcements in order to address the above technical issues.
[0005] In a first aspect, the present disclosure provides a method for extracting information from a reward announcement. The method comprises:
[0006] Get reward announcement data;
[0007] Separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data;
[0008] Extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field;
[0009] According to the announcement-specific field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, wherein the announcement-specific field includes an announcement field that has a one-to-one correspondence with the reward announcement;
[0010] According to the party-specific fields in the party fields, the party fields are grouped to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0011] In one of the embodiments, the preset field extraction method includes a keyword-regular expression method and a keyword-neural network-conditional random field method.
[0012] In one embodiment, the preset field extraction method includes:
[0013] The keyword-regular expression method is used to extract fields that are regular and whose word count does not exceed the preset threshold, and the keyword-neural network-conditional random field method is used to extract fields that are irregular or whose word count exceeds the preset threshold.
[0014] In one of the embodiments, the announcement field and the party field are grouped according to the announcement-unique field in the announcement field to obtain an announcement information group set, which includes: traversing the announcement field, and when similar announcement-unique fields begin to appear, determining the traversed announcement field and the party field that do not belong to the existing announcement information group as a new announcement information group.
[0015] In one of the embodiments, grouping the party fields to obtain a party information group set includes: traversing the party fields, and when the party fields of the same type begin to appear, determining the party fields that have been traversed and do not belong to the existing party information group as a new party information group.
[0016] In one embodiment, grouping the announcement field and the party field to obtain an announcement information group set includes:
[0017] When the case number of the sentence set is not unique, the announcement information groups in the announcement information group set are traversed, the announcement information group being traversed is called the current announcement information group, and the traversed information group adjacent to the current information group is called the previous announcement information group;
[0018] If the case number of the current announcement information group is consistent with the case number of the previous announcement information group or the current announcement information group has no case number, the current announcement information group is merged with the previous announcement information group.
[0019] In one embodiment, after obtaining the party information group set, the method further includes:
[0020] According to preset fields, sentences corresponding to each of the announcement information groups in the sentence set are traversed to obtain traversal results, wherein the preset fields include preset fields with the meaning of revoking the reward announcement;
[0021] According to the traversal result, the announcement type of each of the announcement information groups is determined, and the announcement type includes a bounty announcement type and a bounty cancellation announcement type.
[0022] In one embodiment, traversing each of the announcement information groups according to the preset fields includes:
[0023] Record the reward field and the sentence index corresponding to the reward field;
[0024] The corresponding sentences in the sentence set are traversed according to the sentence index.
[0025] In one embodiment, grouping the announcement field and the party field to obtain an announcement information group set includes: when the case number of the sentence set is unique, aggregating the announcement field and the party field of all announcement information groups.
[0026] In a second aspect, the present disclosure further provides a device for extracting information from a reward announcement. The device comprises:
[0027] Data acquisition module, used to obtain reward announcement data;
[0028] A sentence separation module, used to separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data;
[0029] A field extraction module, used to extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field;
[0030] An announcement information group module, used for grouping the announcement field and the party field according to the announcement unique field in the announcement field to obtain an announcement information group set, wherein the announcement unique field includes an announcement field that has a one-to-one correspondence with the reward announcement;
[0031] The party information group module is used to group the party fields according to the party-specific fields in the party fields to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0032] In a third aspect, the present disclosure further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0033] Get reward announcement data;
[0034] Separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data;
[0035] Extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field;
[0036] According to the announcement-specific field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, wherein the announcement-specific field includes an announcement field that has a one-to-one correspondence with the reward announcement;
[0037] According to the party-specific fields in the party fields, the party fields are grouped to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0038] In a fourth aspect, the present disclosure further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0039] Get reward announcement data;
[0040] Separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data;
[0041] Extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field;
[0042] According to the announcement-specific field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, wherein the announcement-specific field includes an announcement field that has a one-to-one correspondence with the reward announcement;
[0043] According to the party-specific fields in the party fields, the party fields are grouped to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0044] In a fifth aspect, the present disclosure further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0045] Get reward announcement data;
[0046] Separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data;
[0047] Extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field;
[0048] According to the announcement-specific field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, wherein the announcement-specific field includes an announcement field that has a one-to-one correspondence with the reward announcement;
[0049] According to the party-specific fields in the party fields, the party fields are grouped to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0050] The embodiment scheme provided by the present disclosure can obtain a sentence set by separating the acquired reward announcement data using a preset text separation method, and extract the fields in the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field, and then the announcement field and the party field are grouped according to the announcement-unique field in the announcement field to obtain an announcement information group set, and the party fields are grouped according to the party-unique field in the party field to obtain a party information group set, thereby achieving the beneficial effect of efficiently and accurately automatically extracting information from the reward announcement. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0052] Figure 1 A diagram of an application environment of a method for extracting information from a reward announcement in an embodiment;
[0053] Figure 2 A flowchart of a method for extracting information from a reward announcement in an embodiment;
[0054] Figure 3 A flowchart of a method for extracting information from a reward announcement in another embodiment;
[0055] Figure 4 It is a structural block diagram of an information extraction device for a reward announcement in an embodiment;
[0056] Figure 5 It is a structural block diagram of an information extraction device for reward announcement in another embodiment;
[0057] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0060] The information extraction method of the reward announcement provided in the embodiment of the present disclosure can be applied to Figure 1 In the application environment shown. The data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or it can be placed on the cloud or other network servers. Server 102 obtains the reward announcement data. Server 102 uses a preset text separation method to separate the reward announcement data to obtain a sentence set. Server 102 uses a preset field extraction method to extract the fields in the sentence set to obtain a reward field, and the reward field includes an announcement field and a party field. Then, according to the announcement-unique field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, and according to the party-unique field in the party field, the party field is grouped to obtain a party information group set. Server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0061] In one embodiment, Figure 2 As shown, a method for extracting information from a reward announcement is provided, and the method is applied to Figure 1 The application environment in the example is used to illustrate the following steps:
[0062] S202, obtaining reward announcement data.
[0063] Specifically, the reward announcement data can be obtained from newspapers, news websites, court websites, self-media platforms and other media through electronic scanning, crawling and other methods.
[0064] S204, using a preset text segmentation method to separate the reward announcement data to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data.
[0065] Specifically, the preset text separation method may be to use spaces or characters to separate the reward announcement data into relatively independent sentences, or other text separation methods, such as using a table to separate the text into a plurality of relatively independent sentences. The characters may be various existing characters, such as "\n", "!", ".", "?", "\r", ";", or custom characters. The relatively independent sentences are combined into a sentence set.
[0066] S206, using a preset field extraction method to extract fields in the sentence set to obtain a reward field, which may include an announcement field and a party field.
[0067] Among them, a field may refer to text content with a length limit, a field is a part of a sentence in the sentence set, and the length of the field generally does not exceed the length of the corresponding sentence. The preset field extraction method may refer to a method that can extract fields from text, tables, pictures or hypertext markup language documents. The party field may refer to a field related to the personal information of the reward object in the reward announcement, and the announcement field may refer to a field in the sentence set other than the party field.
[0068] Specifically, a method capable of performing field extraction is used to extract fields from the sentence set, and the extracted fields are called reward fields. The reward fields include announcement fields and party fields. The party field may refer to a field related to the personal information of the reward object in the reward announcement, and the announcement field may refer to a field in the sentence set other than the party field.
[0069] S208, grouping the announcement field and the party field according to the announcement-specific field in the announcement field to obtain an announcement information group set, wherein the announcement-specific field includes an announcement field that has a one-to-one correspondence with the reward announcement.
[0070] Specifically, the announcement-unique field in the announcement field can be used as a mark to distinguish different announcements, and the announcement field and the party field can be grouped so that the announcement field and the party field corresponding to the same reward announcement are divided into an independent announcement information group, and a plurality of announcement information groups constitute an announcement information group set. The announcement-unique field can include the announcement field that has a one-to-one correspondence with the reward announcement, and can also include other announcement fields that can distinguish different reward announcements. For example, the announcement-unique field can be the case number, announcement date, reward start time, reward end time, etc. of the reward announcement.
[0071] S210, grouping the party fields according to the party-specific fields in the party fields to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty object.
[0072] Specifically, the party-specific field in the party field can be used as a mark to distinguish different parties, and the party fields can be grouped so that the person field corresponding to the same bounty object is divided into an independent party information group, and a plurality of party information groups constitute an announcement information group set. The party-specific field includes the party field that has a one-to-one correspondence with the bounty object, and can also be other party fields that can distinguish different bounty objects. For example, the party-specific field can be the name of the bounty object, the ID number of the bounty object, or the address of the bounty object.
[0073] In the above-mentioned information extraction method for reward announcements, the obtained reward announcement data is separated by using a preset text separation method to obtain a sentence set. The fields in the sentence set are extracted using a preset field extraction method to obtain a reward field, and the reward field may include an announcement field and a party field. According to the announcement-unique field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set. According to the party-unique field in the party field, the party fields are grouped to obtain a party information group set. The above-mentioned method is an information extraction method specifically for reward announcements, which can extract fields in reward announcements and obtain the announcement information group set and the party information group set, and can achieve the beneficial effect of automatically extracting the information of reward announcements efficiently and accurately. At the same time, the extracted information of the reward announcement is classified. The existence of the announcement information group set and the party information group set facilitates people to query the extracted reward announcement information.
[0074] In one embodiment, the preset field extraction method includes a keyword-regular expression method and a keyword-neural network-conditional random field method.
[0075] Among them, the keyword-regular expression method may refer to a method of extracting field content by combining keywords with regular expressions. The keyword-neural network-conditional random field method may refer to a method of identifying and extracting fields by using keywords in combination with a model constructed by a neural network and a conditional random field.
[0076] Specifically, the general regular expression method is to describe a string matching pattern, according to which it can be checked whether a string contains a target string. When a string contains the target string, the target string is extracted, thereby achieving the effect of field extraction. The string can be a sentence. The target string can be a target field. The keyword-regular expression method first uses a keyword list to filter the sentences in the sentence set. When a sentence in the sentence set contains a keyword in the keyword list, the sentence is determined as a sentence that needs to be regular-checked. Then, a regular check is performed on the sentences that need to be regular-checked. The regular check can refer to using a regular expression to match the target field and check whether the target field can pass the match. When the target field can pass the match, the target field is extracted using a regular expression. There is a corresponding relationship between the target field and the keywords in the keyword list.
[0077] The neural network can be a long short-term memory network (Long Short-Term Memory, LSTM for short), or a bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, BiLSTM for short), or other neural networks with text recognition capabilities, such as Google's BERT model (Bidirectional Encoder Representation from Transformers for short) and Baidu's knowledge enhanced semantic representation model (Enhanced Representation through Knowledge Integration, ERNIE for short). The neural network is combined with the conditional random field to construct a neural network-conditional random field model. Specifically, the sentences in the sentence set are first filtered using a keyword list. When a sentence in the sentence set contains a keyword in the keyword list, the sentence is determined as a sentence that needs to be extracted by the neural network-conditional random field model. Then the neural network-conditional random field model is used to extract the target field from the corresponding sentence. It should be noted that the keyword-regular expression method or the keyword-neural network-conditional random field method can be used alone to extract the fields in the sentence set, or the keyword-regular expression method and the keyword-neural network-conditional random field method can be used simultaneously.
[0078] In this embodiment, by using the keyword-regular expression method and the keyword-neural network-conditional random field method, a keyword list is used to speed up the screening of sentences that require field extraction, and regular expressions and neural network-conditional random field models are used to accurately extract the target fields in the sentences, which helps to achieve the beneficial effect of efficiently and accurately automatically extracting information from the reward announcement.
[0079] In one embodiment, the preset field extraction method includes:
[0080] The keyword-regular expression method is used to extract fields that are regular and whose word count does not exceed the preset threshold, and the keyword-neural network-conditional random field method is used to extract fields that are irregular or whose word count exceeds the preset threshold.
[0081] Here, the rule may refer to a certain rule in character content or character arrangement.
[0082] Specifically, fields related to amount, phone number, case number, date, and court have certain regularities in character content and character arrangement, and can be used as regular fields. A preset threshold is set according to actual needs. Fields with regularity and a word count not exceeding the preset threshold are extracted using the keyword-regular expression method, and fields without regularity or a word count exceeding the preset threshold are extracted using the keyword-neural network-conditional random field method.
[0083] In this embodiment, by using the keyword-regular expression method and the keyword-neural network-conditional random field method at the same time, on the one hand, the keyword group is used to filter the sentences that need to be extracted, which reduces the amount of tasks and helps to improve the information extraction speed of the reward announcement; on the other hand, the keyword-regular expression method is used at the same time. The advantage of being fast when extracting simple fields and the keyword-neural network-conditional random field method is accurate when extracting complex fields. The method of this embodiment can achieve the beneficial effect of automatically extracting the information of the reward announcement efficiently and accurately.
[0084] In one embodiment, the announcement field and the party field are grouped according to the announcement-unique field in the announcement field to obtain an announcement information group set, which includes: traversing the announcement field, and when the same type of announcement-unique field begins to appear, determining the traversed announcement field that does not belong to the existing announcement information group as a new announcement information group.
[0085] Among them, traversal can refer to checking all the contents in a certain order. The same type can refer to the same type of field content, for example, different announcement dates, since they are all announcement dates, can be considered to be of the same type. An existing announcement information group can refer to an announcement information group that has ended grouping, that is, an announcement information group that has completed grouping.
[0086] Specifically, all the announcement fields are searched in a certain order. When the same type of announcement unique fields begin to appear, for example, when the reward announcement case number appears again, the announcement fields that have been searched and do not belong to the existing announcement information group are combined into a new announcement information group. Then continue to search the remaining announcement fields, and finally obtain multiple announcement information groups, which constitute an announcement information group set. It should be noted that for the same type of announcement unique fields, only the announcement unique fields that are searched first are placed in the new announcement information group, and the announcement unique fields that are searched later are placed in the announcement information group constructed later.
[0087] In this embodiment, by traversing the announcement field and grouping the announcement field and the party field according to the announcement unique field, it is possible to achieve the effect of not missing the announcement field and the party field when grouping, and reasonably grouping the announcement field and the party field, so that each announcement information group corresponds to a reward announcement.
[0088] In one embodiment, grouping the party fields to obtain a party information group set includes: traversing the party fields, and when the party fields of the same type begin to appear, determining the party fields that have been traversed and do not belong to the existing party information group as a new party information group.
[0089] The existing party information group may refer to a party information group that has already been grouped, that is, a party information group that has completed grouping.
[0090] Specifically, all the party fields are searched in a certain order, and when the party-unique fields of the same type begin to appear, for example, when the name of the bounty object appears again, the party fields that have been searched and do not belong to the existing party information group are combined into a party information group. Then continue to search the remaining party fields, and finally obtain multiple party information groups, and the multiple party information groups constitute a party information group set. It should be noted that, for the party-unique fields of the same type, only the party-unique fields that are searched first are placed in the new party information group, and the party-unique fields that are searched later are placed in the party information group constructed later. It should be noted that the announcement information group may include the party information group. One announcement information group may include one party information group, or may include multiple party information groups.
[0091] In this embodiment, by traversing the party fields and grouping the party fields according to the party's unique fields, it is possible to avoid missing the party fields when grouping and to reasonably group the party fields, so that each party information group corresponds to a bounty object.
[0092] In one embodiment, grouping the announcement field and the party field to obtain an announcement information group set includes:
[0093] When the case number of the sentence set is not unique, the announcement information groups in the announcement information group set are traversed, and the announcement information group being traversed is called the current announcement information group, and the traversed information group adjacent to the current information group is called the previous announcement information group; if the case number of the current announcement information group is consistent with the case number of the previous announcement information group or the current announcement information group has no case number, the current announcement information group is merged with the previous announcement information group.
[0094] Specifically, when the case number of the sentence set is not unique, that is, when the sentence set contains more than one reward announcement, the announcement information groups in the announcement information group set are traversed. The announcement information group being traversed is called the current announcement information group, and the traversed information group adjacent to the current information group is called the previous announcement information group. If the case number of the current announcement information group is consistent with the case number of the previous announcement information group or the current announcement information group has no case number, then the current announcement information group and the previous announcement information group are merged into one announcement information group. The merging into one announcement information group may include putting the announcement fields contained in the announcement information groups with the same case number into the same announcement information group, and deleting the duplicate announcement fields. When it is found that non-adjacent announcement information groups have the same case number, the non-adjacent announcement information groups may also be merged into one announcement information group.
[0095] In this embodiment, when the case number of the sentence set is not unique, the announcement information groups with the same case number are merged, and the announcement information group without a case number is added to the previous announcement information group. This can standardize the grouping of the announcement fields, so that all the announcement information groups in the announcement information group set have unique case numbers, thereby facilitating the query of reward information.
[0096] In one embodiment, after obtaining the party information group set, the method further includes:
[0097] According to the preset fields, the sentences corresponding to each of the announcement information groups in the sentence set are traversed to obtain a traversal result, and the preset fields include a preset field with the meaning of revoking the reward announcement; according to the traversal result, the announcement type of each of the announcement information groups is determined, and the announcement type includes a reward announcement type and a revocation reward announcement type.
[0098] The reward field included in the announcement information group is extracted from the sentences in the sentence set. The sentence involved in the extraction of the reward field in the announcement information group is the sentence corresponding to the announcement information group in the sentence set.
[0099] Specifically, the preset field includes a preset field with the meaning of revoking the reward announcement, for example, it may be "revoke the reward", "revoke the announcement", "revoke the reward". The preset field may be one field or multiple fields. According to the preset field, the sentences corresponding to each of the announcement information groups in the sentence set are traversed to obtain a traversal result. The traversal result may be that the corresponding sentence in the sentence set contains the preset field. The traversal result may also be that the corresponding sentence in the sentence set does not contain the preset field. When the traversal result is that the corresponding sentence in the sentence set contains the preset field, the announcement type of the announcement information group is determined to be a revocation reward announcement class. When the traversal result is that the corresponding sentence in the sentence set does not contain the preset field, the announcement type of the announcement information group is determined to be a reward announcement class.
[0100] In this embodiment, by traversing the reward field in the announcement information group according to the preset field and determining the announcement type of the announcement information group, the purpose of conveniently querying the announcement type of the announcement information group can be achieved.
[0101] In one embodiment, traversing each of the announcement information groups according to the preset fields includes:
[0102] Record the reward field and the sentence index corresponding to the reward field; and traverse the corresponding sentences in the sentence set according to the sentence index.
[0103] The sentence index may refer to the index of the sentence used to extract the reward field in the sentence set.
[0104] Specifically, the sentences in the sentence set all have indexes representing position information in the sentence set. Record the reward field and the sentence index corresponding to the reward field. Traverse the corresponding sentences in the sentence set according to the sentence index. Find the sentence index corresponding to the reward field that appears first (recorded as the initial index) and the sentence index corresponding to the reward field that appears last (recorded as the ending index) in all the reward fields contained in each announcement information group. Establish an index interval based on the initial index and the ending index. Traverse the sentences in the sentence set that are indexed within the index interval.
[0105] In this embodiment, by establishing a sentence index corresponding to the sentences in the sentence set, and establishing an index interval based on the index, and traversing the sentences according to the index interval, it is possible to quickly determine the target sentence (i.e., the sentence corresponding to the announcement information group in the sentence set), quickly complete the traversal and determine the announcement type.
[0106] In one embodiment, grouping the announcement field and the party field to obtain an announcement information group set includes:
[0107] When the case number possessed by the sentence set is unique, the announcement fields of all announcement information groups are aggregated.
[0108] Specifically, when the case number possessed by the sentence set is unique, the announcement fields of all announcement information groups are aggregated.
[0109] In this embodiment, by aggregating the announcement fields of all announcement information groups when the sentence set has a unique case number, it is possible to simplify the grouping of the announcement fields, thereby achieving the purpose of facilitating the query of the announcement fields.
[0110] In one embodiment, Figure 3As shown, a more detailed embodiment of the information extraction method of the reward announcement is provided. The "Y" in the figure means "yes", and the "N" means "no", which corresponds to the "yes" in the judgment box of the block diagram. The reward announcement data is obtained by a crawler. The character " / " is used to separate the reward announcement data to obtain a sentence set, and the sentence set includes the sentences obtained by the separation of the reward announcement data. The sentences in the sentence set are filtered using a keyword list, and when a sentence in the sentence set contains a keyword in the keyword list, the sentence is determined as a sentence that needs to be extracted from the field. It is determined whether the corresponding field is a regular field based on the keyword, and whether the corresponding field is a field whose number of words does not exceed the preset threshold based on the number of words in the field (it is also possible to define in advance whether the corresponding relationship between the keyword and the field is regular and the number of words does not exceed the preset threshold. For example, the field corresponding to the keyword "name" can be defined as a field that is regular and the number of words does not exceed the preset threshold). The keyword-regular expression method is used to extract fields that are regular and whose word count does not exceed the preset threshold, and the keyword-neural network-conditional random field method is used to extract fields that are irregular or whose word count exceeds the preset threshold. The extracted fields are called reward fields, and the reward fields include announcement fields and party fields. When the sentences in the sentence set have not been traversed, the traversal continues until the traversal is completed. Traverse the extracted reward fields to determine whether the announcement information group needs to be grouped. It should be noted that "traversing the extracted announcement fields to determine whether the announcement information group needs to be grouped" means processing one announcement field each time, and determining whether the announcement information group needs to be grouped each time. Specifically, when traversing the reward field, if the same type of the announcement unique field begins to appear, the grouping of the current announcement information group is terminated, a new announcement information group is constructed, and the current field is stored in the new announcement information group; otherwise, there is no need to establish a new announcement information group, and the current field is placed in the current announcement information group (the current announcement information group may refer to the announcement information group that has not yet ended the grouping. When a new announcement information group is established, it can be considered that the original announcement information group has ended the grouping). When the current field is a party field, if the same type of party unique field begins to appear, the grouping of the current party information group is terminated, a new party information group is established, and the current field is stored in the new party information group; otherwise, there is no need to establish a new party information group, and the current field is added to the current party information group (the current party information group may refer to the party information group that has not yet ended the grouping. When a new party information group is established, it can be considered that the original party information group has ended the grouping). The announcement unique field includes an announcement field that has a one-to-one correspondence with the reward announcement. The party unique field includes a party field that has a one-to-one correspondence with the reward object. It should be noted that the announcement information group may include the corresponding party information group.Check whether the announcement information groups can be merged, and if the announcement unique fields of different announcement information groups are the same, merge the different announcement information groups. Check whether the party information groups can be merged, and if the party unique fields of different party information groups are the same, merge the different party information groups.
[0111] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0112] Based on the same inventive concept, the disclosed embodiment also provides a device for extracting information from a reward announcement for implementing the above-mentioned method for extracting information from a reward announcement. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of the device for extracting information from one or more reward announcements provided below can be found in the above-mentioned limitations on the method for extracting information from a reward announcement, and will not be repeated here.
[0113] In one embodiment, Figure 4 As shown, a device for extracting information from a reward announcement is provided, comprising: a data acquisition module 402, a sentence separation module 404, a field extraction module 406, an announcement information group module 408 and a party information group module 410, wherein:
[0114] The data acquisition module 402 is used to acquire reward announcement data.
[0115] The sentence separation module 404 is used to separate the reward announcement data using a preset text separation method to obtain a sentence set, and the sentence set includes the sentences obtained by separating the reward announcement data.
[0116] The field extraction module 406 is used to extract fields in the sentence set using a preset field extraction method to obtain a reward field, and the reward field includes an announcement field and a party field.
[0117] The announcement information group module 408 is used to group the announcement field and the party field according to the announcement unique field in the announcement field to obtain an announcement information group set, wherein the announcement unique field includes an announcement field that has a one-to-one correspondence with the reward announcement.
[0118] The party information group module 410 is used to group the party fields according to the party-specific fields in the party fields to obtain a party information group set, wherein the party-specific fields include party fields that have a one-to-one correspondence with the bounty objects.
[0119] In one embodiment, the preset field extraction method used by the field extraction module 406 includes a keyword-regular expression method and a keyword-neural network-conditional random field method.
[0120] In one embodiment, the preset field extraction method used by the field extraction module 406 includes:
[0121] The keyword-regular expression method is used to extract fields that are regular and whose word count does not exceed the preset threshold, and the keyword-neural network-conditional random field method is used to extract fields that are irregular or whose word count exceeds the preset threshold.
[0122] In one embodiment, the announcement information group module 408 is used to traverse the announcement fields, and when the same type of announcement unique fields begin to appear, the traversed announcement fields and the party fields that do not belong to the existing announcement information group are determined as a new announcement information group.
[0123] In one embodiment, the party information group module 410 is used to traverse the party fields, and when the party fields of the same type begin to appear, the party fields that have been traversed and do not belong to the existing party information group are determined as a new party information group.
[0124] In one embodiment, the announcement information group module 408 is used to traverse the announcement information groups in the announcement information group set when the case number of the sentence set is not unique. The announcement information group being traversed is called the current announcement information group, and the traversed information group adjacent to the current information group is called the previous announcement information group; if the case number of the current announcement information group is consistent with the case number of the previous announcement information group or the current announcement information group has no case number, the current announcement information group is merged with the previous announcement information group.
[0125] In one embodiment, Figure 5As shown, the information extraction module of the bounty announcement also includes a bounty type module 412, and the bounty type module 412 is used to traverse the sentences corresponding to each of the announcement information groups in the sentence set according to a preset field to obtain a traversal result, and the preset field includes a preset field with the meaning of revoking the bounty announcement; according to the traversal result, the announcement type of each of the announcement information groups is determined, and the announcement type includes a bounty announcement type and a revoked bounty announcement type.
[0126] In one embodiment, the reward type module 412 is used to record the reward field and the sentence index corresponding to the reward field; and traverse the corresponding sentences in the sentence set according to the sentence index.
[0127] In one embodiment, the announcement information group module 408 is further used to aggregate the announcement fields and the party fields of all announcement information groups when the case number of the sentence set is unique.
[0128] Each module in the above-mentioned information extraction device for reward announcement can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above modules.
[0129] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store reward announcement data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for extracting information from a reward announcement is implemented.
[0130] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0131] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0132] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0133] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure 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, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A method for extracting information from a reward announcement, characterized in that: The method comprises: Get reward announcement data; Separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data; Extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field; According to the announcement-specific field in the announcement field, the announcement field and the party field are grouped to obtain an announcement information group set, which includes: traversing the announcement field, and when the announcement-specific field of the same type begins to appear, the traversed announcement field and the party field that do not belong to the existing announcement information group are determined as a new announcement information group, and the announcement-specific field includes the announcement field that has a one-to-one correspondence with the reward announcement; According to the party-unique fields in the party fields, the party fields are grouped to obtain a party information group set, which includes: traversing the party fields, and when the party-unique fields of the same type begin to appear, determining the party fields that have been traversed and do not belong to the existing party information group as a new party information group, and the party-unique fields include party fields that have a one-to-one correspondence with the bounty object.
2. The method according to claim 1, characterized in that The preset field extraction method includes a keyword-regular expression method and a keyword-neural network-conditional random field method.
3. The method according to claim 2, characterized in that The preset field extraction method comprises: The keyword-regular expression method is used to extract fields that are regular and whose word count does not exceed the preset threshold, and the keyword-neural network-conditional random field method is used to extract fields that are irregular or whose word count exceeds the preset threshold.
4. The method according to claim 1, characterized in that: The traversing of the announcement fields, when the announcement unique fields of the same type begin to appear, determining the traversed announcement fields and the party fields that do not belong to the existing announcement information group as a new announcement information group, includes: When the case number of the sentence set is not unique, the announcement information groups in the announcement information group set are traversed, the announcement information group being traversed is called the current announcement information group, and the traversed information group adjacent to the current announcement information group is called the previous announcement information group; If the case number of the current announcement information group is consistent with the case number of the previous announcement information group or the current announcement information group has no case number, the current announcement information group is merged with the previous announcement information group.
5. The method according to claim 1, characterized in that After obtaining the party information group set, the method further includes: According to preset fields, sentences corresponding to each of the announcement information groups in the sentence set are traversed to obtain traversal results, wherein the preset fields include preset fields with the meaning of revoking the reward announcement; According to the traversal result, the announcement type of each of the announcement information groups is determined, and the announcement type includes a bounty announcement type and a bounty cancellation announcement type.
6. The method according to claim 5, characterized in that The traversing each of the announcement information groups according to the preset fields comprises: Record the reward field and the sentence index corresponding to the reward field; The corresponding sentences in the sentence set are traversed according to the sentence index.
7. The method according to claim 1, characterized in that The traversal of the party fields, when the party-unique fields of the same type begin to appear, determines the party fields that have been traversed and do not belong to the existing party information group as a new party information group, including: when the case number possessed by the sentence set is unique, aggregating the announcement fields and the party fields of all announcement information groups.
8. A device for extracting information from a reward announcement, characterized in that: The device comprises: Data acquisition module, used to obtain reward announcement data; A sentence separation module, used to separate the reward announcement data using a preset text separation method to obtain a sentence set, wherein the sentence set includes the sentences obtained by separating the reward announcement data; A field extraction module, used to extract fields from the sentence set using a preset field extraction method to obtain a reward field, wherein the reward field includes an announcement field and a party field; The announcement information group module is used to group the announcement field and the party field according to the announcement unique field in the announcement field to obtain an announcement information group set, which includes: traversing the announcement field, when the announcement unique field of the same type begins to appear, determining the traversed announcement field and the party field that do not belong to the existing announcement information group as a new announcement information group, and the announcement unique field includes the announcement field that has a one-to-one correspondence with the reward announcement; The party information group module is used to group the party fields according to the party-specific fields in the party fields to obtain a party information group set, which includes: traversing the party fields, and when the party-specific fields of the same type begin to appear, determining the party fields that have been traversed and do not belong to the existing party information group as a new party information group, and the party-specific fields include party fields that have a one-to-one correspondence with the bounty object.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Listed-company announcement classification and abstract generation method based on deep learning
CN107403375A
Element extraction method and device, electronic equipment and storage medium
CN111597803A