CN109670033A - Search method, device, equipment and the storage medium of content - Google Patents

Search method, device, equipment and the storage medium of content Download PDF

Info

Publication number
CN109670033A
CN109670033A CN201910101810.9A CN201910101810A CN109670033A CN 109670033 A CN109670033 A CN 109670033A CN 201910101810 A CN201910101810 A CN 201910101810A CN 109670033 A CN109670033 A CN 109670033A
Authority
CN
China
Prior art keywords
node
attribute
searching keyword
semantic
subtree
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.)
Granted
Application number
CN201910101810.9A
Other languages
Chinese (zh)
Other versions
CN109670033B (en
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.)
Qingdao Hisense Electronics Co Ltd
Original Assignee
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics Co Ltd
Priority to CN201910101810.9A priority Critical patent/CN109670033B/en
Publication of CN109670033A publication Critical patent/CN109670033A/en
Application granted granted Critical
Publication of CN109670033B publication Critical patent/CN109670033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The search method of content provided by the invention, device, equipment and storage medium, this method, it include: reception inquiry request, the inquiry request includes the query statement of user's input, query statement is pre-processed, obtain the corresponding Words ' Attributes list of inquiry request, it include at least one searching keyword and the corresponding attribute of each searching keyword in query statement in the Words ' Attributes list, and according to Words ' Attributes list, construct semantic tree, node in the semantic tree is made of the searching keyword in the Words ' Attributes list, query language is generated according to semantic tree, it is inquired according to query language and obtains the corresponding content of inquiry request, it realizes and is docked from the function of different search systems, it completes to complicated and the unsharp query statement of structure search inquiry, in turn, it provides and accurately replies content, it improves User experience.

Description

Search method, device, equipment and the storage medium of content
Technical field
The present invention relates to technical field of intelligent interaction more particularly to a kind of search method of content, device, equipment and storages Medium.
Background technique
With the development of intelligent terminal, user is set using the terminal of the intelligence such as mobile phone, tablet computer, intelligent TV set The standby query and search for carrying out content is also gradually popularized.
In the retrieval mode of currently used content, user by operating on the terminal device, input inquiry sentence, Search engine carries out matching retrieval according to the content of text of the query statement of input, needs search engine and knowledge from downstream Inquiry obtains the corresponding answer content of content of text in library, and answer content is then returned to terminal device and is shown.
However, the above-mentioned this scheme retrieved using text matches, query statement it is complicated or when structure is unintelligible without Method returns to query result, and the program depends on downstream search engine and knowledge base, is unable to flexible Application in each inquiry system.
Summary of the invention
The present invention provides search method, device, equipment and the storage medium of a kind of content, for realizing of complicated sentence With retrieval, each inquiry system can be flexibly applied to.
First aspect present invention provides a kind of search method of content, which comprises
Inquiry request is received, the inquiry request includes the query statement of user's input;
The query statement is pre-processed, the corresponding Words ' Attributes list of the inquiry request, the word are obtained It include at least one searching keyword and the corresponding attribute of each searching keyword in the query statement in attribute list;
According to the Words ' Attributes list, semantic tree is constructed, the node in the semantic tree is by the Words ' Attributes list In searching keyword composition;
Query language is generated according to the semantic tree;
The corresponding content of the inquiry request is obtained according to query language inquiry.
It is described that the query statement is pre-processed in a kind of concrete implementation mode, obtain the inquiry request Corresponding Words ' Attributes list, comprising:
Word segmentation processing and attribute labeling are carried out to the query statement based on default dictionary, it is corresponding to obtain the query statement At least one searching keyword and each searching keyword attribute, comprising matching with scene in the default dictionary Fine granularity attribute labeling;
According at least one corresponding searching keyword of the query statement and the attribute of each searching keyword, generate The Words ' Attributes list.
It is described according to the Words ' Attributes list in a kind of concrete implementation mode, construct semantic tree, comprising:
According to preset node type, node class belonging to each searching keyword in the Words ' Attributes list is obtained Type;
According to each node type, corresponding semantic subtree is constructed;
According to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined;
According to described hierarchical relationship, semantic subtree is merged, constructs semantic tree.
Further, described according to each node type, construct corresponding semantic subtree, comprising:
If first node type includes at least one searching keyword, the root node of the semantic subtree of creation first;
The corresponding searching keyword of the first node type is added to the root node of the described first semantic subtree, as The leaf node of described first semantic subtree.
Further, before the root node of the semantic subtree of the creation first, further includes:
If the first node type includes more attribute nodes, according to the corresponding searching keyword of the more attribute nodes Afterwards and/or node type belonging to preceding searching keyword, second node type belonging to more attribute nodes is determined, and will More attribute nodes are determined as the attribute node of the second node type;
Wherein, the corresponding searching keyword of more attribute nodes belongs at least two node types.
In a kind of concrete implementation mode, if the inquiry request is used to inquire film, each searching keyword Attribute includes following any attribute: people entities word, film title, at least one film modifies attribute, at least one personage repairs Adorn attribute;
The node type includes at least one of personage's node, film node, character attribute node, film attribute node.
Optionally, the acquisition inquiry request, comprising:
Receive the inquiry request of user's input;
Alternatively,
Acquisition obtains the voice of user, and carries out voice recognition processing to the voice, obtains the inquiry request.
Further, the method also includes:
Push the corresponding content of the inquiry request.
Second aspect of the present invention provides a kind of retrieval device of content, and described device includes:
Receiving module, for receiving inquiry request, the inquiry request includes the query statement of user's input;
Processing module is used for:
The query statement is pre-processed, the corresponding Words ' Attributes list of the inquiry request, the word are obtained It include at least one searching keyword and the corresponding attribute of each searching keyword in the query statement in attribute list;
According to the Words ' Attributes list, semantic tree is constructed, the node in the semantic tree is by the Words ' Attributes list In searching keyword composition;
Query language is generated according to the semantic tree;
The corresponding content of the inquiry request is obtained according to query language inquiry.
In a kind of concrete implementation mode, the processing module is specifically used for:
Word segmentation processing and attribute labeling are carried out to the query statement based on default dictionary, it is corresponding to obtain the query statement At least one searching keyword and each searching keyword attribute, comprising matching with scene in the default dictionary Fine granularity attribute labeling;
According at least one corresponding searching keyword of the query statement and the attribute of each searching keyword, generate The Words ' Attributes list.
In a kind of concrete implementation mode, the processing module is specifically used for:
According to preset node type, node type belonging to each searching keyword in the Words ' Attributes list is obtained;
According to each node type, corresponding semantic subtree is constructed;
According to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined;
According to described hierarchical relationship, semantic subtree is merged, constructs semantic tree.
Further, the processing module is specifically used for:
If first node type includes at least one searching keyword, the root node of the semantic subtree of creation first;
The corresponding searching keyword of the first node type is added to the root node of the described first semantic subtree, as The leaf node of described first semantic subtree.
Further, before the root node of the semantic subtree of the creation first, the processing module is also used to:
If the first node type includes more attribute nodes, according to the corresponding searching keyword of the more attribute nodes Afterwards and/or node type belonging to preceding searching keyword, second node type belonging to more attribute nodes is determined, and will More attribute nodes are determined as the attribute node of the second node type;
Wherein, the corresponding searching keyword of more attribute nodes belongs at least two node types.
In a kind of concrete implementation mode, if the inquiry request is used to inquire film, each searching keyword Attribute includes following any attribute: people entities word, film title, at least one film modifies attribute, at least one personage repairs Adorn attribute;
The node type includes at least one of personage's node, film node, character attribute node, film attribute node.
Optionally, the acquisition module is specifically used for:
Receive the inquiry request of user's input;
Alternatively,
Acquisition obtains the voice of user, and carries out voice recognition processing to the voice, obtains the inquiry request.
Further, described device further include:
Pushing module, for pushing the corresponding content of the inquiry request.
Third aspect present invention provides a kind of terminal device, comprising:
Processor, memory, receiver and transmitter;
Memory is for storing program and data, and the processor calls the program of memory storage, to execute first party The search method of the described in any item contents in face.
Fourth aspect present invention provides a kind of computer readable storage medium, and the computer readable storage medium includes journey Sequence, described program is when being executed by processor for executing the search method of the described in any item contents of first aspect.
Search method, device, equipment and the storage medium of a kind of content provided in an embodiment of the present invention, by receive include The inquiry request of the query statement of user's input, pre-processes query statement, obtains the corresponding Words ' Attributes of inquiry request List constructs semantic tree according to Words ' Attributes list, and the node in the semantic tree is closed by the inquiry in the Words ' Attributes list Keyword composition generates query language according to semantic tree, and is inquired according to query language and obtain the corresponding content of inquiry request, realizes It is complicated or when structure is unintelligible in query statement, it is inquired query statement and is returned accurate query result, improved User experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow diagram of the search method embodiment one of content provided by the invention;
Fig. 2 is the flow diagram of the search method embodiment two of content provided by the invention;
Fig. 3 is the flow diagram of the search method embodiment three of content provided by the invention;
Fig. 4 is the flow diagram of the search method example IV of content provided by the invention;
Fig. 5 is the structural schematic diagram of the semantic tree of the search method of content provided by the invention;
Fig. 6 is the structural schematic diagram of the retrieval Installation practice one of content provided by the invention;
Fig. 7 is the structural schematic diagram of the retrieval Installation practice two of content provided by the invention;
Fig. 8 is the hardware structural diagram of terminal device provided by the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The executing subject of the search method of content provided by the present application is a kind of terminal device, which includes hand Machine, tablet computer, smart television, intelligent wearable device etc., user can pass through touch screen, mouse, voice acquisition device (example Such as microphone), wait input equipments to be operated on interface.
Fig. 1 is the flow diagram of the search method embodiment one of content provided by the invention.As shown in Figure 1, the content Search method the following steps are included:
S101: inquiry request is received.
Terminal device receives inquiry request, the i.e. query statement of reception user input and/or inquiry enabled instruction.It is optional , receiving inquiry request can be the inquiry request for receiving user's input, or the voice of acquisition user, and carry out to the voice Voice recognition processing obtains inquiry request.Corresponding, the query statement for receiving user's input, which can be, receives looking into for user's input Sentence is ask, is also possible to acquire the voice of user, and carry out voice recognition processing to the voice, obtains query statement.
S102: pre-processing query statement, obtains the corresponding Words ' Attributes list of inquiry request.
To query statement carry out pretreatment include: query statement is segmented, word identification, attribute labeling.This programme institute Participle, the word of use identify, the method for attribute labeling includes the fine-grained segmenting method and attribute defined according to dictionary is preset Mark, wherein default dictionary is the dictionary or customized dictionary being arranged according to the application scenarios of different field.For example, current Terminal device in application scenarios is specially smart television, and the field of query object is film related fields, then will be according to film Entity (videoEntity), also referred to as film title (videoTitle), people entities word (characterEntity), at least One film modifies attribute, comprising: movie category (videoCategory), film theme (videoObject), film subject matter (videoMaterial), it directs (direct) and at least one personage modifies attribute, comprising: performer (actor), constellation (constellation), the classifications such as gender (sex), national (country) segment query statement, word identifies and attribute Mark, obtains searching keyword and the corresponding attribute of each searching keyword, and according to searching keyword and corresponding attribute, Form Words ' Attributes list.
In a kind of concrete implementation mode, if the query statement of user's input is the " love of South Korea Aquarius actress Pieces ", by participle after word segment be [South Korea, Aquarius, female, performer, love, pieces], and then by word identify The word segment obtained afterwards be [South Korea, Aquarius, female, performer, love, film], and the word segment point after word is identified Not carry out attribute labeling, for example, South Korea-country, Aquarius-constellation, female-sexFemale, performer- CharacterEntity ,-auxiliary, love-videoMaterial, film-videoEntity.
And according to searching keyword and corresponding attribute, formed Words ' Attributes list (wordSegmentLsit):
In a kind of concrete implementation mode, Words ' Attributes list further includes the corresponding index bit of searching keyword, the rope Drawing position is sequentially to be marked according to position of the searching keyword in query statement, specifically, by taking above-mentioned searching keyword as an example, The index bit of the searching keyword of query statement " the love pieces of South Korea Aquarius actress " can be respectively labeled as: South Korea -0, Aquarius -1, female -2, and performer -3, -4, love -5, film -6.
S103: according to Words ' Attributes list, semantic tree is constructed.
In this step, multiple node types can be set for different application scenarios or inquiry field, and according to The corresponding attribute of searching keyword in Words ' Attributes list, according to the attribute and node type of searching keyword predetermined Mapping relations, searching keyword is assigned under different nodes, by each node construct semantic tree, it is understood that be language Node in justice tree is made of the searching keyword in Words ' Attributes list.
It is settable five kinds following if current scene is the inquiry scene for film in a kind of concrete implementation mode Node type: personage's node (characterNode), film node (videoNode), character attribute node (characterAttribute), film attribute node (videoAttribute), film or character attribute (bothAttrbute) node.Correspondingly, the attribute of searching keyword predetermined and the mapping relations of node type include: Film subject matter is corresponding with film attribute node, and country is corresponding with film or character attribute node, constellation and character attribute node pair It answering, women is corresponding with character attribute node, and people entities are corresponding with personage's node, and film entity is corresponding with film node, for example, [<videoMaterial,videoAttribute>,<country,bothAttrbute>,<constellation, characterAttribute>,<sexFemale,characterAttribute>,<characterEntity, characterNode>,<videoEntity,videoNode>]。
Specifically, the structure definition of each node of semantic tree includes: searching keyword, the corresponding category of searching keyword Property, the corresponding index bit of searching keyword, scope identifier (for example including above, below, none, range), finally, by more A node constructs semantic tree, also referred to as semantic tree list.
For example, by each node structure of semantic tree is defined as:
Correspondingly, semantic tree list are as follows:
characterNodeList:
[segWordStr: performer,
wordAttrs:characterEntity,
wordIndex:3,
rangeFlag:none,
nodeType:characterNode}]
videoNodeList:
[segWordStr: film,
wordAttrs:videoEntity,
wordIndex:6,
rangeFlag:none,
nodeType:videoAttribute}]
CharacterAttributeList:
[segWordStr: Aquarius,
WordAttrs:constellation,
wordIndex:1,
rangeFlag:none,
nodeType:characterAttribute},
SegWordStr: female,
WordAttrs:sexFemale,
wordIndex:2,
rangeFlag:none,
nodeType:}]
videoAttributeList:
[segWordStr: love,
wordAttrs:videoMaterial,
wordIndex:5,characterAttribute
rangeFlag:none,
nodeType:videoAttribute}]
:
[segWordStr: South Korea,
wordAttrs:country,
wordIndex:0,
rangeFlag:none,
nodeType:bothAttrbute}]
S104: query language is generated according to semantic tree.
In this step, by parsing semantic tree, customized query process is constructed, i.e., according to the different search of docking System analysis semantic tree generates corresponding query language.
Preferably, this programme chooses knowledge mapping and provides retrieval for knowledge question, including, according to the inquiry scene in film The semantic tree of middle building, judges the depth of the semantic tree, and depth probable value is 1,2,3;If the depth of semantic tree is 1, Search invalid, into recommended flowsheet, for example, recommending 5 different types of films at random;If the depth of semantic tree is greater than 1, It parses semantic tree from bottom to top according to node type and generates query language.
S105: it is inquired according to query language and obtains the corresponding content of inquiry request.
In a kind of concrete implementation mode, Fig. 2 is the process of the search method embodiment two of content provided by the invention Schematic diagram, as shown in Fig. 2, if query statement is " the love pieces of South Korea Aquarius actress ", extremely by step S101 S104, according to query language and the resolution path of generation, obtaining the corresponding content of the inquiry request is film 1 and film 5.
The search method of content provided in this embodiment includes the inquiry request of query statement, to inquiry based on the received Sentence is pre-processed, and obtains searching keyword and the corresponding attribute of searching keyword to get the corresponding word of inquiry request is arrived Language attribute list, and searching keyword is ranged according to the corresponding attribute of searching keyword in Words ' Attributes list by different sections Under point, to construct semantic tree, each node of semantic tree is parsed from bottom to top, and corresponding inquiry is generated according to different search systems Language, and the corresponding content of inquiry request is finally obtained according to query language, it realizes and is docked from the function of different search systems, It completes that complicated and the unsharp query statement of structure search inquiry in turn, is provided and accurately replies content, improved and use Family experience.
On the basis of Fig. 1 and embodiment illustrated in fig. 2, Fig. 3 is the search method embodiment three of content provided by the invention Flow diagram.It, can be with as shown in figure 3, for according to Words ' Attributes list builder semantic tree in the search method of the content The following steps are included:
First, it should be appreciated that this programme generates a semantic tree, also referred to as language for each inquiry request of user's input Justice tree list, correspondingly, the node in semantic tree is also referred to as node listing.
S201: according to preset node type, node belonging to each searching keyword in Words ' Attributes list is obtained Type.
According to the corresponding attribute of searching keyword each in Words ' Attributes list, according to searching keyword predetermined The mapping relations of attribute and node type obtain the node type of each searching keyword in Words ' Attributes list.
In a kind of concrete implementation mode, if current scene is the inquiry scene for film, settable node class Type includes: personage's node (characterNode), film node (videoNode), character attribute node (characterAttribute), film attribute (videoAttribute) node, film or character attribute (bothAttrbute) node etc..
S202: according to each node type, corresponding semantic subtree is constructed.
In this step, semantic subtree corresponding to the creation of each node type, node type and semantic subtree are one by one Corresponding relationship.
In a kind of concrete implementation mode, if it includes that at least one inquiry is crucial that this step, which includes: first node type, Word then creates the root node of the first semantic subtree, and the corresponding searching keyword of the first node type is added to described The root node of first semantic subtree, the leaf node as the described first semantic subtree.
Further, if the terminal device in current application scene is specially smart television, the field of query object is shadow Piece related fields, then node type include: personage's node (characterNode), film node (videoNode), personage belong to Property node (characterAttribute), film attribute (videoAttribute) node, film or character attribute (bothAttrbute) node etc., in this step, it is assumed that first node is personage's node, if including at least one in personage's node A searching keyword, then the root node of founder's story foster son tree (i.e. first semantic subtree), and personage's node is corresponding every A searching keyword is added to the root node of the people story foster son tree, as multiple leaf nodes of personage's semanteme subtree, i.e., complete The building of adult story foster son tree.
S203: according to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined.
Determine the modification between every two semanteme subtree and be modified relationship, by be used for modify semantic subtree be determined as by The semantic subtree of next level of the semantic subtree of modification.
In a kind of concrete implementation mode, this programme provides a kind of preferred scheme and realizes according to each semantic subtree Modified relationship determines the hierarchical relationship between semanteme subtree: determining the corresponding searching keyword of each node in semanteme subtree The maximum value (maxIndex) of index bit, the size of the maxIndex value of more each semanteme subtree, maxIndex value are greatly The semantic subtree being modified, it is semantic subtree for modification that maxIndex value is small.
S204: according to described hierarchical relationship, merging semantic subtree, constructs semantic tree.
According to the hierarchical relationship between semantic subtree each of determining in S203 step, the semantic subtree of next level is added It is added under the root node of semantic subtree of a level, completes the merging of multiple semantic subtrees, i.e. building semantic tree.
Method provided in this embodiment according to Words ' Attributes list builder semantic tree, comprising: according to preset node class Type obtains node type belonging to each searching keyword in the Words ' Attributes list, according to each node type, building Corresponding semanteme subtree determines the hierarchical relationship between semanteme subtree, and according to institute according to the modified relationship of each semantic subtree Hierarchical relationship is stated, semantic subtree is merged, constructs semantic tree, it can be achieved that in different application scenarios and different necks Domain constructs different semantic trees according to inquiry request, in order to further by the parsing to semantic tree from bottom to top, realize It is provided for inquiry request and accurately replies content.
Further, in the search method of content provided by the invention, node type further includes more attribute nodes, specifically , if some searching keyword simultaneously belong to multiple node types, fix tentatively the searching keyword be more attribute nodes, need into One step determines node type belonging to the searching keyword, therefore, semantic in creation first in order to complete the building of semantic tree Before the root node of subtree, further includes: if first node type includes more attribute nodes, looked into according to more attribute nodes are corresponding Ask keyword after and/or preceding searching keyword belonging to node type, determine second node class belonging to more attribute nodes Type, and more attribute nodes are determined as to the attribute node of second node type, it should be appreciated that second node type can be first Node type is also possible to other node types.
According to after the corresponding searching keyword of more attribute nodes and/or node type belonging to preceding searching keyword, really Second node type belonging to fixed more attribute nodes, optionally, however, it is determined that after the corresponding searching keyword of more attribute nodes Searching keyword belongs to second node type, then more attribute nodes belong to second node type, if more attribute nodes are corresponding The node type of searching keyword after searching keyword can not be determined or be closed after more attribute nodes without other inquiries Keyword, it is determined that node type belonging to the searching keyword before the corresponding searching keyword of more attribute nodes, and by the node Type is determined as second node type belonging to more attribute nodes.
In a kind of concrete implementation mode, Fig. 4 is the process of the search method example IV of content provided by the invention Schematic diagram, as shown in figure 4, the field of query object is shadow if the terminal device in current application scene is specially smart television Piece related fields, the then main flow for constructing semantic tree are as follows:
If 1, film node listing (videoNodeList) or film attribute node list (videoAttributeList) it is not sky, then creates the film root node (treeOfVideo) of semantic tree.
If 2, personage's node listing (characterNodeList) or character attribute node listing (characterAttributeList) it is not sky, then creates personage's root node (treeOfCharacter) of semantic tree.
If 3, the list of film attribute node is not empty, all searching keywords in film attribute node list are added Leaf node is used as on to film root node.
If 4, character attribute node listing is not empty, all searching keywords in character attribute node listing are added Leaf node is used as on to personage's root node.
If 5, film or character attribute node listing are not empty, for each of film or character attribute node listing Searching keyword:
A, the corresponding index bit of searching keyword (wordIndex) in present node is obtained, it should be understood that inquiry is closed The corresponding index bit of keyword is also the index bit of node belonging to the searching keyword.
B, for each node (i.e. index bit indicated with wordIndex+ node) after present node, if The corresponding attribute of the node of the position wordIndex+ (nodeType) is film node (videoNode) or film attribute node (videoAttribute), then present node is added on film root node as leaf node;Else if wordIndex The nodal community (nodeType) of+position is personage's node (characterNode) or film attribute node (characterAttribute), then present node is added on personage's root node as leaf node.
If c, node is not suspended to any root node, for (being used immediately following each node before present node The node that wordIndex- is indicated), if the nodal community (nodeType) of the position wordIndex- is film node (videoNode), then present node is added on film root node as leaf node;Else if the position wordInde- Nodal community (nodeType) be personage's node (characterNode), then present node is added on personage's root node As leaf node.
If d, node is not suspended to any root node, present node was both added on personage's root node as leaf section Point is also added on film root node as leaf node.
If 6, film root node is sky, and task root node is not sky, then returns to personage's root node and personage's root node On leaf node, as building semantic tree;
Otherwise, if film root node is not empty, and personage's root node is sky, then returns to film root node and film root section Leaf node on point, as building semantic tree;
Otherwise, if film root node is not sky, personage's root node is also not sky, then judges maximum in film node listing The value of maximum index bit (maxCharacterIndex) in the value and personage's node listing of index bit (maxVideoIndex), Compare the size of the two: if maxVideoIndex is greater than maxCharacterIndex, by personage's subtree (treeOfCharacterIndex) subtree as film subtree (treeOfVideo) is suspended under film root node and returns;It is no Then, if maxVideoIndex is less than maxCharacterIndex, people is suspended to using film subtree as the subtree of personage's subtree It is returned under object root node.
It 7, is personage's root node addition inquiry attribute.
If a, personage's subtree depth is in 3 or character attribute node listing comprising entities personages such as cast, direct Attribute node then enters step b
If b, inquiry attribute of the query statement of user's input comprising interrogative and interrogative is that personage modifies attribute, Inquiry attribute-bit is added for personage's root node
Specifically, constructed according to the above exemplary embodiments offer according to the method for Words ' Attributes list builder semantic tree Semantic tree construction is as shown in Figure 5.
The search method of content provided in this embodiment obtains in Words ' Attributes list according to preset node type The corresponding node type of each searching keyword, and according to the node type of each searching keyword, building is for expressing inquiry The semantic tree of the hierarchical relationship of intention, each node in the semantic tree is by a searching keyword in the Words ' Attributes list It forming, the relationship between superior and subordinate between node is determined according to the modified relationship between searching keyword, the building of semantic tree is realized, So that this programme is docked with multiple search systems, complete to generate query language and finally obtains the corresponding content of inquiry request.
The search method for the content that this programme provides further include: the corresponding content of push inquiry request, optionally, push Mode can be to be shown by the display device of terminal device, be can be and is carried out voice by the voice device of terminal device Casting;It is also possible to be sent to other external equipments and carries out display or voice broadcast;If the corresponding content of inquiry request is shadow Piece can directly carry out movie playback.
Fig. 6 is the structural schematic diagram of the retrieval Installation practice one of content provided by the invention, as shown in fig. 6, the device 10 include:
Receiving module 11: for receiving inquiry request, the inquiry request includes the query statement of user's input;
Processing module 12: it is used for:
The query statement is pre-processed, the corresponding Words ' Attributes list of the inquiry request, the word are obtained It include at least one searching keyword and the corresponding attribute of each searching keyword in the query statement in attribute list;
According to the Words ' Attributes list, semantic tree is constructed, the node in the semantic tree is by the Words ' Attributes list In searching keyword composition;
Query language is generated according to the semantic tree;
The corresponding content of the inquiry request is obtained according to query language inquiry.
The retrieval device of content provided in this embodiment, including module and processing module are obtained, for according to acquisition Inquiry request including query statement, pre-processes query statement, obtains the corresponding Words ' Attributes list of inquiry request, and Searching keyword is ranged under different nodes according to the corresponding attribute of searching keyword in Words ' Attributes list, to construct language Justice tree, parses each node of semantic tree from bottom to top, generates corresponding query language according to different search system, and according to looking into It askes language and finally obtains the corresponding content of inquiry request, realize and docked from the function of different search systems, complete to complexity And the search inquiry of the unsharp query statement of structure provides in turn and accurately replies content, improves user experience.
In a kind of concrete implementation mode, the processing module 12 is specifically used for:
Word segmentation processing and attribute labeling are carried out to the query statement based on default dictionary, it is corresponding to obtain the query statement At least one searching keyword and each searching keyword attribute, comprising matching with scene in the default dictionary Fine granularity attribute labeling;
According at least one corresponding searching keyword of the query statement and the attribute of each searching keyword, generate The Words ' Attributes list.
In a kind of concrete implementation mode, the processing module is specifically used for:
According to preset node type, node class belonging to each searching keyword in the Words ' Attributes list is obtained Type;
According to each node type, corresponding semantic subtree is constructed;
According to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined;
According to described hierarchical relationship, semantic subtree is merged, constructs semantic tree.
In a kind of concrete implementation mode, the processing module 12 is specifically used for:
If first node type includes at least one searching keyword, the root node of the semantic subtree of creation first;
The corresponding searching keyword of the first node type is added to the root node of the described first semantic subtree, as The leaf node of described first semantic subtree.
In a kind of concrete implementation mode, before the root node of the semantic subtree of the creation first, the processing mould Block 12 is also used to:
If the first node type includes more attribute nodes, according to the corresponding searching keyword of the more attribute nodes Afterwards and/or node type belonging to preceding searching keyword, second node type belonging to more attribute nodes is determined, and will More attribute nodes are determined as the attribute node of the second node type;
Wherein, the corresponding searching keyword of more attribute nodes belongs at least two node types.
In a kind of concrete implementation mode, if the inquiry request is used to inquire film, each searching keyword Attribute includes following any attribute: people entities word, film title, at least one film modifies attribute, at least one personage repairs Adorn attribute;
The node type includes personage's node, film node, character attribute node, at least one in film attribute node It is a.
In a kind of concrete implementation mode, the acquisition module is specifically used for:
Receive the inquiry request of user's input;
Alternatively,
Acquisition obtains the voice of user, and carries out voice recognition processing to the voice, obtains the inquiry request.
On the basis of embodiment shown in Fig. 6, Fig. 7 is the structure of the retrieval Installation practice two of content provided by the invention Schematic diagram, as shown in fig. 7, the device 10 further include:
Pushing module 13: for pushing the corresponding content of the inquiry request.
The retrieval device of content provided in this embodiment is for executing technical side involved in aforementioned either method embodiment Case, it is similar that the realization principle and technical effect are similar, and details are not described herein.
Fig. 8 is the hardware structural diagram of terminal device provided by the invention, as shown in figure 8, the terminal device 100, packet It includes:
Processor 111, memory 112, receiver 113 and transmitter 114;
Memory 112 calls the program of memory storage for storing program and data, the processor 111, to execute The technical solution of any one of aforementioned either method embodiment.
It in the realization of above-mentioned terminal device, is directly or indirectly electrically connected between memory and processor, to realize The transmission or interaction of data.For example, these elements between each other can be real by one or more of communication bus or signal wire It is now electrically connected, can such as be connected by bus.It is stored in memory and realizes that the computer of data access control method executes Instruction, including the software function module that at least one can be stored in memory in the form of software or firmware, processor passes through The software program and module being stored in memory are run, thereby executing various function application and data processing.
Memory may be, but not limited to, random access memory (Random Access Memory, referred to as: RAM), Read-only memory (Read Only Memory, referred to as: ROM), programmable read only memory (Programmable Read-Only Memory, referred to as: PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, letter Claim: EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, Referred to as: EEPROM) etc..Wherein, memory is for storing program, and processor executes program after receiving and executing instruction.Into one Step, software program and module in above-mentioned memory may also include operating system, may include various for management system The component software of task (such as memory management, storage equipment control, power management etc.) and/or driving, and can be with various hardware Or component software is in communication with each other, to provide the running environment of other software component.
Processor can be a kind of IC chip, the processing capacity with signal.Above-mentioned processor can be logical With processor, including central processing unit (Central Processing Unit, referred to as: CPU), network processing unit (Network Processor, referred to as: NP) etc..It may be implemented or execute disclosed each method, step and the logic in the embodiment of the present invention Block diagram.General processor can be microprocessor or the processor is also possible to any conventional processor etc..
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer readable storage medium includes journey Sequence, described program is when being executed by processor for realizing the search method of the content in either method embodiment.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (18)

1. a kind of search method of content, which is characterized in that the described method includes:
Inquiry request is received, the inquiry request includes the query statement of user's input;
The query statement is pre-processed, the corresponding Words ' Attributes list of the inquiry request, the Words ' Attributes are obtained It include at least one searching keyword and the corresponding attribute of each searching keyword in the query statement in list;
According to the Words ' Attributes list, semantic tree is constructed, the node in the semantic tree is by the Words ' Attributes list Searching keyword composition;
Query language is generated according to the semantic tree;
The corresponding content of the inquiry request is obtained according to query language inquiry.
2. obtaining institute the method according to claim 1, wherein described pre-process the query statement State the corresponding Words ' Attributes list of inquiry request, comprising:
Word segmentation processing and attribute labeling are carried out to the query statement based on default dictionary, it is corresponding extremely to obtain the query statement The attribute of a few searching keyword and each searching keyword is thin comprising matching with scene in the default dictionary Granularity attribute mark;
According at least one corresponding searching keyword of the query statement and the attribute of each searching keyword, described in generation Words ' Attributes list.
3. method according to claim 1 or 2, which is characterized in that described according to the Words ' Attributes list, building is semantic Tree, comprising:
According to preset node type, node type belonging to each searching keyword in the Words ' Attributes list is obtained;
According to each node type, corresponding semantic subtree is constructed;
According to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined;
According to described hierarchical relationship, semantic subtree is merged, constructs semantic tree.
4. according to the method described in claim 3, constructing corresponding semanteme it is characterized in that, described according to each node type Subtree, comprising:
If first node type includes at least one searching keyword, the root node of the semantic subtree of creation first;
The corresponding searching keyword of the first node type is added to the root node of the described first semantic subtree, as described The leaf node of first semantic subtree.
5. according to the method described in claim 4, it is characterized in that, before the root node of the semantic subtree of the creation first, Further include:
If the first node type includes more attribute nodes, after the corresponding searching keyword of the more attribute nodes And/or node type belonging to preceding searching keyword, determine second node type belonging to more attribute nodes, and by institute State the attribute node that more attribute nodes are determined as the second node type;
Wherein, the corresponding searching keyword of more attribute nodes belongs at least two node types.
6. according to the method described in claim 5, it is characterized in that, if the inquiry request is each looked into for inquiring film The attribute for asking keyword includes following any attribute: people entities word, film title, at least one film modifies attribute, at least One personage modifies attribute;
The node type includes at least one of personage's node, film node, character attribute node, film attribute node.
7. method according to claim 1 or 2, which is characterized in that the acquisition inquiry request, comprising:
Receive the inquiry request of user's input;
Alternatively,
Acquisition obtains the voice of user, and carries out voice recognition processing to the voice, obtains the inquiry request.
8. method according to claim 1 or 2, which is characterized in that the method also includes:
Push the corresponding content of the inquiry request.
9. a kind of retrieval device of content, which is characterized in that described device includes:
Receiving module, for receiving inquiry request, the inquiry request includes the query statement of user's input;
Processing module is used for:
The query statement is pre-processed, the corresponding Words ' Attributes list of the inquiry request, the Words ' Attributes are obtained It include at least one searching keyword and the corresponding attribute of each searching keyword in the query statement in list;
According to the Words ' Attributes list, semantic tree is constructed, the node in the semantic tree is by the Words ' Attributes list Searching keyword composition;
Query language is generated according to the semantic tree;
The corresponding content of the inquiry request is obtained according to query language inquiry.
10. device according to claim 9, which is characterized in that the processing module is specifically used for:
Word segmentation processing and attribute labeling are carried out to the query statement based on default dictionary, it is corresponding extremely to obtain the query statement The attribute of a few searching keyword and each searching keyword is thin comprising matching with scene in the default dictionary Granularity attribute mark;
According at least one corresponding searching keyword of the query statement and the attribute of each searching keyword, described in generation Words ' Attributes list.
11. device according to claim 9 or 10, which is characterized in that the processing module is specifically used for:
According to preset node type, node type belonging to each searching keyword in the Words ' Attributes list is obtained;
According to each node type, corresponding semantic subtree is constructed;
According to the modified relationship of each semantic subtree, the hierarchical relationship between semanteme subtree is determined;
According to described hierarchical relationship, semantic subtree is merged, constructs semantic tree.
12. device according to claim 11, which is characterized in that the processing module is specifically used for:
If first node type includes at least one searching keyword, the root node of the semantic subtree of creation first;
The corresponding searching keyword of the first node type is added to the root node of the described first semantic subtree, as described The leaf node of first semantic subtree.
13. device according to claim 12, which is characterized in that the semantic subtree of the creation first root node it Before, the processing module is also used to:
If the first node type includes more attribute nodes, after the corresponding searching keyword of the more attribute nodes And/or node type belonging to preceding searching keyword, determine second node type belonging to more attribute nodes, and by institute State the attribute node that more attribute nodes are determined as the second node type;
Wherein, the corresponding searching keyword of more attribute nodes belongs at least two node types.
14. device according to claim 13, which is characterized in that if the inquiry request is used to inquire film, each The attribute of searching keyword includes following any attribute: people entities word, film title, at least one film modifies attribute, until A few personage modifies attribute;
The node type includes at least one of personage's node, film node, character attribute node, film attribute node.
15. device according to claim 9 or 10, which is characterized in that the acquisition module is specifically used for:
Receive the inquiry request of user's input;
Alternatively,
Acquisition obtains the voice of user, and carries out voice recognition processing to the voice, obtains the inquiry request.
16. device according to claim 9 or 10, which is characterized in that described device further include:
Pushing module, for pushing the corresponding content of the inquiry request.
17. a kind of terminal device characterized by comprising
Processor, memory, receiver and transmitter;
For memory for storing program and data, the processor calls the program of memory storage, with perform claim require 1 to The search method of 8 described in any item contents.
18. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes program, described Program requires the search method of 1 to 8 described in any item contents when being executed by processor for perform claim.
CN201910101810.9A 2019-02-01 2019-02-01 Content retrieval method, device, equipment and storage medium Active CN109670033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910101810.9A CN109670033B (en) 2019-02-01 2019-02-01 Content retrieval method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910101810.9A CN109670033B (en) 2019-02-01 2019-02-01 Content retrieval method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109670033A true CN109670033A (en) 2019-04-23
CN109670033B CN109670033B (en) 2021-01-12

Family

ID=66150917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910101810.9A Active CN109670033B (en) 2019-02-01 2019-02-01 Content retrieval method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109670033B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209772A (en) * 2019-06-17 2019-09-06 科大讯飞股份有限公司 A kind of text handling method, device, equipment and readable storage medium storing program for executing
CN110321408A (en) * 2019-05-30 2019-10-11 重庆金融资产交易所有限责任公司 Searching method, device, computer equipment and the storage medium of knowledge based map
CN110659422A (en) * 2019-09-27 2020-01-07 百度在线网络技术(北京)有限公司 Retrieval method, retrieval device, electronic equipment and storage medium
CN111797115A (en) * 2020-06-28 2020-10-20 中国工商银行股份有限公司 Employee information searching method and device
CN115934921A (en) * 2023-03-03 2023-04-07 北京远鉴信息技术有限公司 Method and device for determining task-based answer, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031202A1 (en) * 2004-08-06 2006-02-09 Chang Kevin C Method and system for extracting web query interfaces
CN101770473A (en) * 2008-12-30 2010-07-07 华中科技大学 Method for querying hierarchical semantic venation document
CN105900081A (en) * 2013-02-19 2016-08-24 谷歌公司 Natural language processing based search
CN107451153A (en) * 2016-05-31 2017-12-08 北京京东尚科信息技术有限公司 The method and apparatus of export structure query statement
CN108804521A (en) * 2018-04-27 2018-11-13 南京柯基数据科技有限公司 A kind of answering method and agricultural encyclopaedia question answering system of knowledge based collection of illustrative plates

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031202A1 (en) * 2004-08-06 2006-02-09 Chang Kevin C Method and system for extracting web query interfaces
CN101770473A (en) * 2008-12-30 2010-07-07 华中科技大学 Method for querying hierarchical semantic venation document
CN105900081A (en) * 2013-02-19 2016-08-24 谷歌公司 Natural language processing based search
CN107451153A (en) * 2016-05-31 2017-12-08 北京京东尚科信息技术有限公司 The method and apparatus of export structure query statement
CN108804521A (en) * 2018-04-27 2018-11-13 南京柯基数据科技有限公司 A kind of answering method and agricultural encyclopaedia question answering system of knowledge based collection of illustrative plates

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321408A (en) * 2019-05-30 2019-10-11 重庆金融资产交易所有限责任公司 Searching method, device, computer equipment and the storage medium of knowledge based map
CN110209772A (en) * 2019-06-17 2019-09-06 科大讯飞股份有限公司 A kind of text handling method, device, equipment and readable storage medium storing program for executing
CN110209772B (en) * 2019-06-17 2021-10-08 科大讯飞股份有限公司 Text processing method, device and equipment and readable storage medium
CN110659422A (en) * 2019-09-27 2020-01-07 百度在线网络技术(北京)有限公司 Retrieval method, retrieval device, electronic equipment and storage medium
CN111797115A (en) * 2020-06-28 2020-10-20 中国工商银行股份有限公司 Employee information searching method and device
CN115934921A (en) * 2023-03-03 2023-04-07 北京远鉴信息技术有限公司 Method and device for determining task-based answer, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109670033B (en) 2021-01-12

Similar Documents

Publication Publication Date Title
US11227118B2 (en) Methods, devices, and systems for constructing intelligent knowledge base
CN109670033A (en) Search method, device, equipment and the storage medium of content
US10726204B2 (en) Training data expansion for natural language classification
US11934394B2 (en) Data query method supporting natural language, open platform, and user terminal
US11263208B2 (en) Context-sensitive cross-lingual searches
CN111695345A (en) Method and device for recognizing entity in text
CN104469029B (en) Number checking method and device is carried out by voice
Smirnov et al. Recommendation system for tourist attraction information service
CN111538818B (en) Data query method, device, electronic equipment and storage medium
WO2023024975A1 (en) Text processing method and apparatus, and electronic device
CN112650842A (en) Human-computer interaction based customer service robot intention recognition method and related equipment
CN116186197A (en) Topic recommendation method, device, electronic equipment and storage medium
CN110147223A (en) Generation method, device and the equipment of Component Gallery
CN116628328A (en) Web API recommendation method and device based on functional semantics and structural interaction
KR101602342B1 (en) Method and system for providing information conforming to the intention of natural language query
CN115454554A (en) Text description generation method, text description generation device, terminal and storage medium
CN114817447A (en) Text processing method, device, storage medium, electronic equipment and system
CN114880520A (en) Video title generation method, device, electronic equipment and medium
CN115129885A (en) Entity chain pointing method, device, equipment and storage medium
CN111626059B (en) Information processing method and device
CN114297352A (en) Conversation state tracking method and device, man-machine conversation system and working machine
CN111222011B (en) Video vector determining method and device
CN112836057B (en) Knowledge graph generation method, device, terminal and storage medium
CN114254642A (en) Entity information processing method, device, electronic equipment and medium
CN111639260A (en) Content recommendation method, device and storage medium thereof

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: HISENSE ELECTRIC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant