CN110033851B - Information recommendation method and device, storage medium and server - Google Patents

Information recommendation method and device, storage medium and server Download PDF

Info

Publication number
CN110033851B
CN110033851B CN201910260910.6A CN201910260910A CN110033851B CN 110033851 B CN110033851 B CN 110033851B CN 201910260910 A CN201910260910 A CN 201910260910A CN 110033851 B CN110033851 B CN 110033851B
Authority
CN
China
Prior art keywords
candidate
node
determining
keyword
degree
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.)
Active
Application number
CN201910260910.6A
Other languages
Chinese (zh)
Other versions
CN110033851A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910260910.6A priority Critical patent/CN110033851B/en
Publication of CN110033851A publication Critical patent/CN110033851A/en
Application granted granted Critical
Publication of CN110033851B publication Critical patent/CN110033851B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/20ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the management or administration of healthcare resources or facilities, e.g. managing hospital staff or surgery rooms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Animal Behavior & Ethology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses an information recommendation method, an information recommendation device, a storage medium and a server, wherein the information recommendation method comprises the following steps: acquiring a determined keyword set, wherein the keyword set comprises at least one keyword; determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to the established knowledge graph; determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary node; determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree; the recommendation information is generated according to the target node and provided for the user, so that the method and the device are applicable to various types of conversation scenes, are wide in application range, can greatly shorten the conversation times and improve the conversation efficiency.

Description

