CN115705351A - Operation information determination method and device - Google Patents

Operation information determination method and device Download PDF

Info

Publication number
CN115705351A
CN115705351A CN202110904172.1A CN202110904172A CN115705351A CN 115705351 A CN115705351 A CN 115705351A CN 202110904172 A CN202110904172 A CN 202110904172A CN 115705351 A CN115705351 A CN 115705351A
Authority
CN
China
Prior art keywords
sentence
node
target
determining
word
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110904172.1A
Other languages
Chinese (zh)
Inventor
蔡敦波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110904172.1A priority Critical patent/CN115705351A/en
Publication of CN115705351A publication Critical patent/CN115705351A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Machine Translation (AREA)

Abstract

The embodiment of the application discloses an operation information determining method, which comprises the following steps: receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word; performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed; determining a target operation name based on the first word and the second word; and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information. The embodiment of the application also discloses an operation information determining device.

Description

Operation information determination method and device
Technical Field
The present application relates to an operation information determination technology in the field of document processing, and in particular, to an operation information determination method and apparatus.
Background
At present, a large amount of instruction texts (operation instructions or operation information for short) about operations are contained in electronic documents such as widely-existing device operation instructions and operation manuals, and such operation instructions have high application value.
In the related art, when the operation description of the target operation is determined from the electronic document, the operation and the operation description in any section of text content in the electronic document are determined by refining, and a user confirms whether the refined operation description is the operation description of the target operation; if the extracted operation description in the section is not the operation description of the target operation, extracting the next section of text content in the document until the extracted operation description is determined to be the operation description of the target operation; therefore, the operation instruction can be extracted only by analyzing one segment of characters each time, which results in low efficiency and low accuracy in extracting the operation instruction (i.e. operation information) of the target operation.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present application are expected to provide an operation information determining method and device, which solve the problems of low efficiency and low accuracy in extracting operation information.
The technical scheme of the application is realized as follows:
a method of operational information determination, the method comprising:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word;
performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed;
determining a target operation name based on the first word and the second word;
and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
In the above scheme, the method further comprises:
acquiring a text to be processed, and determining a first sentence from the text to be processed;
acquiring part-of-speech associated parameters of the first statement;
screening the first statement to obtain a target statement set based on the part-of-speech associated parameters of the first statement;
and determining an operation specification mapping table of the text to be processed based on a second sentence in the target sentence set.
In the foregoing solution, the determining a first sentence from the text to be processed includes:
determining sentences in the text to be processed, and determining the parts of speech of words of the sentences in the text to be processed;
and obtaining the sentence with the verb and the noun from the sentence in the text to be processed to obtain the first sentence.
In the above scheme, the obtaining part-of-speech associated parameters of the first sentence includes:
obtaining words in the first sentence, and constructing a dependency syntax analysis tree based on the words in the first sentence;
based on the dependency parsing tree, determining a part-of-speech associated parameter of the first sentence.
In the foregoing solution, the screening the first sentence to obtain a target sentence set based on the part-of-speech related parameter of the first sentence includes:
determining a third word from the words of the first sentence based on the part-of-speech associated parameters; the part-of-speech of the third word is a verb, and the first sentence does not have a part-of-speech association relation pointing to the third word; a word having a move-guest relationship with the third word exists in the first sentence, and a word having a main-predicate relationship with the third word does not exist;
determining a third sentence from the first sentence based on the sentence corresponding to the third word;
determining the target sentence set from the third sentence based on the position information of the third sentence in the text to be processed.
In the above scheme, determining the target sentence set from the third sentence based on the position information of the third sentence in the text to be processed includes:
acquiring the line number of each third sentence in the text to be processed, the first line indentation distance of the paragraph where each third sentence is located and the paragraph number where each third sentence is located;
determining a directional relation between a fourth sentence and the fourth sentence from the third sentence based on the first line indentation distance, the line number and the paragraph number;
constructing a directed tree of the fourth sentence based on the directional relation between the fourth sentences;
determining a hierarchical relationship between the fourth sentences based on the directed tree;
determining the target sentence set based on the hierarchical relationship and the fourth sentence.
In the above scheme, the determining the target sentence set based on the hierarchical relationship and the fourth sentence includes:
marking each node in the directed tree as a first mark;
for each directed tree, determining an ith node having a first label, an mth node having a first label, and an nth node having a first label based on the hierarchical relationship; wherein the hierarchy of the mth node is greater than the hierarchy of the ith node; the level of the nth node is the same as the level of the ith node; wherein i, m and n are positive integers;
for each directed tree, updating the nodes in each directed tree based on the statements corresponding to the ith node, the statements corresponding to the mth node and the statements corresponding to the nth node to determine a plurality of target directed trees;
determining the target statement set based on statements corresponding to nodes of the plurality of target directed trees.
In the above scheme, the updating, for each directed tree, nodes in each directed tree based on the statement corresponding to the ith node, the statement corresponding to the mth node, and the statement corresponding to the nth node to determine multiple target directed trees includes:
determining the word of the sentence corresponding to the ith node and the first vocabulary sharing degree of the word of the sentence corresponding to the mth node;
determining a second vocabulary sharing degree of the words of the sentence corresponding to the nth node and the words of the sentence corresponding to the mth node;
determining a third vocabulary sharing degree based on the first vocabulary sharing degree and the second vocabulary sharing degree;
determining a fourth vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the parent node of the ith node;
updating nodes in the directed tree based on the third vocabulary sharing degree and the fourth vocabulary sharing degree, and determining the target directed tree; and the statement corresponding to the node of the target directed tree is the second statement.
In the foregoing solution, the determining an operation specification mapping table of the text to be processed based on the second sentence in the target sentence set includes:
determining nodes to be selected with the same sentence from a plurality of target directed trees, and determining the number of descendant nodes of the nodes to be selected;
determining a target node with the largest number of descendant nodes from the nodes to be selected;
constructing a corresponding relation between the statement corresponding to the target node and the identifier of the statement corresponding to the descendant node of the target node to obtain an operation description mapping table; the statement corresponding to the target node in the operation specification mapping table represents the operation name; and the identifier in the operation description mapping table represents the operation information corresponding to the operation name.
An operation information determination device, the device comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute the operation information determination program in the memory to implement the steps of:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word;
performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed;
determining a target operation name based on the first word and the second word;
and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
The operation information determining method and the operation information determining equipment provided by the embodiment of the application receive information to be inquired, and perform word segmentation processing on the information to be inquired to obtain a first word; performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed; determining a target operation name based on the first word and the second word; the target operation information of the information to be inquired is determined from the text to be processed based on the target operation name and the operation description mapping table, and the target operation information is output, so that the target operation information of the information to be inquired is determined according to the operation description mapping table, the distribution of the target operation information in the text to be processed is considered, the operation information can be extracted only by a whole segment of characters to determine the target operation information in related technologies, and the accuracy of determining the target operation information and the efficiency of determining the target operation information are improved.
Drawings
Fig. 1 is a schematic flowchart of an operation information determining method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an operation information determining method according to another embodiment of the present application;
FIG. 3 is a diagram illustrating a structure of a dependency parse tree according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a structure of another dependency parse tree according to an embodiment of the present application;
fig. 5 is a schematic processing flow diagram of an operation information determining method according to an embodiment of the present application;
fig. 6 is a schematic processing flow diagram of an operation information determining method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an operation information determining apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
An embodiment of the present application provides an operation information determining method, which is applied to an operation information determining device, and as shown in fig. 1, the method includes the following steps:
step 101, receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word.
The information to be queried may be information input by a user, and the information to be queried is used as a statement input by the user.
In the embodiment of the application, word segmentation processing is performed on the information to be queried to obtain the word of the information to be queried, and the word of the information to be queried is used as the first word, so that the operation information of the information to be queried is determined based on the first word in the subsequent process.
And 102, performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name.
The operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed. The operation description mapping table comprises operation names and operation information identifiers corresponding to the operation names; the identifier of the operation information corresponding to the operation name can uniquely refer to the operation information corresponding to the operation name.
In a possible implementation manner, the identifier of the operation information corresponding to the operation name may represent a position of the operation information corresponding to the operation name in the text to be processed.
In the embodiment of the application, word segmentation processing may be performed on the operation names (sentences) in the operation description mapping table to obtain second words corresponding to each operation name, so as to determine operation information of the information to be queried according to the second words in the following.
And 103, determining a target operation name based on the first word and the second word.
In the embodiment of the application, the first word of the information to be queried may be matched with the second word of each operation name in the operation description mapping table to obtain a matching result, the target word is determined according to the matching result, and then the target operation name is determined based on the target word. Wherein, the matching result can be expressed by matching degree.
Specifically, the first word of the information to be queried may be matched with the second word of each operation name in the operation description mapping table, the second word with the highest matching degree is determined, the second word with the highest matching degree is used as the target word, and the operation name where the target word is located is used as the target operation name. The matching degree is the number of the common words of the information to be inquired and the operation name.
And step 104, determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
In the embodiment of the application, the identifier of the operation information corresponding to the target operation name may be determined from the operation instruction table based on the target operation name, the target operation information may be determined from the operation instruction mapping table according to the identifier of the operation information corresponding to the target operation name, and the target operation information may be output. The identifier of the operation information corresponding to the target operation name may represent the position of the operation information corresponding to the target operation name.
It should be noted that, if the operation specification mapping table includes operation information corresponding to each operation name, the operation information corresponding to the target operation name may also be determined from the operation specification mapping table directly according to the target operation name.
After the target operation information is determined, the target operation information can be displayed in different modes; the display mode can be that a target text is generated based on the target operation information and the information to be inquired, and the target text and the position of the target operation information in the text to be processed are displayed; or marking the target operation information in the text to be processed and displaying the text to be processed.
In a possible implementation manner, the information to be queried may be "statement 1", the target operation information may be information composed of statement 3 and statement 4, and the target text generated according to the information to be queried and the target operation information may be "queried operation: statement 1, queried, consists of the following steps: statement 3; statement 2", wherein statement 1, statement 2 and statement 3 all refer to the content of the statement; in another possible way, the target operation information in the text to be processed may be highlighted, and the highlighted area in the text to be processed may be displayed.
The operation information determining method provided by the embodiment of the application receives information to be queried, and performs word segmentation processing on the information to be queried to obtain a first word; segmenting the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed; determining a target operation name based on the first word and the second word; the target operation information of the information to be inquired is determined from the text to be processed based on the target operation name and the operation instruction mapping table, and the target operation information is output, so that the target operation information of the information to be inquired is determined according to the operation instruction mapping table, the distribution of the target operation information in the text to be processed is considered, the operation information can be extracted from the whole segment of words to determine the target operation information each time in the related technology, and the accuracy of determining the target operation information and the efficiency of determining the target operation information are improved.
Based on the foregoing embodiments, an embodiment of the present application provides an operation information determining method, which is shown in fig. 2 and includes the following steps:
step 201, the operation information determining device obtains a text to be processed, and determines a first sentence from the text to be processed.
The text to be processed can be an electronic document such as a use instruction of the equipment or an electronic manual; the text to be processed contains a large number of operation descriptions about operations; the operation instruction can refer to a behavior sequence which is used for controlling a certain 'object' and consists of a plurality of steps and is used for achieving the purpose of a certain object state; the operation can be called as an operation name, and the operation description can be called as operation information; wherein the first sentence is a sentence having both a verb and a noun.
In one possible implementation, the operation name may be "take catch water from refrigerator", and the operation description refers to a specific step of "take catch water from refrigerator": "the first step may be opening the refrigerator; the second step can be to take out the soda water; the third step may be to close the refrigerator ".
In the embodiment of the application, words of sentences in the text to be processed can be screened, and the sentences with verbs and nouns simultaneously can be obtained from the sentences of the text to be processed, so that the first sentence can be obtained. It should be noted that there are two ways of acquiring the text to be processed, which are active acquisition and passive acquisition; the active acquisition refers to that the operation information determination equipment actively downloads a text to be processed through a network; the passive acquisition means that the operation information determination device downloads the text to be processed through a network after receiving a download instruction of the user, or the user sends the text to be processed to the operation information determination device through a terminal.
The determination of the first sentence from the text to be processed in step 201 can be implemented by the following steps:
a1, the operation information determining device determines sentences in the text to be processed and determines the parts of speech of words of the sentences in the text to be processed.
In the embodiment of the application, the operation information determining device may extract sentences of the text to be processed from the text to be processed based on punctuations in the text to be processed, perform word segmentation processing on the sentences of the text to be processed to obtain words in each sentence of the text to be processed, perform syntactic analysis processing on the words in each sentence of the text to be processed, and determine the part of speech of the words in each sentence of the text to be processed; where parts of speech may include, but are not limited to, verbs or nouns; the types of punctuation marks may include chinese punctuation marks and english punctuation marks.
In a feasible implementation manner, the punctuation marks may be periods in english punctuation marks and/or periods in english punctuation marks, and if there are 100 chinese punctuation marks periods in the text to be processed and there is no english punctuation mark period, 100 sentences of the text to be processed may be extracted.
and a2, acquiring sentences with verbs and nouns simultaneously from the sentences in the text to be processed by the operation information determining equipment to obtain a first sentence.
In the embodiment of the application, the sentences in the text to be processed are screened based on the part-of-speech of each sentence in the text to be processed, and the sentences with verbs and nouns simultaneously are obtained from a plurality of sentences in the text to be processed to obtain the first sentence.
Step 202, the operation information determination device obtains the part-of-speech associated parameters of the first sentence.
The part-of-speech associated parameter of the first sentence represents the dependency relationship between words of the first sentence, which can also be called as an association relationship; in a sentence, if one word modifies another word, the modified word is called as a dependent word, the modified word is called as a dominant word, and the relationship between the two words is the dependency relationship; part-of-speech associated parameters include, but are not limited to: word-to-word motile or dominant-predicate relationships.
In this embodiment, the operation information determining device may perform word segmentation on the first sentence to obtain a word of the first sentence, and then analyze the part of speech of the word of the first sentence to determine the part of speech of the word of the first sentence and the dependency relationship between the words in the first sentence.
It should be noted that step 202 can be implemented by the following steps:
b1, the operation information determining device acquires words in the first sentence, and builds a dependency syntax analysis tree based on the words in the first sentence.
In this embodiment of the present application, a word segmentation process may be performed on a first sentence to obtain a word in the first sentence, and a generative syntax analysis may be performed on the word in the first sentence to obtain a dependency syntax analysis tree corresponding to the first sentence. It should be noted that generative syntactic analysis is an important task in natural language processing, and the goal is to analyze the syntactic structure of a sentence and express it as an easily understood structure; the structure may be a tree structure. Wherein the dependency parse tree represents grammatical relations between words in the sentence.
In one possible implementation, if a sentence is "open refrigerator", the generated dependency parsing tree for the sentence is shown in fig. 3, "open" is a virtual Root word (indicated by Root) in the dependency parsing tree and is also a core word of the whole sentence, and HED indicates a core relationship, i.e., "open" is the core of the whole sentence; a direct object relationship (VOB) in the moving object relationship is between the 'open' and the 'refrigerator'; "open" is a verb represented by "v" and "refrigerator" is a noun represented by n.
And b2, determining part-of-speech associated parameters of the first sentence by the operation information determining device based on the dependency syntactic analysis tree.
And the part-of-speech associated parameters of the first sentence represent the dependency relationship among the words of the first sentence. Part-of-speech association parameters include, but are not limited to, an actor-guest relationship or a predicate relationship. The part-of-speech related parameter of the first sentence may be obtained by analyzing the dependency parsing tree.
In a possible implementation manner, if a sentence is "take soda from refrigerator", the dependency parsing tree corresponding to the sentence is as shown in fig. 4, and a position-object (POB) relationship between "from" and "refrigerator" can be obtained from the parsing tree; "taking" and "taking" may constitute intermediate structures; the relation of moving guests is between the 'getting' and 'soda water'.
It should be noted that the dependency parsing tree is also marked with the part of speech of each word, as shown in fig. 4, in the dependency parsing tree of "take steam from refrigerator", the "from" is marked with "p" as a preposition, the "n" as a noun for marking refrigerator, the "v" as a verb, and the "n" as a noun for marking refrigerator.
Step 203, the operation information determination device filters the first sentence to obtain a target sentence set based on the part-of-speech associated parameter of the first sentence.
Wherein the target statement set comprises a plurality of second statements; the second sentence is obtained by screening the plurality of first sentences.
In this embodiment, the operation information determining device may filter words of the first sentence based on the part-of-speech related parameters of the first sentence, and determine the target sentence set based on the sentence in which the selected word is located.
It should be noted that step 203 can also be implemented by the following steps:
c1, the operation information determining device determines a third word from the words of the first sentence based on the part-of-speech related parameter.
The part of speech of the third word is a verb, and the first sentence does not have a part of speech incidence relation pointing to the third word; in the first sentence, a word having a guest-moving relationship with the third word exists, and a word having a major-minor relationship with the third word does not exist.
It should be noted that the fact that the part-of-speech of the third word is a verb and there is no part-of-speech association relationship pointing to the third word in the first sentence means that the third word is a verb that does not depend on other words, and may also be referred to as a root word in a dependency parsing tree.
In this embodiment of the application, based on the part-of-speech correlation parameter, a root word independent of other words may be determined in each first sentence, and then it is determined whether a word having a guest-moving relationship with the root word exists in the first sentence in which the root word is located, if so, it is determined whether a word having a principal-subordinate relationship with the root word exists in the first sentence in which the root word is located, if not, it is determined that the root word is a third word, and finally, a plurality of third words may be determined from the words of the plurality of first sentences.
In one possible implementation, as shown in fig. 4, "take" is a verb and there is no word pointing to "take", and the word having a motile relationship with "take" is "soda", and there is no word having a cardinal relationship with "take", so "take" can be taken as a "third word".
And c2, the operation information determining device determines the third sentence from the first sentence based on the sentence corresponding to the third word.
In the embodiment of the application, the sentence corresponding to the third word may be determined from the first sentence, and the third sentence may be obtained by filtering out the sentences except the sentence corresponding to the third word in the first sentence. The sentence corresponding to the third word refers to the sentence where the third word is located.
And c3, the operation information determining device determines a target sentence set from the third sentence based on the position information of the third sentence in the text to be processed.
The position information of the third sentence in the text to be processed may refer to a line number of the third sentence in the text to be processed and a first line indentation distance of a paragraph where the third sentence is located. In this embodiment of the present application, the third sentence may be filtered based on the line number of the third sentence in the text to be processed and the indentation distance of the head line of the paragraph where the third sentence is located, and the target sentence set is determined based on the sentences obtained by the filtering.
It should be noted that step c3 can be implemented by the following steps:
d1, the operation information determining device obtains the line number of each third sentence in the text to be processed, the first line indentation distance of the paragraph where each third sentence is located and the paragraph number where each third sentence is located.
In the embodiment of the present application, a line where a sentence in a text to be processed is located and a paragraph where the sentence is located may be numbered to obtain a line number corresponding to each sentence in the text to be processed and a paragraph number of the paragraph where each sentence is located, and then a line number of a third sentence may be determined from the line numbers of the sentences in the text to be processed, and a paragraph number where the third sentence is located may be determined from the paragraph numbers of the text to be processed.
It should be noted that, if there is a sentence occupying a plurality of lines in any paragraph in the text to be processed, the line number of the first line in which the sentence is located is used as the line number of the sentence.
The step of obtaining the first line indentation distance of the paragraph where the third sentence is located may be to convert the text to be processed into a picture, determine the picture of the paragraph where the third sentence is located from the picture according to the paragraph number where the third sentence is located, perform character recognition processing on the picture of the paragraph where the third sentence is located, and determine the coordinates of the first character of the recognized text as the first line indentation distance of the paragraph where the third sentence is located, where the first line indentation distance may also be referred to as a horizontal indentation distance.
d2, the operation information determining device determines the fourth sentence and the directional relation between the fourth sentence from the third sentence based on the first line indentation distance, the line number and the paragraph number.
The fourth statement is obtained by screening from the third statement according to the indentation distance of the head line of the third statement, the line number of the third statement and the paragraph number of the third statement; the method comprises the following steps that an a statement in a fourth statement which can be constructed points to a directed edge of a b statement to represent the pointing relationship between the fourth statement, wherein the line number of the a statement is smaller than that of the b statement, and the indentation distance of the head line of the a statement is smaller than that of the head line of the b statement; and if the line number of the a statement is greater than that of the b statement or the indentation distance of the head line of the a statement is greater than that of the b statement, stopping constructing the directed edge of the a statement pointing to the b statement, and deleting the a statement.
In this embodiment of the present application, the third sentences may be sorted from large to small or from small to large according to the line numbers of the third sentences, the third sentences are screened based on the sorted third sentences and the paragraph numbers where the third sentences are located, a directional edge between two adjacent text sentences with paragraph numbers in the text to be processed is constructed, and a directional relationship between the fourth sentence and the fourth sentence is obtained based on the sentence corresponding to the directional edge.
In a feasible implementation manner, taking the paragraph numbers 1 and 2 as examples (the horizontal indentation distances of the sentences in the 1 st paragraph are the same, and the horizontal indentation distances of the sentences in the 2 nd paragraph are the same), the sentences of the texts in the 1 st and 2 nd paragraphs are sorted first, if the sentences in the 1 st paragraph are the sentences 1, 2 and 3, respectively, wherein the line number of the sentence 1 is 1, the line number of the sentence 2 is 2, the line number of the sentence 3 is 3, and the sentences in the 2 nd paragraph are the sentences 4, 5 and 6, respectively, wherein the line number of the sentence 4 is 4, the line number of the sentence 5 is 5, and the line number of the sentence 6 is 6, obviously, the line numbers of all the sentences in the 2 nd paragraph are all greater than the line numbers of all the sentences in the 1 st paragraph, and on the premise that the indentation distance of the first line of the paragraph in the paragraph 1 st paragraph is less than the indentation distance of the paragraph in the paragraph 2 nd paragraph, the sentence 3 in the 1 st paragraph can be constructed, and the sentence 3 in the paragraph can be deleted. Where statements 3 and 4 are the fourth statement.
In another possible implementation manner, if the 1 st and 2 nd sections all have 1 line of sentences, where the sentences 1, 2 and 3 are the 1 st sections of sentences in the same line 1, and the sentences 4, 5 and 6 are the 2 nd sections of sentences in the same line 1, if the indentation distance of the first line of the 1 st section is smaller than the indentation distance of the first line of the 2 nd section, directional edges pointing to the sentences 4, 5 and 6 respectively by the sentences 1, directional edges pointing to the sentences 4, 5 and 6 respectively by the sentences 2, and directional edges pointing to the sentences 4, 5 and 6 respectively by the sentences 3.
d3, the operation information determining device constructs a directed tree of the fourth statement based on the directional relation between the fourth statements.
Wherein the directional relation between the nodes in the directional tree is determined by the directional relation between the fourth sentences.
In the embodiment of the present application, a directional relationship between nodes in the directional tree may be generated based on a directional relationship between the fourth statements, and the directional tree of the fourth statements may be constructed based on the directional relationship between the nodes.
It should be noted that the number of the constructed directed trees may be multiple, and multiple directed trees may form an operation name hierarchical relationship topological graph; the directed tree may be constructed in a manner of sequentially inserting directed edges of nodes.
In a possible implementation manner, the directional relationship between the a node and the b node is determined according to the directional edge of the a statement pointing to the b statement, and then the directional tree may be sequentially determined according to the directional relationship between the nodes (i.e., the directional tree between the nodes). The sentence corresponding to the node a is a sentence, the sentence corresponding to the node b is a sentence b, and the node a of the constructed directed tree points to the node b. Before the directed edges of the a node and the b node are inserted, the condition that the directed edge of the b statement pointing to the a statement does not exist in the statements corresponding to the nodes of the directed tree constructed by the previous directed edges is also required to be met.
In another possible implementation manner, if the fourth statement includes an a statement, a b statement, a c statement, and a d statement, and if the a statement refers to the b statement, and the b statement points to the c statement and the d statement respectively, the a statement may be set as a root node, the b statement is a child node of the a statement, and the c statement and the d statement are child nodes of the b statement when the directed tree is constructed.
d4, the operation information determining device determines the hierarchical relation between the fourth sentences based on the directed tree.
And the hierarchical relationship between the nodes in the directed tree can be used as the hierarchical relationship between the fourth sentences corresponding to the nodes.
In this embodiment of the present application, a hierarchical relationship between the fourth sentences may be determined according to the sentences corresponding to the directed tree.
d5, the operation information determination device determines the target statement set based on the hierarchical relation and the fourth statement.
In this embodiment of the present application, the fourth sentences may be screened based on the hierarchical relationship between the fourth sentences and the fourth sentences, and the target sentence set may be determined based on the sentences obtained through screening.
Wherein d5 can be realized by the following steps:
e1, the operation information determining device marks each node in the directed tree as a first mark.
The first mark is an initial mark of each node in the directed tree, and a statement corresponding to each node in the directed tree is characterized to be not processed.
In the embodiment of the application, each node in the directed tree is marked, so that sentences corresponding to the first marked node can be conveniently processed subsequently, and unprocessed sentences are prevented from being omitted; in one possible implementation, each node in the directed tree may be marked as "false", i.e., the first mark is "false".
e2, the operation information determination device determines, for each directed tree, an ith node having a first label, an mth node having a first label, and an nth node having a first label based on the hierarchical relationship.
Wherein the hierarchy of the mth node is greater than the hierarchy of the ith node; the level of the nth node is the same as that of the ith node; wherein i, m and n are positive integers. The mth node is an ancestor node of the ith node, and the nth node is a brother node of the ith node.
In the embodiment of the present application, the ith node may be any node except for a root node in the directed tree; for each directed tree, traversal may be performed from the lowest level leaf node to the root node, determining the ancestor node of the ith node and the siblings of the ith node.
And e3, the operation information determining equipment updates the nodes in each directed tree to determine a plurality of target directed trees based on the statements corresponding to the ith node, the statements corresponding to the mth node and the statements corresponding to the nth node.
In this embodiment of the application, for any directed tree, it may be determined whether a parent node of an ith node needs to be updated based on a statement corresponding to the ith node, a statement corresponding to an mth node, and a statement corresponding to an nth node in the directed tree, and the directed tree is updated based on a determination result.
Wherein, step e3 can also be realized by the following steps:
f1, the operation information determining device determines the first vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the mth node.
The first vocabulary sharing degree refers to the number of shared vocabularies of the sentence corresponding to the ith node and the sentence corresponding to the mth node. Wherein, the mth node is an ancestor node of the ith node, and the number of the ancestor nodes can be one or more.
In a feasible implementation manner, if the number of ancestor nodes of the ith node is 3, which are m1, m2 and m3, respectively, the vocabulary sharing degrees w (m 1, i) of the sentence corresponding to m1 and the sentence corresponding to the ith node, the vocabulary sharing degrees w (m 2, i) of the sentence corresponding to m2 and the sentence corresponding to the ith node, and the vocabulary sharing degrees w (m 3, i) of the sentence corresponding to m3 and the sentence corresponding to the ith node can be calculated respectively; wherein the first vocabulary consensus comprises w (m 1, i), w (m 2, i) and w (m 3, i).
f2, the operation information determining device determines the second vocabulary sharing degree of the words of the sentence corresponding to the nth node and the words of the sentence corresponding to the mth node.
The second vocabulary sharing degree refers to the number of shared vocabularies of the sentence corresponding to the ith node and the sentence corresponding to the nth node; the nth node is a sibling node at the same level as the ith node; the number of sibling nodes may be one or more.
In a possible implementation manner, if the sibling nodes of the ith node are i1 and i2, and the mth node includes m1, m2, and m3, the vocabulary sharing degrees between the sentence corresponding to i1 and m1, m2, and m3 may be calculated, and the vocabulary sharing degrees between the sentence corresponding to i2 and m1, m2, and m3, that is, the second vocabulary sharing degree may include: w (m 1, i 1), w (m 1, i 2), w (m 2, i 1), w (m 2, i 2), w (m 3, i 1) and w (m 3, i 2).
f3, the operation information determining device determines a third vocabulary sharing degree based on the first vocabulary sharing degree and the second vocabulary sharing degree.
The third vocabulary sharing degree refers to the maximum vocabulary sharing degree of the ith node and the ancestor node (mth node) of the ith node.
In one possible implementation, if the sibling of the ith node includes i1 and i2; the ancestor nodes of the ith node comprise m1, m2 and m3; a first value may be determined from W (m 1, i), W (m 1, i 1) and W (m 1, i 2), wherein the first value may be denoted by W1, W1= W (m 1, i) + W (m 1, i 1) + W (m 1, i 2); similarly, a second value may be determined, denoted W2, W2= W (m 2, i) + W (m 2, i 1) + W (m 2, i 2); the third value may be represented by W3, W3= W (m 3, i) + W (m 3, i 1) + W (m 3, i 2), after which the maximum value is determined from the first, second and third values, and taken as the third vocabulary consensus.
f4, the operation information determining device determines the fourth vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the parent node of the ith node.
The fourth vocabulary sharing degree is the sum of the sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the parent node of the ith node and the sharing degree of the words of the sentence corresponding to the brother node (nth node) of the ith node.
In one possible implementation, if the siblings of the ith node include i1 and i2, and the parent of the ith node is denoted as p, the fourth vocabulary total = w (p, i) + w (p, i 1) + w (p, i 2); where w (P, i) represents the number of words shared by the sentence corresponding to the P node and the sentence corresponding to the i-th node, w (P, i 1) represents the number of words shared by the sentence corresponding to the P node and the sentence corresponding to the i 1-th node, and w (P, i 2) represents the number of words shared by the sentence corresponding to the P node and the sentence corresponding to the i 2-th node.
And f5, the operation information determining device updates the nodes in the directed tree based on the third vocabulary sharing degree and the fourth vocabulary sharing degree, and determines the target directed tree.
In the embodiment of the present application, it may be determined whether the parent node of the ith node needs to be updated based on the third vocabulary sharing degree and the fourth vocabulary sharing degree, and the node in the directed tree may be updated based on the determination result, and the updated directed tree may be used as the target directed tree.
Wherein step f5 can be realized by the following steps:
g1, under the condition that the third vocabulary sharing degree is larger than the fourth vocabulary sharing degree, the operation information determining device deletes the father node of the ith node, modifies the father node of the ith node into the mth node corresponding to the third vocabulary sharing degree and modifies the first marks of the ith node and the brother node of the ith node into the second marks.
In this embodiment, if the third vocabulary sharing degree is greater than the fourth vocabulary sharing degree, it indicates that the parent node of the current ith node in the directed tree is not the true parent node of the ith node, the ancestor node of the ith node corresponding to the third vocabulary sharing degree may be taken as the parent node of the ith node, the original parent node of the ith node is deleted, and the first flag of the ith node and the siblings of the ith node is modified to the second flag, so that the subsequent processing on the node marked as the second flag may not be performed, for example, the second flag may be "true".
In a possible implementation manner, if the third vocabulary total degree is greater than the fourth vocabulary total degree, the parent node of the ith node is P, the third vocabulary total degree is W2, W2= W (m 2, i) + W (m 2, i 1) + W (m 2, i 2), that is, the node corresponding to the third vocabulary total degree is m2, the parent node P of the ith node in the directed tree may be modified to m2, specifically, a directed edge pointing to the ith node by m2 may be added, the parent node P of the original ith node may be deleted, and the first flag of the ith node and the sibling node of the ith node is modified to be the second flag.
As shown in fig. 5, the sentence S2 in the directional relationship between the sentences of the directional tree corresponding to the document points to S3, S4 and S5, respectively; as shown in fig. 6, in the directional relationship between the statements corresponding to the target directed tree obtained after the directed tree is updated, obviously, the statement S2 is deleted, the directed edges pointing to S3, S4 and S5 respectively by S1 are added, and the screening of the statements corresponding to the nodes of the directed tree is realized.
And g2, the operation information determining device determines the target directed tree based on the modified parent node of the ith node under the condition that the nodes of the directed tree are the second marks for each directed tree.
The statement corresponding to the node of the target directed tree is a second statement; the target directed tree does not have the original father node of the ith node.
In this embodiment, for one directed tree, a new directed tree may be obtained based on a parent node of the modified ith node on the directed tree, and the new directed tree may be used as the target directed tree. Wherein the number of target directed trees corresponds to the number of directed trees.
It should be noted that, when the labels of all the nodes of the directed tree are the second labels, indicating that all the nodes in the directed tree have been processed, the target directed tree may be re-determined based on the modified parent node of the ith node.
And e4, the operation information determining equipment determines a target statement set based on statements corresponding to the nodes of the target directed trees.
In this embodiment, a statement set formed by statements corresponding to nodes of a plurality of target directed trees may be used as the target statement set.
Step 204, the operation information determination device determines an operation specification mapping table of the text to be processed based on the second sentence in the target sentence set.
The operation description mapping table represents the corresponding relation between the operation name and the operation information in the text to be processed; the operation specification mapping table comprises operation names and identifications of operation information corresponding to the operation names.
In the embodiment of the application, a hierarchical relationship between the second sentences may be determined based on the second sentences in the target sentence set, then a hierarchy where the same sentences in the target sentence set are located may be determined based on the hierarchical relationship between the second sentences, and the operation instruction mapping table of the text to be processed is determined according to the hierarchy where the same sentences are located and the second sentences.
Wherein, step 204 can be realized by the following steps:
h1, the operation information determining device determines the nodes to be selected with the same sentences from the target directed trees and determines the number of descendant nodes of the nodes to be selected.
Wherein the nodes to be selected refer to nodes with the same sentence content; the number of the nodes to be selected is multiple; the same sentence refers to the content of the sentence; the multiple nodes to be selected may be nodes on one target directed tree or nodes on different target directed trees.
In the embodiment of the application, the nodes having the same statement in the target directed tree may be determined according to the statement corresponding to the node on the target directed tree, the nodes having the same statement are used as nodes to be selected, and the number of descendant nodes of each node to be selected is determined according to the directed tree.
In a feasible implementation manner, if the a statement appears in the e1 node, the e2 node, the e3 node, and the e4 node in the target directed tree at the same time, the e1 node, the e2 node, the e3 node, and the e4 node may be used as nodes to be selected, and the number of descendants of the e1 node, the e2 node, the e3 node, and the e4 node is determined respectively.
And h2, the operation information determining equipment determines the target node with the largest number of descendant nodes from the nodes to be selected.
In the embodiment of the application, the target node is determined according to the number of the descendant nodes of each node to be selected of the multiple nodes to be selected, that is, the position of the operation information is determined for the statement corresponding to the multiple nodes to be selected.
In a feasible implementation manner, if the a statement appears in the e1 node, the e2 node, the e3 node, and the e4 node in the target directed tree at the same time, when the e3 node is the node with the most descendants, the e3 node may be used as the target node, the statement corresponding to the e3 node may be used as the operation name a, and the statement corresponding to the e3 node may be used as the operation information of the operation name a.
h3, the operation information determining device establishes a corresponding relation between the statement corresponding to the target node and the identification of the statement corresponding to the descendant node of the target node, and an operation description mapping table is obtained.
The statement corresponding to the target node in the operation description mapping table represents an operation name; the operation information corresponding to the operation name can be represented by the identification in the operation description mapping table.
In the embodiment of the present application, statements corresponding to descendant nodes of a target node may be identified to obtain identifiers of the statements corresponding to the descendant nodes of the target node, and a correspondence between the statements of the target node and the identifiers of the statements corresponding to the descendant nodes of the target node is established. Wherein, the statement of the target node is an operation name.
It should be noted that the operation specification mapping table includes a plurality of operation names and identifiers of operation information corresponding to each operation name. Determining the identifier of the sentence corresponding to the descendant node of the target node may be to sort the sentences corresponding to the descendant node of the target node according to the row number, specifically, may sort the sentences corresponding to the descendant node of the target node according to a descending order, and identify the sentence corresponding to the descendant node of the sorted target node to obtain the identifier of the sentence corresponding to the descendant node of the target node. The operation description mapping table may further include operation information corresponding to the operation name.
In a document with a longer space, one operation name may appear at multiple places, and the method provided by the embodiment of the application can identify the operation information corresponding to the operation name, avoid misjudging other texts as the operation information of the operation name, and further improve the accuracy of determining the operation information corresponding to the operation name.
Step 205, the operation information determination device receives the information to be queried, and performs word segmentation processing on the information to be queried to obtain a first word.
Step 206, the operation information determining device performs word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name.
The operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed.
Step 207, the operation information determination device determines the target operation name based on the first word and the second word.
And step 208, the operation information determining device determines target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputs the target operation information.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
According to the operation information determining method provided by the embodiment of the application, the target operation information of the information to be inquired is determined according to the operation description mapping table, the distribution of the target operation information in the text to be processed is considered, the operation information can be extracted only by a whole segment of characters to determine the target operation information in the related technology, and the accuracy rate of determining the target operation information and the efficiency of determining the target operation information are improved; by the operation information determining method, the position of the operation information can be determined in the long to-be-processed document with multiple operation names, the reference text of the operation names is prevented from being wrongly judged as the operation information, and the operation information is effectively extracted. The directed tree is constructed according to the visual characteristics (line number, first line indentation distance and paragraph) of the sentence in the document to be processed so as to determine the hierarchical relationship among the operation names, so that the document sources which can not be analyzed by paragraph structure logic, such as a portable document format document, a scanned picture document and the like, can be processed, and the document range of the operation knowledge which can be extracted is enlarged.
Based on the foregoing embodiments, an embodiment of the present application provides an operation information determining device, which may be used in the operation information determining method provided in the corresponding embodiment of fig. 1-2, and with reference to fig. 7, the operation information determining device 3 may include: a processor 31, a memory 32, and a communication bus 33, wherein:
the communication bus 33 is used for realizing communication connection between the processor 31 and the memory 32;
the processor 31 is configured to execute the operation information determination program in the memory 32 to implement the following steps:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word;
performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed;
determining a target operation name based on the first word and the second word;
and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
In other embodiments of the present application, the processor 31 is configured to execute the operation information determination program in the memory 32 to implement the following steps:
acquiring a text to be processed, and determining a first sentence from the text to be processed;
acquiring part-of-speech associated parameters of a first sentence;
screening the first statement to obtain a target statement set based on the part-of-speech associated parameters of the first statement;
and determining an operation specification mapping table of the text to be processed based on a second sentence in the target sentence set.
In other embodiments of the present application, the processor 31 is configured to execute the operation information determining program in the memory 32 to determine the first sentence from the text to be processed, so as to implement the following steps:
determining sentences in the text to be processed, and determining the parts of speech of words of the sentences in the text to be processed;
and obtaining the sentence with the verb and the noun from the sentence in the text to be processed to obtain a first sentence.
In other embodiments of the present application, the processor 31 is configured to execute the operation information determination program in the memory 32 to obtain the part-of-speech associated parameter of the first sentence, so as to implement the following steps:
acquiring words in the first sentence, and constructing a dependency syntax analysis tree based on the words in the first sentence;
based on the dependency parsing tree, a part-of-speech associated parameter of the first sentence is determined.
In other embodiments of the present application, the processor 31 is configured to execute the part-of-speech related parameters of the operation information determination program in the memory 32 based on the first statement, and filter the first statement to obtain the target statement set, so as to implement the following steps:
determining a third word from the words of the first sentence based on the part-of-speech associated parameters; the part of speech of the third word is a verb, and the first sentence does not have a part of speech incidence relation pointing to the third word; a word having a guest-moving relationship with the third word exists in the first sentence, and a word having a major-minor relationship with the third word does not exist in the first sentence;
determining a third sentence from the first sentence based on the sentence corresponding to the third word;
and determining a target sentence set from the third sentence based on the position information of the third sentence in the text to be processed.
In other embodiments of the present application, the processor 31 is configured to execute the operation information determination program in the memory 32, and determine the target sentence set from the third sentence based on the position information of the third sentence in the text to be processed, so as to implement the following steps:
acquiring the line number of each third sentence in the text to be processed, the indentation distance of the first line of the paragraph where each third sentence is located and the paragraph number where each third sentence is located;
determining a directional relation between a fourth sentence and the fourth sentence from the third sentence based on the first line indentation distance, the line number and the paragraph number;
constructing a directed tree of the fourth sentence based on the directional relation between the fourth sentences;
determining a hierarchical relationship between the fourth sentences based on the directed tree;
and determining a target sentence set based on the hierarchical relation and the fourth sentence.
In other embodiments of the present application, the processor 31 is configured to execute the hierarchical relationship-based and fourth statement of the operation information determination program in the memory 32 to determine the target statement set, so as to implement the following steps:
marking each node in the directed tree as a first mark;
for each directed tree, determining an ith node with a first label, an mth node with the first label and an nth node with the first label based on the hierarchical relationship; wherein the hierarchy of the mth node is greater than the hierarchy of the ith node; the hierarchy of the nth node is the same as the hierarchy of the ith node; wherein i, m and n are positive integers;
aiming at each directed tree, updating the nodes in each directed tree based on the statements corresponding to the ith node, the statements corresponding to the mth node and the statements corresponding to the nth node to determine a plurality of target directed trees;
and determining a target statement set based on statements corresponding to the nodes of the target directed trees.
In other embodiments of the present application, the processor 31 is configured to execute the operation information determination program in the memory 32, and update the nodes in each directed tree based on the statement corresponding to the ith node, the statement corresponding to the mth node, and the statement corresponding to the nth node to determine a plurality of target directed trees, including:
determining the first vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the mth node;
determining the second vocabulary sharing degree of the words of the sentence corresponding to the nth node and the words of the sentence corresponding to the mth node;
determining a third vocabulary sharing degree based on the first vocabulary sharing degree and the second vocabulary sharing degree;
determining the fourth vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the parent node of the ith node;
updating nodes in the directed tree based on the third vocabulary sharing degree and the fourth vocabulary sharing degree, and determining a target directed tree; and the statement corresponding to the node of the target directed tree is a second statement.
In other embodiments of the present application, the processor 31 is configured to execute a second sentence in the target sentence based on the operation information determination program in the memory 32, and determine an operation specification mapping table of the text to be processed, so as to implement the following steps:
determining nodes to be selected with the same sentence from the target directed trees, and determining the number of descendant nodes of the nodes to be selected;
determining a target node with the largest number of descendant nodes from the nodes to be selected;
constructing a corresponding relation between a statement corresponding to the target node and an identifier of the statement corresponding to a descendant node of the target node to obtain an operation description mapping table; the statement corresponding to the target node in the operation description mapping table represents an operation name; and identifying the position of the operation information corresponding to the representation operation name in the operation description mapping table.
In other embodiments of the present application, the processor 31 is configured to execute an operation specification mapping table-based operation information determining program in the memory 32, and determine operation information of information to be queried from text to be processed, so as to implement the following steps:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a second word;
segmenting the operation names in the operation description mapping table to obtain a third word of each operation name;
determining the word with the highest matching degree with the second word from the third words, and determining the target operation name corresponding to the word with the highest matching degree;
and acquiring target operation information from the text to be processed based on the target operation name and the operation specification mapping table.
It should be noted that, for a specific implementation process of the steps executed by the processor in this embodiment, reference may be made to an implementation process in the operation information determining method provided in the embodiment corresponding to fig. 1-2, and details are not described here again.
The operation information determining device provided by the embodiment of the application determines the target operation information of the information to be queried according to the operation description mapping table, considers the distribution of the target operation information in the text to be processed, does not need to extract the operation information only by a whole segment of characters to determine the target operation information in the related art, and improves the accuracy rate of determining the target operation information and the efficiency of determining the target operation information.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the operation information determination method provided by the corresponding embodiments of fig. 1-2.
The computer-readable storage medium may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), and the like; and may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A method of determining operational information, the method comprising:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word;
performing word segmentation on the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed;
determining a target operation name based on the first word and the second word;
and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
2. The method of claim 1, further comprising:
acquiring a text to be processed, and determining a first sentence from the text to be processed;
acquiring part-of-speech associated parameters of the first statement;
screening the first statement to obtain a target statement set based on the part-of-speech associated parameters of the first statement;
and determining an operation specification mapping table of the text to be processed based on a second sentence in the target sentence set.
3. The method of claim 2, wherein the determining a first sentence from the text to be processed comprises:
determining sentences in the text to be processed, and determining the parts of speech of the words of the sentences in the text to be processed;
and obtaining the sentence with the verb and the noun from the sentence in the text to be processed to obtain the first sentence.
4. The method according to claim 2, wherein the obtaining part-of-speech associated parameters of the first sentence comprises:
obtaining words in the first sentence, and constructing a dependency syntax analysis tree based on the words in the first sentence;
based on the dependency parsing tree, determining a part-of-speech associated parameter of the first sentence.
5. The method of claim 2, wherein the filtering the first sentence to obtain a target sentence set based on the part-of-speech relevance parameter of the first sentence comprises:
determining a third word from the words of the first sentence based on the part-of-speech associated parameters; the part of speech of the third word is a verb, and the first sentence does not have a part of speech incidence relation pointing to the third word; a word having a move-guest relationship with the third word exists in the first sentence, and a word having a main-predicate relationship with the third word does not exist;
determining a third sentence from the first sentence based on the sentence corresponding to the third word;
determining the target sentence set from the third sentence based on the position information of the third sentence in the text to be processed.
6. The method of claim 5, wherein the determining the set of target sentences from the third sentence based on the position information of the third sentence in the text to be processed comprises:
acquiring the line number of each third sentence in the text to be processed, the first line indentation distance of the paragraph where each third sentence is located and the paragraph number where each third sentence is located;
determining a directional relation between a fourth sentence and the fourth sentence from the third sentence based on the first line indentation distance, the line number and the paragraph number;
constructing a directed tree of the fourth sentence based on the directional relation between the fourth sentences;
determining a hierarchical relationship between the fourth sentences based on the directed tree;
determining the target sentence set based on the hierarchical relationship and the fourth sentence.
7. The method of claim 6, wherein determining the set of target statements based on the hierarchical relationship and the fourth statement comprises:
marking each node in the directed tree as a first mark;
for each directed tree, determining an ith node having a first label, an mth node having a first label, and an nth node having a first label based on the hierarchical relationship; wherein the hierarchy of the mth node is greater than the hierarchy of the ith node; the level of the nth node is the same as the level of the ith node; wherein i, m and n are positive integers;
for each directed tree, updating the nodes in each directed tree based on the statements corresponding to the ith node, the statements corresponding to the mth node and the statements corresponding to the nth node to determine a plurality of target directed trees;
determining the target statement set based on statements corresponding to nodes of the plurality of target directed trees.
8. The method according to claim 7, wherein for each directed tree, updating the nodes in each directed tree based on the statement corresponding to the ith node, the statement corresponding to the mth node, and the statement corresponding to the nth node to determine a plurality of target directed trees, includes:
determining the word of the sentence corresponding to the ith node and the first vocabulary sharing degree of the word of the sentence corresponding to the mth node;
determining a second vocabulary sharing degree of the words of the sentence corresponding to the nth node and the words of the sentence corresponding to the mth node;
determining a third vocabulary sharing degree based on the first vocabulary sharing degree and the second vocabulary sharing degree;
determining a fourth vocabulary sharing degree of the words of the sentence corresponding to the ith node and the words of the sentence corresponding to the parent node of the ith node;
updating nodes in the directed tree based on the third vocabulary sharing degree and the fourth vocabulary sharing degree, and determining the target directed tree; and the statement corresponding to the node of the target directed tree is the second statement.
9. The method of claim 8, wherein determining the operation specification mapping table of the text to be processed based on the second sentence in the target sentence set comprises:
determining nodes to be selected with the same sentence from a plurality of target directed trees, and determining the number of descendant nodes of the nodes to be selected;
determining a target node with the largest number of descendant nodes from the nodes to be selected;
constructing a corresponding relation between the statement corresponding to the target node and the identifier of the statement corresponding to the descendant node of the target node to obtain an operation description mapping table; the statement corresponding to the target node in the operation specification mapping table represents the operation name; and the identifier in the operation description mapping table represents the operation information corresponding to the operation name.
10. An operation information determination device characterized by comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the operation information determination program in the memory to realize the following steps:
receiving information to be queried, and performing word segmentation processing on the information to be queried to obtain a first word;
segmenting the operation names in the operation description mapping table to obtain a second word of each operation name; the operation description mapping table represents the relationship between the operation name and the operation information in the text to be processed;
determining a target operation name based on the first word and the second word;
and determining target operation information of the information to be inquired from the text to be processed based on the target operation name and the operation description mapping table, and outputting the target operation information.
CN202110904172.1A 2021-08-06 2021-08-06 Operation information determination method and device Pending CN115705351A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110904172.1A CN115705351A (en) 2021-08-06 2021-08-06 Operation information determination method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110904172.1A CN115705351A (en) 2021-08-06 2021-08-06 Operation information determination method and device

Publications (1)

Publication Number Publication Date
CN115705351A true CN115705351A (en) 2023-02-17

Family

ID=85178534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110904172.1A Pending CN115705351A (en) 2021-08-06 2021-08-06 Operation information determination method and device

Country Status (1)

Country Link
CN (1) CN115705351A (en)

Similar Documents

Publication Publication Date Title
CN109726293B (en) Causal event map construction method, system, device and storage medium
CN106649783B (en) Synonym mining method and device
CN106570180B (en) Voice search method and device based on artificial intelligence
CN112417885A (en) Answer generation method and device based on artificial intelligence, computer equipment and medium
CN111444330A (en) Method, device and equipment for extracting short text keywords and storage medium
CN112215008A (en) Entity recognition method and device based on semantic understanding, computer equipment and medium
CN108399157B (en) Dynamic extraction method of entity and attribute relationship, server and readable storage medium
JP2008083952A (en) Dictionary creation support system, method and program
CN110929520B (en) Unnamed entity object extraction method and device, electronic equipment and storage medium
CN110096599B (en) Knowledge graph generation method and device
JP2007334534A (en) Apparatus and method for inputting character string, and program
CN113850080A (en) Rhyme word recommendation method, device, equipment and storage medium
Vila et al. Relational paraphrase acquisition from Wikipedia: The WRPA method and corpus
JP4431759B2 (en) Unregistered word automatic extraction device and program, and unregistered word automatic registration device and program
CN107908792B (en) Information pushing method and device
CN110888940A (en) Text information extraction method and device, computer equipment and storage medium
CN115796177A (en) Method, medium and electronic device for realizing Chinese word segmentation and part-of-speech tagging
JP5112027B2 (en) Document group presentation device and document group presentation program
CN114385819B (en) Environment judicial domain ontology construction method and device and related equipment
CN115705351A (en) Operation information determination method and device
CN115169370A (en) Corpus data enhancement method and device, computer equipment and medium
US20210073258A1 (en) Information processing apparatus and non-transitory computer readable medium
CN112765963A (en) Sentence segmentation method and device, computer equipment and storage medium
CN112182235A (en) Method and device for constructing knowledge graph, computer equipment and storage medium
Seresangtakul et al. Thai-Isarn dialect parallel corpus construction for machine translation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination