Information processing method and device

The method and device enhance the efficiency and automation of entity relationship extraction by using a table lookup method and LTP tools to filter dependencies, addressing the limitations of neural networks in speed and labor costs.

CN112613311BActive Publication Date: 2024-12-06BEIJING SINOVOICE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110020624.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-07
Publication Date
2024-12-06
Estimated Expiration
2041-01-07

AI Technical Summary

Technical Problem

Existing neural network models for extracting dependency relationships between entities in text are slow due to matrix operations and require manual entity identification and training data labeling, leading to high labor costs and low automation.

Method used

A method and device that segments text, identifies parts of speech, performs dependency syntactic analysis, filters dependencies using preset rules, and outputs only conforming relationships, utilizing a table lookup method and LTP tools to avoid neural networks, thus reducing manual intervention and labor costs.

Benefits of technology

Improves efficiency in obtaining dependency relationships and reduces labor costs by automating the process without neural networks, enabling faster and more automated entity relationship extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112613311B_ABST
    Figure CN112613311B_ABST
Patent Text Reader

Abstract

The present application shows an information processing method and device. Segment a text to obtain multiple words included in the text. Obtain the part of speech of each word. Perform dependency syntactic analysis on the multiple words included in the text according to the part of speech of each word to obtain multiple different dependency relationships. Each dependency relationship includes a dependency relationship between at least two words in the text. Each dependency relationship includes a dependency relationship between at least two entities in the text. Among the multiple different dependency relationships, filter the dependency relationships of a preset type. Determine whether there are dependency relationships that do not meet the preset part of speech rules in the dependency relationships of the preset type. In the case that there are dependency relationships that do not meet the preset part of speech rules, eliminate the dependency relationships that do not meet the preset part of speech rules in the dependency relationships of the preset type. Output the remaining dependency relationships of the preset type. The present application can improve the efficiency of obtaining dependency relationships between words in a text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an information processing method and device. Background Art

[0002] With the development of the Internet and big data technology, the number of users is increasing, and the Internet is full of various information. Most of the information exists in the form of unstructured text described in natural language, and the boundaries of the fields to which the content belongs are becoming increasingly blurred. Some information with important meanings and values ​​is explicitly or implicitly scattered in a large amount of text. Among them, the dependency relationship between entities in these texts is a very valuable information. For example, the relationship between characters and objects in the text.

[0003] In order to help people quickly perform text analysis on massive amounts of text and then quickly build knowledge graphs of these texts, the dependencies between entities can be automatically extracted from massive amounts of text.

[0004] In one method, the neural network model can be trained in advance, and then the neural network model can be put online for use. During use, text can be input into the neural network model. Secondly, it is necessary to manually identify the most important entities in the text and input the most important entities in the text into the neural network model at the same time, so that the neural network model can process the text and the most important entities in the text, obtain the dependency relationships between different entities in the text, and output the dependency relationships between different entities.

[0005] However, the inventors have found through statistics that the neural network model involves a large number of matrix operations, which results in a slow speed in acquiring the dependency relationships between different entities in the text based on the neural network model.

[0006] In addition, it is necessary to manually identify the most important entities in the text first, which has a low degree of automation and high labor costs.

[0007] Secondly, training a neural network model requires manual collection of a large amount of training data and labeling of the training data, which results in a large amount of manual work and high labor costs. Summary of the invention

[0008] The present application shows an information processing method and device.

[0009] In a first aspect, the present application provides an information processing method, the method comprising:

[0010] Segmenting the text to obtain a plurality of words included in the text;

[0011] Get the part of speech of each word;

[0012] Performing dependency syntactic analysis on a plurality of words included in the text according to the part of speech of each word to obtain a plurality of different dependency relations; each dependency relation includes a dependency relation between at least two words in the text;

[0013] Filter the dependencies of preset types among multiple different dependencies;

[0014] Determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule among the dependency relationships of the preset type;

[0015] In the case where there are dependency relationships that do not conform to the preset part-of-speech rules, the dependency relationships that do not conform to the preset part-of-speech rules are removed from the dependency relationships of the preset type;

[0016] Outputs the remaining dependencies of the preset type.

[0017] In an optional implementation, the method further includes:

[0018] Obtaining a type identifier of a type of each dependency relationship among the multiple different dependency relationships;

[0019] The step of screening a preset type of dependency relationship from among the multiple different dependency relationships includes:

[0020] Searching for the type identifier of the preset type in the type identifiers of each dependency type;

[0021] A dependency relationship corresponding to the found type identifier is selected from a plurality of different dependency relationships.

[0022] In an optional implementation, determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule in the dependency relationship of the preset type includes:

[0023] For any one of the preset types of dependency relationships, determining whether the part of speech of a word in the preset type of dependency relationship is the first part of speech;

[0024] When the part of speech of the vocabulary in the preset type of dependency relationship is not the first part of speech, the preset type of dependency relationship is determined as a dependency relationship that does not comply with the part of speech rule.

[0025] In an optional implementation, determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule in the dependency relationship of the preset type includes:

[0026] For any one of the preset types of dependency relationships, determining whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech;

[0027] In the case of a vocabulary including parts of speech other than the first part of speech and the second part of speech, the dependency relationship of the preset type is determined as a dependency relationship that does not comply with the part of speech rule.

[0028] In a second aspect, the present application provides an information processing device, the device comprising:

[0029] A word segmentation module, used for segmenting a text to obtain a plurality of words included in the text;

[0030] The first acquisition module is used to acquire the part of speech of each word;

[0031] An analysis module, configured to perform dependency syntactic analysis on a plurality of words included in the text according to the part of speech of each word, to obtain a plurality of different dependency relations; each dependency relation includes a dependency relation between at least two words in the text;

[0032] A screening module, used for screening a preset type of dependency among a plurality of different dependency relationships;

[0033] A determination module, used to determine whether there is a dependency relationship that does not conform to a preset part-of-speech rule among the dependency relationships of the preset type;

[0034] A removal module, configured to remove the dependency relationships that do not conform to the preset part-of-speech rules from the dependency relationships of the preset type when there are dependency relationships that do not conform to the preset part-of-speech rules;

[0035] The output module is used to output the remaining dependencies of the preset type.

[0036] In an optional implementation, the device further includes:

[0037] A second acquisition module, configured to acquire a type identifier of a type of each dependency relationship among the multiple different dependency relationships;

[0038] The screening module comprises:

[0039] A searching unit, configured to search for a type identifier of the preset type in the type identifiers of each type of dependency relationship;

[0040] The selection unit is used to select a dependency relationship corresponding to the found type identifier from a plurality of different dependency relationships.

[0041] In an optional implementation, the determining module includes:

[0042] A first determination unit, configured to determine, for any one of the preset types of dependency relationships, whether the part of speech of a word in the preset type of dependency relationship is a first part of speech;

[0043] The second determining unit is configured to determine the dependency relationship of the preset type as a dependency relationship that does not comply with the part-of-speech rule when the part-of-speech of the vocabulary in the dependency relationship of the preset type is not the first part-of-speech.

[0044] In an optional implementation, the determining module includes:

[0045] A third determining unit is used to determine, for any one of the preset types of dependency relationships, whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech;

[0046] The fourth determining unit is used to determine the preset type of dependency relationship as a dependency relationship that does not comply with the part-of-speech rule when the vocabulary includes words of parts of speech other than the first part of speech and the second part of speech.

[0047] In a third aspect, the present application shows an electronic device, the electronic device comprising:

[0048] processor;

[0049] a memory for storing processor-executable instructions;

[0050] Wherein, the processor is configured to execute the information processing method as described in the first aspect.

[0051] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the information processing method as described in the first aspect.

[0052] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the information processing method as described in the first aspect.

[0053] The technical solution provided by this application may have the following beneficial effects:

[0054] In the present application, a text is segmented to obtain a plurality of words included in the text; the part of speech of each word is obtained; dependency syntactic analysis is performed on the plurality of words included in the text according to the part of speech of each word to obtain a plurality of different dependency relationships; each dependency relationship includes a dependency relationship between at least two words in the text; among the plurality of different dependency relationships, dependency relationships of a preset type are screened; among the dependency relationships of the preset type, it is determined whether there are dependency relationships that do not conform to the preset part of speech rules; in the case of dependency relationships that do not conform to the preset part of speech rules, the dependency relationships that do not conform to the preset part of speech rules are eliminated from the dependency relationships of the preset type; and the remaining dependency relationships of the preset type are output.

[0055] In the present application, the process of text segmentation, obtaining the part of speech of words, and performing dependency syntactic analysis on words can use a table lookup method, or the dependency relationship between entities in the text can be obtained based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer. This does not involve a large number of matrix operations of the neural network model, and after many experiments, it can be concluded that the speed of obtaining the dependency relationship between words in the text by using a table lookup method or based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer is faster than the speed of obtaining the dependency relationship between different words in the text based on the neural network model. Therefore, compared with the prior art, the present application can improve the efficiency of obtaining the dependency relationship between words in the text.

[0056] In addition, the present application can also support users to set preset types in advance, so that the electronic device can automatically filter the dependency relationships of the type required by the user from the dependency relationships between words in the acquired text, for example, obtaining the dependency relationships between entities in the text, etc.

[0057] Secondly, since the neural network model does not need to be used, it is not necessary to train the neural network model, so there is no need to collect a large amount of training data and there is no need to label the training data, which can reduce the manual workload and thus reduce labor costs.

[0058] Secondly, the present application supports the identification of the most important entities in the text without manual intervention, and the identification of dependency relationships between words in the text without manual intervention. Compared with the existing technology, the degree of automation can be improved and the labor cost can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flowchart of the steps of an information processing method of the present application;

[0060] Figure 2 It is a structural block diagram of an information processing device of the present application;

[0061] Figure 3 is a block diagram of an electronic device shown in the present application;

[0062] Figure 4 It is a block diagram of an electronic device shown in the present application. DETAILED DESCRIPTION

[0063] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0064] Reference Figure 1, shows a flowchart of the steps of an information processing method of the present application, which may specifically include the following steps:

[0065] In step S101, the text is segmented to obtain a plurality of words included in the text.

[0066] In one embodiment of the present application, the specific word segmentation technology can adopt the existing word segmentation technology on the market, which will not be described in detail here. For example, technology such as word2vec word vector can be used.

[0067] Alternatively, a table lookup method may be used, for example, a dictionary may be created in advance based on existing vocabulary. In this way, adjacent words may be combined in pairs in the text to obtain candidate words consisting of two adjacent words, and adjacent words may be combined in pairs of three to obtain candidate words consisting of three adjacent words, and adjacent words may be combined in pairs of four to obtain candidate words consisting of four adjacent words, etc. Then, for any candidate word, it is possible to check whether the candidate word exists in the dictionary. If the candidate word exists in the dictionary, the candidate word is used as a word in the text. For each of the other candidate words, the above operation is performed in the same manner, thereby obtaining multiple words included in the text.

[0068] In step S102, the part of speech of each word is obtained.

[0069] In one example, the part of speech of each word may be obtained based on an LTP part-of-speech tagging tool.

[0070] The LTP part-of-speech tagging tool includes the part-of-speech tagging tool in the Language Technology Platform. The LTP part-of-speech tagging tool can use the 863 part-of-speech tagging set to perform part-of-speech tagging on each word to obtain the part-of-speech of each word.

[0071] Or, in another example, for any existing word, the part of speech of the word can be set, and then the word and the part of speech of the word are composed of corresponding table items and stored in the correspondence between the word and the part of speech. The same is true for each other existing word.

[0072] Therefore, in this step, the part of speech corresponding to each word in the text can be searched in the correspondence between words and parts of speech.

[0073] In step S103, dependency syntactic analysis is performed on multiple words included in the text according to the part of speech of each word to obtain multiple different dependency relations. Each dependency relationship includes a dependency relationship between at least two words in the text.

[0074] Syntactic parsing is the process of analyzing a text to obtain its syntactic structure.

[0075] In the process of syntactic analysis, the predicate (verb) in the text can be used as the key point of the text for analysis to determine the direct or indirect relationship between other words in the text and the predicate (verb). For example, the entity that may form a relationship can be determined through the predicate (verb), and the agent and the patient between the entity can be determined based on the predicate (verb).

[0076] Dependency can reflect the relationship of dominance and being dominated between words in a text. This relationship may not be equal, but has a direction. The word in a dominant position is called a governor (governor, regent, head), while the word in a dominated position is called a modifier (subordinate, dependency).

[0077] In this application, there are many types of dependency relationships, including: subject-predicate relationship, verb-object relationship, intermezzo-object relationship, preposed object, auxiliary modifier, attributive-predicate relationship, adverbial-predicate structure, verb-complement structure, parallel relationship, preposition-object relationship, left-attachment relationship, right-attachment relationship, independent structure and core relationship, etc.

[0078] For any type of dependency relationship, the parts of speech of the words that the dependency relationship can cover and the position order relationship of the words in the text can be counted in advance. In this way, the type identifier of the type of the dependency relationship and the "parts of speech of the words covered by the dependency relationship and the position order relationship of the words in the text" can be composed of corresponding table items and stored in the correspondence between the type identifier and the "part of speech + position order relationship". The same is true for every other type of dependency relationship. Different types of dependency relationships have different type identifiers.

[0079] Thus, in this step, for any type of dependency relationship, the "part of speech + position order relationship" corresponding to the type identifier of the dependency relationship can be searched in the correspondence between the type identifier and the "part of speech + position order relationship", and then the text can be searched to see whether there are words and the position order relationship of the words that meet the found "part of speech + position order relationship". If there are words and the position order relationship of the words that meet the found "part of speech + position order relationship", a dependency relationship of this type is determined in the text based on the found words and the position order relationship of the words. The same is true for each other type of dependency relationship.

[0080] For example, in one instance, assume the text includes "red apple", which contains the words "red" and "apple". Here, "apple" is a noun and "red" is an adjective. The adjective "red" is placed before and adjacent to the noun "apple". Thus, the noun "apple" is subordinate to the adjective "red", forming a modifier-head relationship.

[0081] In another example, assume the text includes "very beautiful", which contains the words "very" and "beautiful". Here, "very" is an adverb and "beautiful" is an adjective. The adverb "very" is placed before and adjacent to the adjective "beautiful". Thus, the adjective "beautiful" is subordinate to the adverb "very", forming an adverbial-head relationship.

[0082] In yet another example, assume the text includes "beautiful dress", which contains the words "beautiful", "de" (a particle in Chinese), and "dress". Here, "beautiful" is an adjective, "de" is a particle, and "dress" is a noun. The adjective "beautiful" is placed before the noun "dress" with the particle "de" in between. Thus, the noun "dress" is subordinate to the adjective "beautiful", forming a modifier-head relationship.

[0083] In one example, assume the text is "Wang Sicong's father is Wang Jianlin".

[0084] After subjecting this text to the processes of word segmentation, part-of-speech tagging, and syntactic analysis from step S101 to step S103, it can be determined that the central predicate of the text is "is".

[0085] The relationship between "Wang Sicong" and "de" is a right-adjunct relationship. The relationship between "Wang Sicong" and "father" is a modifier-head relationship. The relationship between "father" and "is" is a subject-predicate relationship. The relationship between "is" and "Wang Jianlin" is a verb-object relationship.

[0086] From this, it can be judged that the relationship between "father" and "Wang Jianlin" is "is".

[0087] In addition, in the sentence, "Wang Sicong" and "father" form a premodifier relationship.

[0088] Thus, the resulting dependency relationships can include: "Wang Sicong's father, is, Wang Jianlin", "Wang Sicong, father, Wang Jianlin".

[0089] In one example, assume the text is "The altitude of Mount Qomolangma is 8,848 meters".

[0090] After subjecting this text to the processes of word segmentation, part-of-speech tagging, and syntactic analysis from step S101 to step S013, it can be determined that the central predicate of the text is "is".

[0091] The relationship between "Mount Everest" and "altitude" is a subject-predicate relationship, the relationship between "altitude" and "is" is a subject-predicate relationship, the relationship between "is" and "meters" is a verb-object relationship, and the relationship between "8848" and "meters" is a subject-predicate relationship.

[0092] From this we can judge that the relationship between "altitude" and "meters" is "yes".

[0093] Considering that "8848" is a numeral and cannot be an entity or relationship alone, the resulting dependency relationships may include: "The altitude of Mount Everest is 8848 meters" and "The altitude of Mount Everest is 8848 meters".

[0094] In step S104, a preset type of dependency relationship is screened from a plurality of different dependency relationships.

[0095] In the present application, the type identifier of the type of each dependency relationship in a plurality of different dependency relationships can be obtained according to the LTP syntactic analyzer. For example, after the LTP syntactic analyzer performs dependency syntactic analysis on a plurality of words included in the text, in addition to outputting a plurality of different dependency relationships, it also outputs the type identifier of the type of each dependency relationship outputted. Of course, the type identifier of the type of each dependency relationship in a plurality of different dependency relationships can also be obtained by other means, which is not limited in the present application.

[0096] Among them, the types of dependency relations may include: subject-predicate relationship, verb-object relationship, intermezzo-object relationship, preposed object, auxiliary modifier, attributive-predicate relationship, adverbial-predicate structure, verb-complement structure, parallel relationship, preposition-object relationship, left-attachment relationship, right-attachment relationship, independent structure and core relationship, etc.

[0097] The type identifier of the subject-predicate relationship can be "SBV", the type identifier of the verb-object relationship can be "VOB", the type identifier of the intermezzo-object relationship can be "IOB", the type identifier of the preposed object can be "FOB", the type identifier of the auxiliary modifier can be "double", the type identifier of the attributive-predicate relationship can be "ATT", the type identifier of the adverbial-predicate structure can be "ADV", the type identifier of the verb-complement structure can be "CMP", the type identifier of the parallel relationship can be "CPP", the type identifier of the preposition-object relationship can be "POB", the type identifier of the left-attached relationship can be "LAD", the type identifier of the right-attached relationship can be "RAD", the type identifier of the independent structure can be "IS", and the type identifier of the core relationship can be "HED", etc.

[0098] In this way, when filtering a preset type of dependency among multiple different dependency relationships, the type identifier of the preset type is searched for in the type identifier of each dependency type output by the LTP syntax analyzer, and then the dependency relationship corresponding to the found type identifier is selected from the multiple different dependency relationships output by the LTP syntax analyzer.

[0099] In this application, the preset type can be set according to actual needs, and this application does not limit the specific preset type.

[0100] In one example, the preset type of dependency relationship may include a subject-predicate relationship, a verb-object relationship, a verb-complement structure, and a preposition-object relationship, etc. In one example, it may include a subject-predicate-verb-complement relationship containing a preposition-object relationship, etc.

[0101] In step S105, it is determined whether there is a dependency relationship that does not conform to a preset part-of-speech rule among the preset types of dependency relationships.

[0102] In one embodiment of the present application, in this step, for any preset type of dependency relationship, it can be determined whether the part of speech of the vocabulary in the preset type of dependency relationship is the first part of speech. In the case that the part of speech of the vocabulary in the preset type of dependency relationship is not the first part of speech, the preset type of dependency relationship is determined as a dependency relationship that does not comply with the part of speech rule. The above operation is also performed for each other preset type of dependency relationship.

[0103] The first part of speech includes nouns, etc., and may also include noun phrases, etc., for example, "train station square" or "underground passage", etc.

[0104] In this application, the part of speech of an entity is often a noun or a noun phrase, etc., and adjectives, verbs, conjunctions, etc. usually cannot be used as entities alone. Therefore, whether the dependency relationship conforms to the part of speech rule can be determined by determining whether the part of speech of the vocabulary in the preset type of dependency relationship is the first part of speech.

[0105] If a dependency relationship output by the LTP syntactic analyzer does not conform to a part-of-speech rule, it means that the dependency relationship output by the LTP syntactic analyzer is wrong, and the dependency relationship can be discarded.

[0106] In one embodiment of the present application, in this step, for any one of the preset types of dependency relationships, it can be determined whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech. In the case of including vocabulary of parts of speech other than the first part of speech and the second part of speech, the preset type of dependency relationship is determined as a dependency relationship that does not comply with the part of speech rule. The above operation is performed similarly for each of the other preset types of dependency relationships.

[0107] The first part of speech may include nouns, etc., and may also include noun phrases, etc., for example, "train station square" or "underground passage".

[0108] The second part of speech may include verbs, etc.

[0109] In the present application, a dependency relationship is often composed of at least a vocabulary of a first part of speech and a vocabulary of a second part of speech. For example, a dependency relationship includes at least two entities. The part of speech of an entity often includes a noun or a noun phrase, etc. Adjectives, verbs, conjunctions, etc. usually cannot be entities alone. The dependency relationship also includes at least one conjunction, which is used to express the relationship between two entities, usually a verb. For example, "Zhang San buys goods", where "Zhang San" and "goods" are both entities, and "buy" is used to express the relationship between the entity "Zhang San" and the entity "goods", and the part of speech of "buy" is a verb. Adjectives, adverbs, conjunctions, etc. usually cannot be used as conjunctions to express the relationship between two entities alone. Therefore, whether the dependency relationship conforms to the part of speech rule can be determined by determining whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech.

[0110] If a dependency relationship output by the LTP syntactic analyzer does not conform to a part-of-speech rule, it means that the dependency relationship output by the LTP syntactic analyzer is wrong, and the dependency relationship can be discarded.

[0111] In the case where there are dependency relationships that do not conform to the preset part-of-speech rules, in step S106 , the dependency relationships that do not conform to the preset part-of-speech rules are removed from the dependency relationships of the preset type.

[0112] In the present application, among the remaining preset types of dependency relationships, dependency relationships with negative meanings can also be simplified. For example, assuming that multiple negative meanings are expressed in a dependency relationship, the multiple negations can be eliminated to simplify the logic of the dependency relationship and facilitate human understanding.

[0113] For example, in one example, assuming a dependency relationship is "Zhang San is not unsuccessful", there are two negative expressions, including the "not" in "is not" and the "not" in "unsuccessful", that is, the dependency relationship is a double negation, which can be simplified to "Zhang San is successful".

[0114] In addition, in one embodiment, in the subject-predicate relationship and the verb-object relationship, when the subject has an appositive or a component that forms a parallel relationship with the subject, a dependency relationship of the subject-predicate relationship and the verb-object relationship that is the same as the parallel component can be generated, and a dependency relationship of the subject-predicate relationship and the verb-object relationship that is the same as the appositive can also be generated.

[0115] In step S107, the remaining dependency relationships of the preset type are output.

[0116] Furthermore, a dependency tree may be constructed according to the preset types of dependency relationships, and then the dependency tree may be output for the user to view, so that the user can conveniently understand the dependency relationships in the text according to the dependency tree.

[0117] In the present application, a text is segmented to obtain a plurality of words included in the text; the part of speech of each word is obtained; dependency syntactic analysis is performed on the plurality of words included in the text according to the part of speech of each word to obtain a plurality of different dependency relationships; each dependency relationship includes a dependency relationship between at least two words in the text; among the plurality of different dependency relationships, dependency relationships of a preset type are screened; among the dependency relationships of the preset type, it is determined whether there are dependency relationships that do not conform to the preset part of speech rules; in the case of dependency relationships that do not conform to the preset part of speech rules, the dependency relationships that do not conform to the preset part of speech rules are eliminated from the dependency relationships of the preset type; and the remaining dependency relationships of the preset type are output.

[0118] In the present application, the process of text segmentation, obtaining the part of speech of words, and performing dependency syntactic analysis on words can use a table lookup method, or the dependency relationship between entities in the text can be obtained based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer. This does not involve a large number of matrix operations of the neural network model, and after many experiments, it can be concluded that the speed of obtaining the dependency relationship between words in the text by using a table lookup method or based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer is faster than the speed of obtaining the dependency relationship between different words in the text based on the neural network model. Therefore, compared with the prior art, the present application can improve the efficiency of obtaining the dependency relationship between words in the text.

[0119] In addition, the present application can also support users to set preset types in advance, so that the electronic device can automatically filter the dependency relationships of the type required by the user from the dependency relationships between words in the acquired text, for example, obtaining the dependency relationships between entities in the text, etc.

[0120] Secondly, since the neural network model does not need to be used, it is not necessary to train the neural network model, so there is no need to collect a large amount of training data and there is no need to label the training data, which can reduce the manual workload and thus reduce labor costs.

[0121] Secondly, the present application supports the identification of the most important entities in the text without manual intervention, and the identification of dependency relationships between words in the text without manual intervention. Compared with the existing technology, the degree of automation can be improved and the labor cost can be reduced.

[0122] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0123] Reference Figure 2 , shows a structural block diagram of an information processing device of the present application, and the device may specifically include the following modules:

[0124] A word segmentation module 11 is used to segment the text to obtain a plurality of words included in the text;

[0125] A first acquisition module 12 is used to acquire the part of speech of each word;

[0126] An analysis module 13, configured to perform dependency syntactic analysis on a plurality of words included in the text according to the part of speech of each word, to obtain a plurality of different dependency relations; each dependency relation includes a dependency relation between at least two words in the text;

[0127] A screening module 14, used for screening a preset type of dependency relationship among a plurality of different dependency relationships;

[0128] A determination module 15, configured to determine whether there is a dependency relationship that does not conform to a preset part-of-speech rule in the dependency relationship of the preset type;

[0129] A removal module 16 is used to remove the dependency relationship that does not conform to the preset part-of-speech rule from the dependency relationships of the preset type when there is a dependency relationship that does not conform to the preset part-of-speech rule;

[0130] The output module 17 is used to output the remaining dependency relationships of the preset type.

[0131] In an optional implementation, the device further includes:

[0132] A second acquisition module, configured to acquire a type identifier of a type of each dependency relationship among the multiple different dependency relationships;

[0133] The screening module comprises:

[0134] A searching unit, configured to search for a type identifier of the preset type in the type identifiers of each type of dependency relationship;

[0135] The selection unit is used to select a dependency relationship corresponding to the found type identifier from a plurality of different dependency relationships.

[0136] In an optional implementation, the determining module includes:

[0137] A first determination unit, configured to determine, for any one of the preset types of dependency relationships, whether the part of speech of a word in the preset type of dependency relationship is a first part of speech;

[0138] The second determining unit is configured to determine the dependency relationship of the preset type as a dependency relationship that does not comply with the part-of-speech rule when the part-of-speech of the vocabulary in the dependency relationship of the preset type is not the first part-of-speech.

[0139] In an optional implementation, the determining module includes:

[0140] A third determining unit is used to determine, for any one of the preset types of dependency relationships, whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech;

[0141] The fourth determining unit is used to determine the preset type of dependency relationship as a dependency relationship that does not comply with the part-of-speech rule when the vocabulary includes words of parts of speech other than the first part of speech and the second part of speech.

[0142] In the present application, a text is segmented to obtain a plurality of words included in the text; the part of speech of each word is obtained; dependency syntactic analysis is performed on the plurality of words included in the text according to the part of speech of each word to obtain a plurality of different dependency relationships; each dependency relationship includes a dependency relationship between at least two words in the text; among the plurality of different dependency relationships, dependency relationships of a preset type are screened; among the dependency relationships of the preset type, it is determined whether there are dependency relationships that do not conform to the preset part of speech rules; in the case of dependency relationships that do not conform to the preset part of speech rules, the dependency relationships that do not conform to the preset part of speech rules are eliminated from the dependency relationships of the preset type; and the remaining dependency relationships of the preset type are output.

[0143] In the present application, the process of text segmentation, obtaining the part of speech of words, and performing dependency syntactic analysis on words can use a table lookup method, or the dependency relationship between entities in the text can be obtained based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer. This does not involve a large number of matrix operations of the neural network model, and after many experiments, it can be concluded that the speed of obtaining the dependency relationship between words in the text by using a table lookup method or based on the LTP part-of-speech tagging tool and the LTP syntactic analyzer is faster than the speed of obtaining the dependency relationship between different words in the text based on the neural network model. Therefore, compared with the prior art, the present application can improve the efficiency of obtaining the dependency relationship between words in the text.

[0144] In addition, the present application can also support users to set preset types in advance, so that the electronic device can automatically filter the dependency relationships of the type required by the user from the dependency relationships between words in the acquired text, for example, obtaining the dependency relationships between entities in the text, etc.

[0145] Secondly, since the neural network model does not need to be used, it is not necessary to train the neural network model, so there is no need to collect a large amount of training data and there is no need to label the training data, which can reduce the manual workload and thus reduce labor costs.

[0146] Secondly, the present application supports the identification of the most important entities in the text without manual intervention, and the identification of dependency relationships between words in the text without manual intervention. Compared with the existing technology, the degree of automation can be improved and the labor cost can be reduced.

[0147] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0148] Figure 3 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0149] Reference Figure 3 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0150] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0151] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0152] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0153] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0154] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0155] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0156] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0157] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0158] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0160] Figure 41 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.

[0161] Reference Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0162] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0163] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0168] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

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

[0170] The above is a detailed introduction to an information processing method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An information processing method, characterized in that: The method comprises: Segmenting the text to obtain a plurality of words included in the text; Get the part of speech of each word; Performing dependency syntactic analysis on a plurality of words included in the text according to the part of speech of each word to obtain a plurality of different dependency relations; each dependency relation includes a dependency relation between at least two words in the text; Filter the dependencies of preset types among multiple different dependencies; Determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule among the dependency relationships of the preset type; In the case where there are dependency relationships that do not conform to the preset part-of-speech rules, the dependency relationships that do not conform to the preset part-of-speech rules are removed from the dependency relationships of the preset type; Output the remaining dependencies of the preset type; The text is segmented to obtain a plurality of words included in the text, including: Create dictionaries from existing words; Searching in the dictionary whether there is a candidate word, wherein the candidate word is obtained by combining adjacent words in the text; When there are a plurality of candidate words in the dictionary, the plurality of candidate words are regarded as a plurality of words in the text.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining a type identifier of a type of each dependency relationship among the multiple different dependency relationships; The step of screening a preset type of dependency relationship from among the multiple different dependency relationships includes: Searching for the type identifier of the preset type in the type identifiers of each dependency type; A dependency relationship corresponding to the found type identifier is selected from a plurality of different dependency relationships.

3. The method according to claim 1, characterized in that The determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule in the dependency relationship of the preset type includes: For any one of the preset types of dependency relationships, determining whether the part of speech of a word in the preset type of dependency relationship is the first part of speech; When the part of speech of the vocabulary in the preset type of dependency relationship is not the first part of speech, the preset type of dependency relationship is determined as a dependency relationship that does not comply with the part of speech rule.

4. The method according to claim 1, characterized in that: The determining whether there is a dependency relationship that does not conform to a preset part-of-speech rule in the dependency relationship of the preset type includes: For any one of the preset types of dependency relationships, determining whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech; In the case of a vocabulary including parts of speech other than the first part of speech and the second part of speech, the preset type of dependency relationship is determined as a dependency relationship that does not comply with the part of speech rule.

5. An information processing device, characterized in that: The device comprises: A word segmentation module, used for segmenting a text to obtain a plurality of words included in the text; The first acquisition module is used to acquire the part of speech of each word; An analysis module, configured to perform dependency syntactic analysis on a plurality of words included in the text according to the part of speech of each word, to obtain a plurality of different dependency relations; each dependency relation includes a dependency relation between at least two words in the text; A screening module, used for screening a preset type of dependency among a plurality of different dependency relationships; A determination module, used to determine whether there is a dependency relationship that does not conform to a preset part-of-speech rule among the dependency relationships of the preset type; A removal module, configured to remove the dependency relationships that do not conform to the preset part-of-speech rules from the dependency relationships of the preset type when there are dependency relationships that do not conform to the preset part-of-speech rules; An output module, used for outputting the remaining dependencies of the preset type; The word segmentation module is also used to create a dictionary based on existing vocabulary; to search the dictionary for candidate words, wherein the candidate words are obtained by combining adjacent characters in the text; and when there are multiple candidate words in the dictionary, the multiple candidate words are used as multiple vocabulary in the text.

6. The device according to claim 5, characterized in that The device also includes: A second acquisition module, configured to acquire a type identifier of a type of each dependency relationship among the multiple different dependency relationships; The screening module comprises: A searching unit, configured to search for a type identifier of the preset type in the type identifiers of each type of dependency relationship; The selection unit is used to select a dependency relationship corresponding to the found type identifier from a plurality of different dependency relationships.

7. The device according to claim 5, characterized in that The determination module comprises: A first determination unit, configured to determine, for any one of the preset types of dependency relationships, whether the part of speech of a word in the preset type of dependency relationship is a first part of speech; The second determining unit is configured to determine the dependency relationship of the preset type as a dependency relationship that does not comply with the part-of-speech rule when the part-of-speech of the vocabulary in the dependency relationship of the preset type is not the first part-of-speech.

8. The device according to claim 5, characterized in that The determination module comprises: A third determining unit is used to determine, for any one of the preset types of dependency relationships, whether the vocabulary in the preset type of dependency relationship includes vocabulary of parts of speech other than the first part of speech and the second part of speech; The fourth determining unit is used to determine the preset type of dependency relationship as a dependency relationship that does not comply with the part-of-speech rule when the vocabulary includes words of parts of speech other than the first part of speech and the second part of speech.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute the information processing method according to any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method according to any one of claims 1 to 4.