Information recommendation method and device, storage medium and server
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information recommendation method and apparatus, a storage medium, and a server.
Background
With the continuous improvement of the economic development level of China, the requirements of people on medical services are higher and higher. Traditional medical services cannot meet the fast-paced life needs of people, so that the informatization construction of hospitals is very important.
For large-scale comprehensive hospitals, the hospitals all use departments as diagnosis and treatment units to carry out daily diagnosis and treatment works. However, the basic medical knowledge of the general public is relatively deficient, so that many patients only know the uncomfortable symptoms of the patients but not which department the patients should be hung in when seeing a doctor, and the patients often need to go to consultant and service staff or registration staff to know the symptoms, which is very troublesome. For this purpose, some hospitals are provided with a special intelligent diagnosis guide service, which is usually implemented based on a multi-turn dialogue system, for example, questions of each turn of dialogue are set in advance, user answers are collected in a manner similar to form filling, and finally, the answers in turns are input into a classifier as features, and matching is performed to obtain corresponding departments. However, since the problem of each round of dialogs in the multi-round dialog system is fixed, the multi-round dialog system can only be applied to dialog scenes with less feature quantity, and has a small application range and poor flexibility.
Disclosure of Invention
The embodiment of the application provides an information recommendation method, an information recommendation device, a storage medium and a server, which can be suitable for various types of conversation scenes and are wide in application range and high in flexibility.
The embodiment of the application provides an information recommendation method, which comprises the following steps:
acquiring a determined keyword set, wherein the keyword set comprises at least one keyword;
determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph;
determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary node;
determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree;
and generating recommendation information according to the target node, and providing the recommendation information for the user.
An embodiment of the present application further provides an information recommendation device, including:
the acquisition module is used for acquiring a determined keyword set, wherein the keyword set comprises at least one keyword;
the first determining module is used for determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph;
the second determining module is used for determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary nodes;
a third determining module, configured to determine a target node from the candidate primary node and the candidate secondary node according to the recommendation degree;
and the generation module is used for generating recommendation information according to the target node and providing the recommendation information for the user.
The embodiment of the present application further provides a storage medium, where multiple instructions are stored, and the instructions are suitable for being loaded by a processor to execute any one of the foregoing information recommendation methods.
The embodiment of the application further provides a server, which comprises a processor and a memory, wherein the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps in the information recommendation method.
The information recommendation method, the device, the storage medium and the server provided by the application can be used for obtaining a determined keyword set, wherein the keyword set comprises at least one keyword, then determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph, then determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary nodes, determining a target node from the candidate primary nodes and the candidate secondary nodes according to the recommendation degree, then generating recommendation information according to the target node, and providing the recommendation information for a user, so that the input information of the user can be matched and searched in a multi-turn dialogue system by combining two modes of the knowledge graph and the text, the matching accuracy is high, and each dialogue can be flexibly adjusted according to the input content of the user, therefore, the method can be suitable for various types of conversation scenes, has a wide application range, can greatly shorten the conversation times and improve the conversation efficiency.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a scene schematic diagram of an information recommendation system provided in an embodiment of the present application.
Fig. 2 is a schematic flowchart of an information recommendation method provided in an embodiment of the present application.
Fig. 3 is a schematic flowchart of step S103 provided in the embodiment of the present application.
Fig. 4 is a schematic flowchart of step S104 provided in the embodiment of the present application.
Fig. 5 is another schematic flow chart of step S104 provided in the embodiment of the present application.
FIG. 6 is an interface operation diagram of a user registration process provided in an embodiment of the present application
Fig. 7 is a schematic diagram illustrating a process of determining candidate primary nodes and candidate secondary nodes in the hospital consultation system according to the embodiment of the present application.
Fig. 8 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application
Fig. 9 is another schematic structural diagram of an information recommendation device according to an embodiment of the present application.
Fig. 10 is a schematic structural diagram of a second determining unit provided in an embodiment of the present application.
Fig. 11 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an information recommendation method, an information recommendation device, a storage medium and a server.
Referring to fig. 1, fig. 1 is a schematic view of a scene of an information recommendation system, where the information recommendation system may include any one of the information recommendation devices provided in the embodiments of the present application, and the information recommendation device may be integrated in a server, such as a background server of a hospital medical guidance system.
The server may obtain a determined set of keywords, the set of keywords comprising at least one keyword; determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to the knowledge graph; determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate main node; determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree; and generating recommendation information according to the target node, and providing the recommendation information for the user.
The knowledge graph is a graph organization form which associates various entities through semantic association, and is mainly a graph structure formed by nodes, node vectors, edges and node labels, wherein the node labels comprise main node labels and auxiliary node labels, the nodes are entities, and each entity represents a keyword. The keyword set is usually obtained from an input sentence or an input option of the user. The recommendation information may include target nodes ranked from high to low according to recommendation degrees, the target nodes may be represented in a text form, and the recommendation information may further include corresponding description graphs of the target nodes.
The information recommendation system can further comprise a client, such as a mobile terminal installed with a diagnosis guide service application, and the client can acquire input sentences or input options of a user in a voice mode, a touch screen mode or a gesture mode and transmit the input sentences or the input options to the server so that the server can perform subsequent keyword matching operation.
For example, in fig. 1, for the hospital medical guidance system, a knowledge graph may be constructed in advance according to a large number of symptom names and disease names, wherein the constructed knowledge graph includes a plurality of preset primary nodes and preset secondary nodes connected to each preset primary node, the preset primary nodes are the symptom names, and the preset secondary nodes are the disease names, and then when a user needs to register a number, a description sentence for the symptom may be input in a medical guidance service application of the mobile terminal, and the description sentence may be transmitted to the server in real time through the mobile terminal. The server or the mobile terminal processes the description sentence by using the trained classifier to obtain the determined keywords (i.e. the symptom names, which are equivalent to the primary nodes in the knowledge graph), then, the server finds the disease names (i.e. the candidate secondary nodes) connected with the symptoms in the knowledge graph and the other symptoms (i.e. the candidate primary nodes) connected with the disease names, calculates the recommendation degree corresponding to each candidate secondary node (i.e. the disease names) by using a specified algorithm, selects the target node (i.e. the target disease name or the target symptom) according to the recommendation degree and provides the target node to the user, when the target node is the disease name, the conversation is ended, when the target node is the symptom, the second wheel is continued to talk, at this time, the user can select from the provided target nodes, and the server uses the selected target node and the keywords obtained for the first time as the determined keywords, and repeating the steps until the target node is the disease name or the conversation frequency reaches the set frequency, and ending the conversation.
As shown in fig. 2, fig. 2 is a schematic flow diagram of an information recommendation method provided in the embodiment of the present application, and a specific flow may be as follows:
s101, obtaining a determined keyword set, wherein the keyword set comprises at least one keyword.
In this embodiment, the keyword set is mainly obtained according to input information of a user, the input information may be obtained through a voice or a touch screen, and the input information may include an input sentence and/or an input option, where when the input information is the input sentence, a keyword corresponding to the input sentence may be determined through a classifier. When the input information is input options, each option corresponds to a keyword, for example, after the first dialog is completed, the server may provide a plurality of options to the user, so that the user can select one option as a keyword.
For example, the step S101 may specifically include:
acquiring input information currently input by a user;
determining at least one target word label corresponding to the input information, and acquiring a determined target word label corresponding to historical input operation;
and taking the target word label and the determined target word label as key words to obtain a key word set.
In this embodiment, when the input information is an input sentence, the word label corresponding to the input sentence may be determined through some deep learning models, where the deep learning models may include a word segmentation algorithm, a word embedding algorithm, a bidirectional LSTM, and a CRF method, where the word segmentation algorithm may include a jieba, the word embedding algorithm may include a fasttext, the LSTM (long short-term memory network) is a time recursive neural network, and the CRF (conditional random field algorithm) is a probabilistic graph model based on the fact that the probabilistic graph model follows markov.
For example, the deep learning models may be trained in advance, then when a keyword needs to be determined, the trained word segmentation algorithm and word embedding algorithm may be used to embed the sentence information into a plurality of word vectors, and each word vector is input into a bidirectional LSTM network to obtain a word vector containing context information, then the word vector is input into a CRF network to obtain word labels (such as location, name of a person, name of a symptom, name of a disease, etc.) of each word in the sentence information, and then a word label consistent with the constructed knowledge graph is selected as a target word label. Generally, each time a user inputs sentence information (i.e., has a conversation with a server), the corresponding target word tags can be obtained, and when the user has multiple rounds of conversations with the server, the server takes all the target word tags that have been subjected to the conversations as a keyword set every time the conversation is completed.
It should be noted that, when the target tag obtained by the user's current input operation is a specific tag, such as a disease name, the result may be directly provided to the user, and the conversation is ended, otherwise, a subsequent analysis operation needs to be performed according to the keyword set.
S102, determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to the knowledge graph.
In this embodiment, the knowledge graph is a graph organization form in which various entities are associated by semantic association, and is a graph structure mainly formed by nodes, node vectors, edges, and node labels, where the node labels include a primary node label and a secondary node label, a node is an entity, and each entity represents a keyword. For each obtained keyword set, the node position (usually, a primary node) of each keyword in the knowledge graph may be found first, then a secondary node directly connected to the node is determined as a candidate secondary node, and a primary node (including a primary node directly connected to the secondary node and a primary node connected to the primary node) connected to the candidate secondary node is determined as a candidate primary node.
It should be readily understood that the knowledge-graph should be pre-constructed, and in this case, the constructing step may include:
acquiring a preset auxiliary core word set and a main core word set corresponding to each auxiliary core word in the auxiliary core word set;
determining a first vector variable corresponding to each main core word and a second vector variable corresponding to each auxiliary core word;
determining a first vector corresponding to the first vector and a second vector corresponding to the second vector by using a preset model and the first vector variable and the second vector variable;
a knowledge graph is constructed from the first vector and the second vector.
In this embodiment, the sub-core word set and the main core word set are preset by the user, for example, the sub-core word set may be a large number of disease names, the main core word set may be a symptom name of a large number of diseases, and the like. The preset model comprises a truncated random walk model and a skip-gram neural network model, and the construction process mainly comprises three steps:
one labeled graph G is defined, as follows:
G=(V,E,X,Y);
where V denotes a set of nodes of the diagram (equivalent to a set of core words), and E denotes a set of edges of the diagram (equivalent to a connection relationship between a main core word and an accessory core word). X is the set of vectorized representations (equivalent to vector variables) of the nodes, i.e. { v } 1 ,v 2 ....v n The size of the lattice is n × dim, and dim is the dimension number of the vector of each node (set by human)For example, 512 dimensions). Y is the matrix formed by the labels of each node.
Secondly, selecting nodes by utilizing a truncated random walk model to form a walk path, for example, randomly selecting nodes adjacent to a certain node as a root node every time, and forming a walk path. And performing multiple walks on each node to obtain multiple groups of paths formed by the nodes in the graph.
And thirdly, feeding the walking path obtained in the step back to the skip-gram neural network model so as to research the adjacency relation between the nodes. The neural network model learns the adjacency relationships between nodes by recursion, thereby adjusting the vector representation of each node. The objective function of this model is:
Figure BDA0002015235680000061
wherein w is a set critical distance, V represents a node vector, the objective function mainly represents that the ith node vector is used for predicting the i previous node vectors, and since the actual true values of the ith node vector and the i-1 previous node vectors are known, the aim of the objective function is to construct a network so as to maximize the probability of correct prediction. And gradually adjusting the vectors of the related nodes by a gradient descent method to finally obtain the representation vectors (namely the first vector and the second vector) of each node, namely completing vectorization of the graph. At this time, the vector of each node, the connection relationship between nodes, and the type of each node (whether it is a primary node or a secondary node) are determined.
And S103, determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate main node.
For example, referring to fig. 3, the step S103 may specifically include:
and S1031, determining the first relevance of each candidate secondary node according to the keyword set.
In this embodiment, the first relevance is mainly used to measure the relevance between a single candidate secondary node and a keyword set, for example, for a hospital referral system, the first relevance is used to measure the relevance between a certain disease and a user input symptom.
For example, step S1031 may specifically include:
determining a map embedding vector corresponding to each keyword to obtain at least one first map vector;
determining a map embedding vector corresponding to each candidate secondary node to obtain at least one second map vector;
and calculating the sum of the similarity between each second map vector and the at least one first map vector to obtain a first correlation degree of the corresponding candidate secondary node.
In this embodiment, the similarity may be calculated by a cosine similarity function or other similarity functions. After the knowledge graph is constructed, the vector of each node (including the primary node and the secondary node) is already determined, so as long as the primary node corresponding to the keyword is found, the vector of the primary node is the first graph vector, the vector of the secondary node (also called a candidate secondary node) connected to the primary node is the second graph vector, and the picture embedding vector may be a 512-dimensional vector. Then, the similarity between each candidate secondary node and each candidate primary node may be calculated based on the vectors, and the similarities belonging to the same candidate secondary node are summed, and the sum is used as the first correlation of the candidate secondary node.
For example, for a candidate secondary node d t The first degree of correlation S 1t The calculation formula may be:
Figure BDA0002015235680000071
wherein n is the total number of keywords in the keyword set, Gi is a first map vector corresponding to the ith keyword, G t Is a candidate secondary node d t The corresponding second map vector, sim () is a cosine similarity function.
S1032, according to the plurality of candidate main nodes and the keyword set corresponding to the same candidate auxiliary node, determining a second degree of correlation of the corresponding candidate auxiliary node.
In this embodiment, the second relevancy is mainly used to measure the relevancy between the candidate main node and the keyword set of the same candidate secondary node, for example, for a hospital consultation system, the second relevancy is used to measure the relevancy between the symptom of a certain disease and the user input symptom.
For example, the step S1032 may specifically include:
determining a text embedding vector corresponding to each keyword to obtain at least one first text vector;
determining text embedded vectors corresponding to each candidate main node to obtain a plurality of second text vectors;
calculating the similarity between each first text vector and each second text vector, and selecting the maximum similarity corresponding to the same keyword and candidate secondary nodes;
and summing the maximum similarity corresponding to the same candidate secondary node to obtain a second correlation degree corresponding to the candidate secondary node.
In this embodiment, the text information corresponding to the keyword and the candidate host node may be converted into a text embedding vector, which may be a 512-dimensional vector, by using a trained fasttext fast text classification model or other classification models, so as to convert the text into a vector space for mathematical computation. The similarity may also be calculated by a cosine similarity function or other similarity functions.
For example, for a candidate secondary node d t The second degree of correlation S 2t The formula of (c) may be:
Figure BDA0002015235680000081
wherein, T tj Represents candidate secondary node d t Of the jth candidate primary node, T i And representing a first text vector corresponding to the ith keyword, and sim () is a cosine similarity function.
And S1033, determining the recommendation degree of the corresponding candidate secondary node according to the first correlation degree and the second correlation degree.
In this embodiment, the first correlation and the second correlation passing through a candidate secondary node may be weighted to obtain the corresponding recommendation degree. For example, for a candidate secondary node d t The recommendation degree S t Can be S t =w1*S 1t +w2*S 2t Wherein w1 and w2 are weighted values.
And S104, determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree.
For example, referring to fig. 4, the step S104 may specifically include:
s1041, judging whether the candidate secondary node with the recommendation degree larger than a preset threshold exists, if so, executing the following step S1042, and if not, executing the following step S1043;
s1042, taking the candidate auxiliary node as a target node;
s1043, determining the repetition degree between each candidate main node and each keyword; and determining a target node from the candidate master nodes according to the repeatability.
In this embodiment, the preset threshold may be set manually, for example, 0.95. When a candidate secondary node with a recommendation degree greater than a preset threshold exists, push information can be determined according to the candidate secondary node, and a conversation is ended, for example, for a referral system, when the candidate secondary node is a disease name, an outpatient room can be determined according to the disease name, and the outpatient room is provided for a user. When there is no candidate secondary node with the recommendation degree larger than the preset threshold, the server needs to perform a conversation with the user again, and at this time, the server needs to determine the selected content given to the user before the next conversation, and in general, in order to avoid the user from repeatedly selecting the same content, the duplication degree calculation formula may be used to first eliminate the options with the same content as the previously selected content from the options, for example, eliminate the options with the duplication degree larger than the preset value, and then provide the remaining options as the next conversation information to the user, or provide the specified number of options with the lowest duplication degree as the next conversation information to the user.
Wherein, for a certain candidate master node h i The formula for calculating the repetition degree Q may be:
Figure BDA0002015235680000091
Figure BDA0002015235680000092
Figure BDA0002015235680000093
wherein w represents a candidate master node h i The occurrence frequency in the whole knowledge graph library is used for measuring whether the knowledge graph library is a common knowledge point or a uncommon knowledge point, k represents a candidate main node h i Of the corresponding candidate secondary node, P 0i Represents the candidate host node h after normalization i Weight of (1), P i Indicates the candidate master node h i And weights of the connected secondary nodes can be determined when the knowledge graph is constructed. M represents the number of candidate primary nodes that have been matched in multiple sessions with the user, h j Representing candidate master nodes that have been matched, q is an artificially set threshold, e.g., 0.9, sim () is a similarity function. At this time, Q can be filtered out i Taking the rest main nodes as target nodes or taking Q as the main nodes with the value less than the preset value i The largest specified number of master nodes acts as target nodes.
It should be noted that, besides ending multiple rounds of conversations with the user when the recommendation degree is greater than the preset threshold, it may also be determined whether the conversations can be ended according to the number of conversations, that is, referring to fig. 5, before step S1043, the information recommendation method may further include:
s1044, counting the input times of the input operation of the user, judging whether the input times is greater than a preset time, if so, executing the following step S1045, otherwise, executing the step S1043;
and S1045, taking the candidate secondary node with the highest recommendation degree as a target node.
In this embodiment, the preset number of times may be set manually, for example, 5 times. When the number of times of conversation between the user and the server exceeds the preset number of times, the conversation can be ended, and the node with the highest recommendation degree in all candidate secondary nodes corresponding to the user input statement at this time is taken as a target node.
And S105, generating recommendation information according to the target node, and providing the recommendation information for the user.
In this embodiment, the recommendation information may be information associated with a target node, and may also include the target node, for example, when the target node is a candidate secondary node, information associated with the candidate secondary node may be acquired as the recommendation information, for example, when the candidate secondary node is a disease name, the association information may be department information corresponding to the disease name and information about related medical staff. When the target node is a candidate master node, the candidate master nodes may be ranked according to the recommendation degree from high to low, and the ranked candidate master nodes are displayed to the user as recommendation information so as to perform the next conversation.
The information recommendation method is applied to a consultation guidance system server, the main node in the knowledge graph is used as a symptom name, the auxiliary node in the knowledge graph is used as a disease name, and the flow of the information recommendation method is simply introduced.
As shown in fig. 6 and fig. 7, when the user enters the registration interface of the medical guide system through the mobile terminal, the server may prompt the user to input his/her own symptoms, and then when the user inputs a certain symptom description sentence, such as "recently bellied, uncomfortable" the belly, the server may determine the keyword corresponding to the description sentence by using the trained deep learning model, at this time, since only one dialogue is performed, the keyword set only includes one keyword, such as "abdominal distension", and then the position of "abdominal distension" in the knowledge map is locked, and all disease names corresponding to "abdominal distension", such as "gastroenteritis", "dyspepsia", and "chronic hepatitis", are found, at the same time, other symptoms corresponding to each disease, such as "gastroenteritis", and the like, are found, such as "diarrhea", and "nausea", and the symptoms corresponding to dyspepsia ", include" nausea ", and" early satiety ", and the like, the symptoms corresponding to chronic hepatitis include fatigue, as shown in fig. 7.
Then, the similarity between the symptom "abdominal distension" and the disease "gastroenteritis," "abdominal distension and dyspepsia," and the similarity between "abdominal distension" and "chronic hepatitis" may be determined by using the first correlation calculation method, at this time, since only one dialogue is performed, the similarity corresponding to each disease is also the first correlation, and at the same time, the similarity between the other symptoms of each disease (such as "gastroenteritis," "dyspepsia," or "chronic hepatitis") and the symptom "abdominal distension" input by the user is determined by using the second correlation calculation method, that is, the second correlation, and then the recommendation is determined according to the first correlation and the second correlation, if the recommendation is greater than a preset threshold, such as 0.95, the department corresponding to the disease may be provided to the user as recommendation information, and if the recommendation does not exist, the top ones of the other symptoms found in the order from high degree to low degree may be provided as recommendation information To the user, such as "none of nausea, early satiety, fatigue, diarrhea … or greater" as shown in fig. 6.
Then, if the user selects "nausea" as the keyword this time, the keyword "nausea" and the keyword "abdominal distension" obtained for the first time are used as the keyword set, and at this time, the keyword set includes two keywords, and the above-described processing steps related to the keyword set are repeated to obtain recommendation information of the second session, such as "no" diarrhea, early satiety … or more ", and the recommendation information is provided to the user. Similarly, if the user next selects "diarrhea," the keyword set includes three keywords: the method comprises the steps of 'abdominal distension', 'nausea' and 'diarrhea', wherein the relevant processing steps of the keyword set are repeated to obtain the disease 'gastroenteritis', and department information and relevant medical staff information, such as 'anorectal department' and 'registrable doctor xxx', of the 'gastrointestinal inflammation' can be acquired at the moment and provided to a user as recommendation information so that the user can register accurately.
It can be known from the foregoing that, in the information recommendation method provided in this embodiment, a determined keyword set is obtained, where the keyword set includes at least one keyword, then at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node are determined according to a constructed knowledge graph, then, according to the keyword set and the candidate primary nodes, a recommendation degree of each candidate secondary node is determined, and a target node is determined from the candidate primary nodes and the candidate secondary nodes according to the recommendation degree, then, recommendation information is generated according to the target node, and the recommendation information is provided to the user, so that matching search can be performed on input information of the user in combination of two ways, namely, a knowledge graph and a text, in a multi-turn conversation system, matching accuracy is high, and because each conversation can be flexibly adjusted according to input content of the user, therefore, the method is not only suitable for various types of conversation scenes and wide in application range, but also can greatly shorten the conversation times and improve the conversation efficiency.
According to the method described in the above embodiments, the present embodiment will be further described from the perspective of an information recommendation apparatus, which may be specifically implemented as an independent entity or integrated in an electronic device.
Referring to fig. 8, fig. 8 specifically describes an information recommendation apparatus provided in an embodiment of the present application, where the information recommendation apparatus is applied to a server, and the information recommendation apparatus may include: an obtaining module 10, a first determining module 20, a second determining module 30, a third determining module 40, and a generating module 50, wherein:
(1) acquisition module 10
An obtaining module 10, configured to obtain the determined keyword set, where the keyword set includes at least one keyword.
In this embodiment, the keyword set is mainly obtained according to input information of a user, where the input information may be obtained through a voice or touch screen, and may include an input sentence and/or an input option, and when the input information is an input sentence, a keyword corresponding to the input sentence may be determined by a classifier. When the input information is an input option, each option corresponds to a keyword, for example, after the first conversation is completed, the server may provide a plurality of options to the user so that the user can select one of the options as the keyword.
For example, the obtaining module 10 may be specifically configured to:
acquiring input information currently input by a user;
determining at least one target word label corresponding to the input information, and acquiring a determined target word label corresponding to historical input operation;
and taking the target word label and the determined target word label as key words to obtain a key word set.
In this embodiment, when the input information is an input sentence, the word label corresponding to the sentence may be determined through some deep learning models, where the deep learning models may include a word segmentation algorithm, a word embedding algorithm, a bidirectional LSTM, and a CRF method, where the word segmentation algorithm may include a jieba, the word embedding algorithm may include a fasttext, the LSTM (long short-term memory network) is a time recursive neural network, and the CRF (conditional random field algorithm) is a probabilistic graph model based on adherence to markov.
For example, the deep learning models may be trained in advance, then when a keyword needs to be determined, the trained word segmentation algorithm and word embedding algorithm may be used to embed the sentence information into a plurality of word vectors, and each word vector is input into a bidirectional LSTM network to obtain a word vector containing context information, then the word vector is input into a CRF network to obtain word labels (such as location, name of person, symptom name, disease name, etc.) of each word in the sentence information, and then a word label consistent with the constructed knowledge graph is selected as a target word label. Generally, each time a user inputs sentence information (i.e., has a conversation with a server), the corresponding target word tags can be obtained, and when the user has multiple rounds of conversations with the server, the server takes all the target word tags that have been subjected to the conversations as a keyword set every time the conversation is completed.
It should be noted that, when the target tag obtained by the user's current input operation is a specific tag, such as a disease name, the result may be directly provided to the user, and the conversation is ended, otherwise, a subsequent analysis operation needs to be performed according to the keyword set.
(2) First determination module 20
The first determining module 20 is configured to determine, according to a knowledge graph, at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node, where the knowledge graph includes a plurality of preset secondary nodes and a plurality of preset primary nodes connected to each preset secondary node.
In this embodiment, the knowledge graph is a graph organization form in which various entities are associated by semantic association, and is a graph structure mainly formed by nodes, node vectors, edges, and node labels, where the node labels include a primary node label and a secondary node label, where a node is an entity, and each entity represents a keyword. For each obtained keyword set, a node position (usually a primary node) of each keyword in the knowledge graph may be found first, then a secondary node directly connected to the node is determined as a candidate secondary node, and a primary node connected to the candidate secondary node (including the primary node directly connected to the primary node and the primary node connected to the primary node) is determined as a candidate primary node.
It should be easily understood that the knowledge-graph should be constructed in advance, and in this case, referring to fig. 9, the information recommendation apparatus further includes a construction module 60 for:
before the first determining module determines at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to the established knowledge graph, or a preset secondary core word set and a main core word set corresponding to each secondary core word in the secondary core word set are taken;
determining a first vector variable corresponding to each main core word and a second vector variable corresponding to each auxiliary core word;
determining a first vector corresponding to the first vector variable and a second vector corresponding to the second vector variable by using a preset model and the first vector variable and the second vector variable;
a knowledge graph is constructed from the first vector and the second vector.
In this embodiment, the sub-core word set and the main core word set are preset by the user, for example, the sub-core word set may be a large number of disease names, the main core word set may be a symptom name of a large number of diseases, and the like. The preset model comprises a cut-off random walk model and a skip-gram neural network model, and the construction process mainly comprises three steps:
define a labeled graph G, as follows:
G=(V,E,X,Y);
where V denotes a set of nodes of the graph (corresponding to a set of core words), and E denotes a set of edges of the graph (corresponding to a connection relationship between a main core word and an accessory core word). X is the set of vectorized representations (equivalent to vector variables) of the nodes, i.e. { v } 1 ,v 2 ....v n And the size of the node is a matrix of n × dim, and dim is the dimension number of the vector of each node (set by people, such as 512 dimensions). Y is the matrix formed by the labels of each node.
Selecting nodes to form a walk path by using a truncated random walk model, for example, randomly selecting adjacent nodes and forming a walk path by taking a certain node as a root node each time. And (4) performing multiple walks on each node to obtain multiple groups of paths formed by the nodes in the graph.
Sixthly, feeding back the walking path obtained in the step to the skip-gram neural network model so as to research the adjacency relation between the nodes. The neural network model learns the adjacency relationships between nodes by recursion, thereby adjusting the vector representation of each node. The objective function of this model is:
Figure BDA0002015235680000131
wherein w is a set critical distance, V represents a node vector, the objective function mainly represents that the ith node vector is used for predicting the i node vectors before the ith node vector, and since we know the actual real values of the ith node vector and the i-1 node vectors before the ith node vector, the aim is to construct a network so as to maximize the probability of correct prediction. And gradually adjusting the vectors of the related nodes by a gradient descent method to finally obtain the representation vectors (namely the first vector and the second vector) of each node, namely completing the vectorization of the graph. At this time, the vector of each node, the connection relationship between nodes, and the type of each node (whether it is a master node or a slave node) are determined.
(3) Second determination module 30
A second determining module 30, configured to determine a recommendation degree of each candidate secondary node according to the keyword set and the candidate primary node.
For example, referring to fig. 10, the second determining module 30 may specifically include:
a first determining unit 31, configured to determine a first relevance of each of the candidate secondary nodes according to the keyword set.
In this embodiment, the first relevancy is mainly used to measure the relevancy between a single candidate secondary node and a keyword set, for example, for a hospital referral system, the first relevancy is used to measure the relevancy between a certain disease and a user input symptom.
Further, the first determining unit 31 may specifically be configured to:
determining a map embedding vector corresponding to each keyword to obtain at least one first map vector;
determining a map embedding vector corresponding to each candidate secondary node to obtain at least one second map vector;
and calculating the sum of the similarity between each second map vector and the at least one first map vector to obtain a first correlation degree of the corresponding candidate secondary node.
In this embodiment, the similarity may be calculated by a cosine similarity function or other similarity functions. After the knowledge graph is constructed, the vector of each node (including the primary node and the secondary node) is already determined, so as long as the primary node corresponding to the keyword is found, the vector of the primary node is the first graph vector, the vector of the secondary node (also called a candidate secondary node) connected to the primary node is the second graph vector, and the picture embedding vector may be a 512-dimensional vector. Then, the similarity between each candidate secondary node and each candidate primary node may be calculated based on the vectors, and the similarities belonging to the same candidate secondary node are summed, and the sum value is used as the first correlation of the candidate secondary node.
For example, for a candidate secondary node d t The first degree of correlation S 1t The calculation formula may be:
Figure BDA0002015235680000141
wherein n is the total number of keywords in the keyword set, Gi is the first map vector corresponding to the ith keyword, G t Is a candidate secondary node d t The corresponding second map vector, sim () is a cosine similarity function.
The second determining unit 32 is configured to determine a second degree of correlation of the corresponding candidate secondary nodes according to the plurality of candidate primary nodes and the keyword set corresponding to the same candidate secondary node.
In this embodiment, the second relevance is mainly used for measuring the relevance between the candidate main node and the keyword set of the same candidate secondary node, for example, for a hospital consultation system, the second relevance is used for measuring the relevance between a symptom of a certain disease and a user input symptom.
For example, the second determining unit 32 may specifically be configured to:
determining a text embedding vector corresponding to each keyword to obtain at least one first text vector;
determining text embedded vectors corresponding to each candidate main node to obtain a plurality of second text vectors;
calculating the similarity between each first text vector and each second text vector, and selecting the maximum similarity corresponding to the same keyword and candidate secondary nodes;
and summing the maximum similarity corresponding to the same candidate auxiliary node to obtain a second correlation corresponding to the candidate auxiliary node.
In this embodiment, the text information corresponding to the keywords and the candidate host node may be converted into a text embedding vector, which may be a 512-dimensional vector, by using a trained fasttext fast text classification model or other classification models, so that the text is converted into a vector space for mathematical computation. The similarity may also be calculated by a cosine similarity function or other similarity functions.
For example, for a candidate secondary node d t The second degree of correlation S 2t The formula of (c) may be:
Figure BDA0002015235680000151
wherein, T tj Represents candidate secondary node d t Of the jth candidate primary node, T i And representing a first text vector corresponding to the ith keyword, wherein sim () is a cosine similarity function.
And a third determining unit 33, configured to determine a recommendation degree of the corresponding candidate secondary node according to the first correlation degree and the second correlation degree.
In this embodiment, the first correlation and the second correlation passing through a candidate secondary node may be weighted to obtain the corresponding recommendation degree. For example, for a candidate secondary node d t The recommendation degree S t May be S t =w1*S 1t +w2*S 2t Wherein w1 and w2 are weighted values.
(4) Third determination Module 40
And a third determining module 40, configured to determine a target node from the candidate primary node and the candidate secondary node according to the recommendation degree.
For example, the third determining module 40 may specifically be configured to:
judging whether the candidate secondary node with the recommendation degree larger than a preset threshold exists or not;
if yes, the candidate auxiliary node is taken as a target node;
if not, determining the repetition degree between each candidate main node and each keyword; and determining a target node from the candidate master nodes according to the repetition degree.
In this embodiment, the preset threshold may be set manually, for example, 0.95. When a candidate secondary node with a recommendation degree greater than a preset threshold exists, push information can be determined according to the candidate secondary node, and a conversation is ended, for example, for a referral system, when the candidate secondary node is a disease name, an outpatient room can be determined according to the disease name, and the outpatient room is provided for a user. When there is no candidate secondary node with the recommendation degree greater than the preset threshold, the user needs to perform a conversation again, and at this time, the selected content given to the user before the next conversation needs to be determined, generally, in order to avoid the user from repeatedly selecting the same content, the duplication degree calculation formula may be used to first remove the options from the options that are the same as the previously selected content, for example, to remove the options with the duplication degree greater than the preset value, and then provide the remaining options as the next conversation information to the user, or provide the specified number of options with the lowest duplication degree as the next conversation information to the user.
Wherein, for a certain candidate master node h i The formula for calculating the repetition degree Q may be:
Figure BDA0002015235680000161
Figure BDA0002015235680000162
Figure BDA0002015235680000163
wherein w represents a candidate master node h i Across the knowledge-graphThe occurrence frequency in the library is used for measuring whether the master node is a common knowledge point or an uncommon knowledge point, k represents a candidate master node h i Of the corresponding candidate secondary node, P 0i Represents the candidate master node h after normalization i Weight of (1), P i Represents the master node candidate h i And weights of the connected secondary nodes can be determined when the knowledge graph is constructed. M represents the number of candidate primary nodes that have been matched in multiple rounds of conversation with the user, h j Representing the candidate master nodes that have been matched, q is an artificially set threshold, e.g., 0.9, sim () is a similarity function. At this time, Q can be filtered out i Taking the rest main nodes as target nodes or taking Q as the main nodes with the value less than the preset value i The maximum specified number of master nodes is the target node.
It should be noted that, besides ending multiple rounds of conversations with the user when the recommendation degree is greater than the preset threshold, it may also be determined whether the conversations can be ended according to the number of conversations, that is, the third determining module 40 is further configured to:
before determining the repetition degree between each candidate main node and each keyword, counting the input times of the input operation of the user;
judging whether the input times are more than preset times or not;
if so, taking the candidate secondary node with the highest recommendation degree as a target node;
if not, executing the operation of determining the repetition degree between each candidate main node and each keyword.
In this embodiment, the preset number of times may be set manually, for example, 5 times. When the number of times of conversation between the user and the server exceeds the preset number of times, the conversation can be ended, and the node with the highest recommendation degree in all candidate secondary nodes corresponding to the user input statement at this time is taken as a target node.
(5) Generation module 50
And a generating module 50, configured to generate recommendation information according to the target node, and provide the recommendation information to the user.
In this embodiment, the recommendation information may be information associated with the target node, and may also include the target node, for example, when the target node is a candidate secondary node, information associated with the candidate secondary node may be acquired as the recommendation information, for example, when the candidate secondary node is a disease name, the association information may be department information and related medical staff information corresponding to the disease name. When the target node is a candidate master node, the candidate master nodes may be ranked from high to low according to the recommendation degree, and the ranked candidate master nodes are displayed to the user as recommendation information so as to perform the next conversation.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the information recommendation apparatus provided in this embodiment obtains a determined keyword set through the obtaining module 10, where the keyword set includes at least one keyword, the first determining module 20 determines at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a constructed knowledge graph, then the third determining module 40 determines a recommendation degree of each candidate secondary node according to the keyword set and the candidate primary nodes, the second determining module 30 determines a target node from the candidate primary nodes and the candidate secondary nodes according to the recommendation degree, then the generating module 50 generates recommendation information according to the target node and provides the recommendation information to the user, so as to perform matching search on input information of the user in combination of two manners of a knowledge graph and a text in a multi-turn conversation system, the matching precision is high, and each dialogue can be flexibly adjusted according to the input content of the user, so that the method is suitable for various dialogue scenes, the application range is wide, the dialogue times can be greatly shortened, and the dialogue efficiency is improved.
Correspondingly, the embodiment of the invention also provides an information recommendation system which comprises any one of the information recommendation devices provided by the embodiment of the invention, and the information recommendation device can be integrated in a server.
The method comprises the steps that a server obtains a keyword set which is input by a user at present, wherein the keyword set comprises at least one keyword; determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a constructed knowledge graph, wherein the knowledge graph comprises a plurality of preset secondary nodes and a plurality of preset primary nodes connected with each preset secondary node; determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary node; determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree; and generating recommendation information according to the target node, and providing the recommendation information for the user.
The specific implementation of each device can be referred to the previous embodiment, and is not described herein again.
Since the image processing system may include any information recommendation device provided in the embodiment of the present invention, the beneficial effects that can be achieved by any information recommendation device provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
Accordingly, an embodiment of the present invention further provides a server, as shown in fig. 11, which shows a schematic structural diagram of the server according to the embodiment of the present invention, specifically:
the server may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, Radio Frequency (RF) circuitry 403, a power supply 404, an input unit 405, and a display unit 406. Those skilled in the art will appreciate that the server architecture shown in FIG. 11 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the server, connects various parts of the entire server using various interfaces and lines, performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the server. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
RF circuit 403 may be used for receiving and transmitting signals during the process of sending and receiving information, and in particular, for receiving downlink information from a base station and processing the received downlink information by one or more processors 401; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 403 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 403 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), etc.
The server also includes a power supply 404 (e.g., a battery) for powering the various components, and preferably, the power supply 404 is logically connected to the processor 401 via a power management system, so that functions such as managing charging, discharging, and power consumption are performed via the power management system. The power supply 404 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may further include an input unit 405, and the input unit 405 may be used to receive input numeric or character information and generate a keyboard, mouse, joystick, optical or trackball signal input in relation to user settings and function control. In particular, in one particular embodiment, input unit 405 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (such as operations by the user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 401, and can receive and execute commands sent by the processor 401. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 405 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The server may also include a display unit 406, and the display unit 406 may be used to display information input by or provided to the user as well as various graphical user interfaces of the server, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 406 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 401 to determine the type of the touch event, and then the processor 401 provides a corresponding visual output on the display panel according to the type of the touch event. Although in FIG. 11 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
Although not shown, the server may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 401 in the server loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
acquiring a determined keyword set, wherein the keyword set comprises at least one keyword;
determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a constructed knowledge graph, wherein the knowledge graph comprises a plurality of preset secondary nodes and a plurality of preset primary nodes connected with each preset secondary node;
determining the recommendation degree of each candidate secondary node according to the keyword set and the candidate primary node;
determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree;
and generating recommendation information according to the target node, and providing the recommendation information for the user.
The electronic device can achieve the effective effect that any one of the information recommendation devices provided by the embodiments of the present invention can achieve, which is detailed in the foregoing embodiments and will not be described herein again.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The information recommendation method, apparatus, storage medium, and server provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (14)

1. An information recommendation method, comprising:
acquiring a determined keyword set, wherein the keyword set comprises at least one keyword which is a symptom name in input information of a user;
determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph, wherein the candidate secondary nodes are disease names, and the candidate primary nodes are symptom names;
determining a first degree of correlation of each candidate secondary node according to the keyword set, wherein the first degree of correlation is used for measuring the correlation between the disease name of the candidate secondary node and the symptom name in the input information;
determining a second degree of correlation corresponding to the candidate secondary node according to the plurality of candidate primary nodes and the keyword set corresponding to the same candidate secondary node, wherein the second degree of correlation is used for measuring the correlation between the candidate primary node as a symptom name and the symptom name in the input information;
determining the recommendation degree of the corresponding candidate secondary node according to the first correlation degree and the second correlation degree;
determining a target node from the candidate main node and the candidate auxiliary node according to the recommendation degree;
and generating recommendation information according to the target node, and providing the recommendation information for the user.
2. The information recommendation method of claim 1, wherein said determining a first relevance of each of said candidate secondary nodes according to said set of keywords comprises:
determining a map embedding vector corresponding to each keyword to obtain at least one first map vector;
determining map embedding vectors corresponding to each candidate secondary node to obtain at least one second map vector;
and calculating the sum of the similarity between each second map vector and the at least one first map vector to obtain a first correlation degree of the corresponding candidate secondary node.
3. The information recommendation method according to claim 1, wherein said determining a second degree of correlation of corresponding candidate secondary nodes according to a plurality of candidate primary nodes corresponding to the same candidate secondary node and the keyword set comprises:
determining a text embedding vector corresponding to each keyword to obtain at least one first text vector;
determining text embedded vectors corresponding to each candidate main node to obtain a plurality of second text vectors;
calculating the similarity between each first text vector and each second text vector, and selecting the maximum similarity corresponding to the same keyword and the candidate secondary node;
and summing the maximum similarity corresponding to the same candidate secondary node to obtain a second correlation degree corresponding to the candidate secondary node.
4. The information recommendation method according to claim 1, wherein the determining a target node from the candidate primary node and the candidate secondary node according to the recommendation degree comprises:
judging whether the candidate secondary node with the recommendation degree larger than a preset threshold exists or not;
if so, taking the candidate auxiliary node as a target node;
if not, determining the repetition degree between each candidate main node and each keyword; and determining a target node from the candidate main nodes according to the repetition degree.
5. The information recommendation method according to claim 4, further comprising, before determining a degree of repetition between each of the candidate master nodes and each of the keywords:
counting the input times of the input operation of the user;
judging whether the input times are greater than preset times or not;
if so, taking the candidate secondary node with the highest recommendation degree as a target node;
and if not, executing the operation of determining the repetition degree between each candidate main node and each keyword.
6. The information recommendation method of claim 1, wherein said obtaining the determined keyword set comprises:
acquiring input information currently input by a user;
determining at least one target word label corresponding to the input information, and acquiring a determined target word label corresponding to historical input operation;
and taking the target word label and the determined target word label as key words to obtain a determined key word set.
7. The information recommendation method according to claim 1, before determining at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph, further comprising:
acquiring a preset auxiliary core word set and a main core word set corresponding to each auxiliary core word in the auxiliary core word set;
determining a first vector variable corresponding to each main core word and a second vector variable corresponding to each auxiliary core word;
determining a first vector corresponding to the first vector variable and a second vector corresponding to the second vector variable by using a preset model and the first vector variable and the second vector variable;
and constructing the knowledge graph according to the first vector and the second vector.
8. An information recommendation device, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a determined keyword set, the keyword set comprises at least one keyword, and the keyword is a symptom name in input information of a user;
a first determining module, configured to determine, according to a knowledge graph, at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node, where the candidate secondary nodes are disease names and the candidate primary nodes are symptom names;
a second determining module, configured to determine a first relevance of each candidate secondary node according to the keyword set, where the first relevance is used to measure a relevance between a disease name of the candidate secondary node and a symptom name in the input information; determining a second correlation degree of corresponding candidate secondary nodes according to a plurality of candidate primary nodes and the keyword set corresponding to the same candidate secondary node, wherein the second correlation is used for measuring the correlation between the symptom names of the candidate primary nodes and the symptom names in the input information; determining the recommendation degree of the corresponding candidate secondary node according to the first correlation degree and the second correlation degree;
a third determining module, configured to determine a target node from the candidate primary node and the candidate secondary node according to the recommendation degree;
and the generation module is used for generating recommendation information according to the target node and providing the recommendation information for the user.
9. The information recommendation device according to claim 8, wherein the second determination module comprises:
a first determining unit, configured to determine a first relevance of each candidate secondary node according to the keyword set;
the second determining unit is used for determining a second degree of correlation of corresponding candidate secondary nodes according to the plurality of candidate primary nodes and the keyword set corresponding to the same candidate secondary node;
and the third determining unit is used for determining the recommendation degree of the corresponding candidate secondary node according to the first correlation degree and the second correlation degree.
10. The information recommendation device according to claim 8, wherein the third determining module is specifically configured to:
judging whether the candidate secondary node with the recommendation degree larger than a preset threshold exists or not;
if so, taking the candidate auxiliary node as a target node;
if not, determining the repetition degree between each candidate main node and each keyword; and determining a target node from the candidate main nodes according to the repetition degree.
11. The information recommendation device of claim 10, wherein the third determining module is further configured to:
before determining the repetition degree between each candidate main node and each keyword, counting the input times of the input operation of a user;
judging whether the input times are greater than preset times or not;
if so, taking the candidate secondary node with the highest recommendation degree as a target node;
if not, executing the operation of determining the repetition degree between each candidate main node and each keyword.
12. The information recommendation device of claim 8, further comprising a construction module configured to:
before the first determining module determines at least one candidate secondary node corresponding to each keyword and a plurality of candidate primary nodes corresponding to each candidate secondary node according to a knowledge graph, acquiring a preset secondary core word set and a primary core word set corresponding to each secondary core word in the secondary core word set;
determining a first vector variable corresponding to each main core word and a second vector variable corresponding to each auxiliary core word;
determining a first vector corresponding to the first vector variable and a second vector corresponding to the second vector variable by using a preset model and the first vector variable and the second vector variable;
and constructing the knowledge graph according to the first vector and the second vector.
13. A computer-readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the information recommendation method of any one of claims 1-7.
14. A server, comprising a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps of the information recommendation method according to any one of claims 1 to 7.
CN201910260910.6A 2019-04-02 2019-04-02 Information recommendation method and device, storage medium and server Active CN110033851B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910260910.6A CN110033851B (en) 2019-04-02 2019-04-02 Information recommendation method and device, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910260910.6A CN110033851B (en) 2019-04-02 2019-04-02 Information recommendation method and device, storage medium and server

Publications (2)

Publication Number Publication Date
CN110033851A CN110033851A (en) 2019-07-19
CN110033851B true CN110033851B (en) 2022-07-26

Family

ID=67237178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910260910.6A Active CN110033851B (en) 2019-04-02 2019-04-02 Information recommendation method and device, storage medium and server

Country Status (1)

Country Link
CN (1) CN110033851B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797663A (en) * 2019-08-02 2020-10-20 北京京东尚科信息技术有限公司 Collocation scene recognition method and device
CN110738545A (en) * 2019-08-30 2020-01-31 深圳壹账通智能科技有限公司 Product recommendation method and device based on user intention identification, computer equipment and storage medium
CN110703614B (en) * 2019-09-11 2021-01-22 珠海格力电器股份有限公司 Voice control method and device, semantic network construction method and device
CN110909159B (en) * 2019-09-29 2022-09-16 珠海格力电器股份有限公司 User intention identification method, device, terminal and storage medium
CN111159369B (en) * 2019-12-18 2023-12-05 平安健康互联网股份有限公司 Multi-round intelligent inquiry method, device and computer readable storage medium
CN111159390B (en) * 2019-12-31 2024-06-18 联想(北京)有限公司 Information extraction method, device and storage medium
CN111241241B (en) * 2020-01-08 2024-05-31 平安科技(深圳)有限公司 Case retrieval method, device, equipment and storage medium based on knowledge graph
WO2021145823A1 (en) * 2020-01-17 2021-07-22 National University Of Singapore Advanced conversational recommender system
CN111488462B (en) * 2020-04-02 2023-09-19 中国移动通信集团江苏有限公司 Recommendation method, device, equipment and medium based on knowledge graph
CN111768234B (en) * 2020-06-28 2023-12-19 百度在线网络技术(北京)有限公司 Method and equipment for generating recommended text for user, electronic equipment and medium
CN112035567B (en) * 2020-08-21 2023-12-12 腾讯科技(深圳)有限公司 Data processing method, device and computer readable storage medium
CN112507128A (en) * 2020-12-07 2021-03-16 云南电网有限责任公司普洱供电局 Content filling prompting method for power distribution network operation file and related equipment
CN113762451B (en) * 2021-08-27 2024-02-27 康旭科技有限公司 Task type question-answering robot based on scene and keyword rules
CN115292477B (en) * 2022-07-18 2024-04-16 盐城天眼察微科技有限公司 Method and device for judging push similar articles, storage medium and electronic equipment
CN115544265A (en) * 2022-09-13 2022-12-30 南京航空航天大学 Bearing fault diagnosis method based on bearing fault knowledge graph
CN117148705B (en) * 2023-11-01 2024-01-16 博纯材料股份有限公司 Equipment running state detection method and system based on data monitoring analysis

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514304A (en) * 2013-10-29 2014-01-15 海南大学 Project recommendation method and device
KR20140067697A (en) * 2012-11-27 2014-06-05 한국과학기술정보연구원 System and method for supplying collaboration partner search service
CN103870461A (en) * 2012-12-10 2014-06-18 腾讯科技(深圳)有限公司 Topic recommendation method, device and server
US9665662B1 (en) * 2013-06-13 2017-05-30 DataRPM Corporation Methods and system for providing real-time business intelligence using natural language queries
CN106960014A (en) * 2017-03-02 2017-07-18 合网络技术(北京)有限公司 Association user recommends method and device
CN108829822A (en) * 2018-06-12 2018-11-16 腾讯科技(深圳)有限公司 The recommended method and device of media content, storage medium, electronic device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10755233B2 (en) * 2012-06-05 2020-08-25 Dimensional Insight Incorporated Guided page navigation
CN105653706B (en) * 2015-12-31 2018-04-06 北京理工大学 A kind of multilayer quotation based on literature content knowledge mapping recommends method
CN107545000A (en) * 2016-06-28 2018-01-05 百度在线网络技术(北京)有限公司 The information-pushing method and device of knowledge based collection of illustrative plates
CN106776711B (en) * 2016-11-14 2020-04-07 浙江大学 Chinese medical knowledge map construction method based on deep learning
CN108399180B (en) * 2017-02-08 2021-11-26 腾讯科技(深圳)有限公司 Knowledge graph construction method and device and server
CN106991284B (en) * 2017-03-31 2019-12-31 南华大学 Intelligent child-care knowledge service method and system
US20190073914A1 (en) * 2017-09-01 2019-03-07 International Business Machines Corporation Cognitive content laboratory
CN108804419A (en) * 2018-05-22 2018-11-13 湖南大学 Medicine is sold accurate recommended technology under a kind of line of knowledge based collection of illustrative plates

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140067697A (en) * 2012-11-27 2014-06-05 한국과학기술정보연구원 System and method for supplying collaboration partner search service
CN103870461A (en) * 2012-12-10 2014-06-18 腾讯科技(深圳)有限公司 Topic recommendation method, device and server
US9665662B1 (en) * 2013-06-13 2017-05-30 DataRPM Corporation Methods and system for providing real-time business intelligence using natural language queries
CN103514304A (en) * 2013-10-29 2014-01-15 海南大学 Project recommendation method and device
CN106960014A (en) * 2017-03-02 2017-07-18 合网络技术(北京)有限公司 Association user recommends method and device
CN108829822A (en) * 2018-06-12 2018-11-16 腾讯科技(深圳)有限公司 The recommended method and device of media content, storage medium, electronic device

Also Published As

Publication number Publication date
CN110033851A (en) 2019-07-19

Similar Documents

Publication Publication Date Title
CN110033851B (en) Information recommendation method and device, storage medium and server
CN110599557B (en) Image description generation method, model training method, device and storage medium
CN111602147B (en) Machine learning model based on non-local neural network
CN110334344B (en) Semantic intention recognition method, device, equipment and storage medium
CN111444329B (en) Intelligent conversation method and device and electronic equipment
Wang et al. Friendbook: a semantic-based friend recommendation system for social networks
CN111105852B (en) Electronic medical record recommendation method, device, terminal and storage medium
CN108280458B (en) Group relation type identification method and device
US8620846B2 (en) Method and system for improving personal productivity in home environments
CN107111475A (en) Manage and understand the user mutual determined for inputting
CN109033156B (en) Information processing method and device and terminal
CN109635098B (en) Intelligent question and answer method, device, equipment and medium
CN109684510A (en) Video sequencing method, device, electronic equipment and storage medium
WO2018120425A1 (en) Personal property status assessing method, apparatus, device, and storage medium
CN110119477B (en) Information pushing method, device and storage medium
WO2018120426A1 (en) Personal health status evaluation method, apparatus and device based on location service, and storage medium
RU2630373C2 (en) Method and device for clustering
CN112131401B (en) Concept knowledge graph construction method and device
CN110110045A (en) A kind of method, apparatus and storage medium for retrieving Similar Text
CN116975295B (en) Text classification method and device and related products
CN111611369B (en) Interaction method and related device based on artificial intelligence
CN106131296A (en) Information displaying method and device
CN113766633A (en) Data processing method, data processing device, electronic equipment and storage medium
CN111553163A (en) Text relevance determining method and device, storage medium and electronic equipment
CN116959733A (en) Medical data analysis method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant