CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese Patent Application No. 201810998037.6 filed Aug. 29, 2018, the disclosure of which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of data processing technologies, specifically to a method and apparatus for updating information.

BACKGROUND

With the improvement of the degree of informatization, a large amount of data has been accumulated in many fields, and web fictions belong to one of the fields. Generally, contents of a web fiction may be published on the Internet at different times in the chronological order of the contents of the fiction. A user may acquire the latest published content of the web fiction through the Internet.

SUMMARY

Embodiments of the present disclosure provide a method and apparatus for updating information.

In a first aspect, the embodiments of the present disclosure provide a method for updating information, including: acquiring at least one subject name entry from to-be-processed information; matching, for a subject name entry in the at least one subject name entry, the subject name entry with pre-acquired at least one initial information source subject name entry, and setting a weight for the matched subject name entry based on a matching result, the initial information source subject name entry and the to-be-processed information corresponding to the same information source, and the weight being used to represent a probability that a subject corresponding to the matched subject name entry is an information source subject of the information source; and sorting the subject name entry in the at least one subject name entry and an initial information source subject name entry in the at least one initial information source subject name entry according to the weight to obtain updated at least one initial information source subject name entry.

In some embodiments, the acquiring at least one subject name entry from to-be-processed information, includes: querying a grammatical relationship of a sentence in the to-be-processed information; correcting the sentence contained in the to-be-processed information according to the grammatical relationship to obtain updated to-be-processed information; and performing information extraction on the updated to-be-processed information to obtain the at least one subject name entry.

In some embodiments, the correcting the sentence contained in the to-be-processed information according to the grammatical relationship to obtain updated to-be-processed information, includes: querying at least one to-be-processed sentence in the to-be-processed information, where the to-be-processed sentence is a sentence lacking a subject name entry; and adding, for a to-be-processed sentence in the at least one to-be-processed sentence, a subject name entry to the to-be-processed sentence according to the grammatical relationship corresponding to the to-be-processed sentence to obtain corrected updated to-be-processed information.

In some embodiments, the adding a subject name entry to the to-be-processed sentence according to the grammatical relationship corresponding to the to-be-processed sentence, includes: adding a corresponding subject name entry to the to-be-processed sentence according to the grammatical relationship.

In some embodiments, the to-be-processed sentence includes a subject name pronoun, and the adding a subject name entry to the to-be-processed sentence according to a grammatical relationship corresponding to the to-be-processed sentence, includes: replacing the subject name pronoun in the to-be-processed sentence with a corresponding subject name entry according to the grammatical relationship.

In some embodiments, the initial information source subject name entry is acquired by steps as follows: acquiring at least one initial subject name entry from acquired to-be-processed summary information; determining, for an initial subject name entry in the at least one initial subject name entry, the number of identical entries of the initial subject name entry in the to-be-processed summary information, and setting an initial weight for the initial subject name entry according to the number; and determining the at least one initial information source subject name entry from the at least one initial subject name entry according to the initial weight.

In a second aspect, the embodiments of the present disclosure provide an apparatus for updating information, including: a subject name entry acquisition unit, configured to acquire at least one subject name entry from to-be-processed information; a weight setting unit, configured to match, for a subject name entry in the at least one subject name entry, the subject name entry with pre-acquired at least one initial information source subject name entry, and set a weight for the matched subject name entry based on a matching result, the initial information source subject name entry and the to-be-processed information corresponding to the same information source, and the weight being used to represent a probability that a subject corresponding to the matched subject name entry is an information source subject of the information source; and an information updating unit, configured to sort the subject name entry in the at least one subject name entry and an initial information source subject name entry in the at least one initial information source subject name entry according to the weight to obtain updated at least one initial information source subject name entry.

In some embodiments, the subject name entry acquisition unit includes: a grammatical relationship querying subunit, configured to query a grammatical relationship of a sentence in the to-be-processed information; an updated to-be-processed information acquisition subunit, configured to correct the sentence contained in the to-be-processed information according to the grammatical relationship to obtain updated to-be-processed information; and a subject name entry extraction subunit, configured to perform information extraction on the updated to-be-processed information to obtain the at least one subject name entry.

In some embodiments, the updated to-be-processed information acquisition subunit includes: a to-be-processed sentence querying module, configured to query at least one to-be-processed sentence in the to-be-processed information, where the to-be-processed sentence is a sentence lacking a subject name entry; and an updated to-be-processed information acquisition module, configured to add, for a to-be-processed sentence in the at least one to-be-processed sentence, a subject name entry to the to-be-processed sentence according to the grammatical relationship corresponding to the to-be-processed sentence to obtain corrected updated to-be-processed information.

In some embodiments, the updated to-be-processed information acquisition module includes: an information adding submodule, configured to add a corresponding subject name entry to the to-be-processed sentence according to the grammatical relationship.

In some embodiments, the to-be-processed sentence includes a subject name pronoun, and the updated to-be-processed information acquisition module includes: an information replacing submodule, configured to replace the subject name pronoun in the to-be-processed sentence with a corresponding subject name entry according to the grammatical relationship.

In some embodiments, the apparatus includes an initial information source subject name entry acquisition unit, configured to acquire the initial information source subject name entry, and the initial information source subject name entry acquisition unit includes: an initial subject name entry acquisition subunit, configured to acquire at least one initial subject name entry from acquired to-be-processed summary information; an initial weight setting subunit, configured to determine, for an initial subject name entry in the at least one initial subject name entry, the number of identical entries of the initial subject name entry in the to-be-processed summary information, and set an initial weight for the initial subject name entry according to the number; and an initial information source subject name entry determining subunit, configured to determine the at least one initial information source subject name entry from the at least one initial subject name entry according to the initial weight.

In a third aspect, the embodiments of the present disclosure provide a server, including: one or more processors; and a storage apparatus, storing one or more programs thereon, the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for updating information in the first aspect.

In a fourth aspect, the embodiments of the present disclosure provide a computer readable medium, storing a computer program thereon, the program, when executed by a processor, implements the method for updating information in the first aspect.

The method and apparatus for updating information provided by the embodiments of the present disclosure, first acquire at least one subject name entry from to-be-processed information, then match the subject name entry with pre-acquired at least one initial information source subject name entry, and set a weight for the subject name entry based on a matching result, and finally sort the entries according to the weight to obtain updated at least one initial information source subject name entry, thereby improving the accuracy and efficiency of acquiring information by a user.

