CN111625723A - Information correlation query method and device - Google Patents

Information correlation query method and device Download PDF

Info

Publication number
CN111625723A
CN111625723A CN202010466785.7A CN202010466785A CN111625723A CN 111625723 A CN111625723 A CN 111625723A CN 202010466785 A CN202010466785 A CN 202010466785A CN 111625723 A CN111625723 A CN 111625723A
Authority
CN
China
Prior art keywords
food
correlation
query
query text
names
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010466785.7A
Other languages
Chinese (zh)
Inventor
王心蕾
刘玉璇
许嘉明
杨菲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development 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 Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN202010466785.7A priority Critical patent/CN111625723A/en
Publication of CN111625723A publication Critical patent/CN111625723A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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/3331Query processing
    • G06F16/334Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a method and a device for inquiring information relevance, wherein the method comprises the following steps: acquiring a search request input by a user through a client; judging whether the search request is a food correlation information query request or not according to a query text included in the search request; if so, extracting at least two food names included in the query text, and acquiring relevant relation data corresponding to the at least two food names; and filling at least two food names and corresponding correlation data into corresponding slots of the display template, so that the client can display the filled display template. The filled display template is displayed through the client, the correlation relationship can be directly displayed to the user, the user can directly obtain the query result of the information correlation through the display of the client, and the operation of the user is reduced.

Description

Information correlation query method and device
Technical Field
The application relates to the technical field of internet, in particular to an information correlation query method and device.
Background
An information relevance query refers to a query for a relevance relationship between things, e.g., whether or not queries a and B are related. When the user queries the information relevance through the client, the corresponding query result with the relevance relation can be obtained. However, in the existing information correlation query, a user needs to perform multiple operations to obtain a query result of a correlation relationship, so that the user cannot obtain the correlation relationship in time.
Disclosure of Invention
In view of this, embodiments of the present application provide an information relevance query method and apparatus, so as to solve the problem that in the prior art, when a user performs information relevance query, operations are complex, and a relevance relationship cannot be timely obtained through a search result.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
an information relevance query method, the method comprising:
acquiring a search request input by a user through a client, wherein the search request comprises a query text;
judging whether the search request is a food correlation information query request or not according to the query text;
if the search request is a food correlation information query request, extracting at least two food names included in the query text;
acquiring related relation data corresponding to at least two food names included in the query text;
and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of a display template, so that the client displays the filled display template.
In one possible implementation, the method further includes:
extracting food correlation relation information from a webpage comprising food correlation relations, and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
In a possible implementation manner, the obtaining of the relevant relationship data corresponding to at least two food names included in the query text includes:
inquiring whether relevant relation data corresponding to at least two food names included in the inquiry text exists in the food relevant relation list;
and if so, acquiring the relevant relation data corresponding to at least two food names included in the query text from the food relevant relation list.
In a possible implementation manner, the determining whether the search request is a food-related information query request according to the query text includes:
judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names;
or, judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names and a specified keyword.
In a possible implementation manner, the filling, into corresponding slots of a presentation template, at least two food names included in the query text and correlation data corresponding to the at least two food names included in the query text includes:
allocating and filling at least two food names included in the query text into food name slots of a display template, and filling the relevant relationship data corresponding to the at least two food names included in the query text into relevant relationship slots of the display template; the correlation slot position comprises whether the food can be eaten with the food slot position or not and whether the food can be eaten with the food reason slot position or not.
In one possible implementation, the method further includes:
in response to a modification to at least one food name in the presentation template, extracting the most recent at least two food names in the presentation template;
acquiring related relation data corresponding to at least two latest food names in the display template;
and updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
An information relevance querying apparatus, the apparatus comprising:
the search request acquisition unit is used for acquiring a search request input by a user through a client, wherein the search request comprises a query text;
a search request judging unit, configured to judge whether the search request is a food-related information query request according to the query text;
a food name extracting unit, configured to extract at least two food names included in the query text if the search request is a food-related information query request;
the related relation data acquisition unit is used for acquiring related relation data corresponding to at least two food names included in the query text;
and the display template filling unit is used for filling at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text into corresponding slots of the display template, so that the client displays the filled display template.
In one possible implementation, the apparatus further includes:
the food correlation relation list establishing unit is used for extracting food correlation relation information from a webpage comprising food correlation relations and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
In a possible implementation manner, the correlation data obtaining unit is specifically configured to query whether there is correlation data corresponding to at least two food names included in the query text from the food correlation list; and if so, acquiring the relevant relation data corresponding to at least two food names included in the query text from the food relevant relation list.
In a possible implementation manner, the search request determining unit includes:
a food name judging subunit, configured to judge whether the search request is a food-related information query request according to whether the query text includes at least two food names;
alternatively, the first and second electrodes may be,
and the keyword judgment subunit is used for judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names and the specified keyword.
In a possible implementation manner, the display template filling unit is specifically configured to allocate and fill at least two food names included in the query text into a food name slot of a display template, and fill the relevant relationship data corresponding to the at least two food names included in the query text into a relevant relationship slot of the display template; the correlation slot position comprises whether the food can be eaten with the food slot position or not and whether the food can be eaten with the food reason slot position or not.
In one possible implementation, the apparatus further includes:
an extraction unit for extracting at least two latest food names in the presentation template in response to a modification to at least one food name in the presentation template;
the acquisition unit is used for acquiring the related relation data corresponding to at least two latest food names in the display template;
and the related relation data updating unit is used for updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
An information relevancy query apparatus comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for:
acquiring a search request input by a user through a client, wherein the search request comprises a query text;
judging whether the search request is a food correlation information query request or not according to the query text;
if the search request is a food correlation information query request, extracting at least two food names included in the query text;
acquiring related relation data corresponding to at least two food names included in the query text;
and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of a display template, so that the client displays the filled display template.
A computer-readable medium having stored thereon instructions, which, when executed by one or more processors, cause an apparatus to perform the information correlation query method described above.
Therefore, the embodiment of the application has the following beneficial effects:
according to the information correlation query method provided by the embodiment of the application, the search request input by the user through the client is obtained, the query text is obtained from the search request, and whether the search request is the food correlation information query request or not is judged according to the query text. If so, extracting at least two food names included in the query text, and acquiring relevant relation data corresponding to the at least two food names. And then, filling at least two food names and corresponding correlation data in the query text into corresponding slots of the display template, so that the client can display by using the filled display template. At least two food names and corresponding correlation data are filled into the slots of the display template and displayed through the display template, so that the correlation data can be directly displayed to a user through the display template. The user can directly obtain the correlation through the slot position filled in the display template without carrying out multiple operations.
Drawings
Fig. 1 is a schematic frame diagram of an exemplary application scenario of an information relevance query method according to an embodiment of the present application;
fig. 2 is a schematic frame diagram of an exemplary application scenario of another information relevance query method provided in an embodiment of the present application;
fig. 3 is a flowchart of an information relevance query method according to an embodiment of the present application;
fig. 4 is a flowchart of another information relevance query method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an information correlation query apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a client according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
In order to facilitate understanding of the technical solutions provided in the present application, the following description will first be made on the background of the present application.
After researching the traditional information correlation query method, the inventor finds that when a user searches for information correlation, the user initiates a search request with information correlation, and hopes to obtain correlation between information. However, the search result corresponding to the search request is generally a web page, a question answer, or the like having related relationship information. The user needs to further check in sequence through the web pages or questions and answers shown in the search results to determine the correlation between the information. For example, a user may have multiple web page links in the search "apple and milk may eat together" resulting in search results. Wherein, the related web pages or questions and answers in the displayed search results may relate to the related contents such as "apple", "milk", "apple and milk", "can be eaten together with apple", "milk and nothing can be eaten together". The user needs to search for the content related to the search request in the search result, and then click the web page link displayed in the search result to jump the web page. Furthermore, after the user skips the webpage, the user needs to read the text in the webpage and search the correlation in the webpage. This makes the operation of the user inconvenient, requires a lot of time to search for the correlation, and cannot timely acquire the correlation through the search result.
Based on this, an embodiment of the present application provides an information correlation query method, which specifically includes: acquiring a search request input by a user through a client; judging whether the search request is a food correlation information query request or not according to a query text included in the search request; if so, extracting at least two food names included in the query text, and acquiring relevant relation data corresponding to the at least two food names; and filling at least two food names and corresponding correlation data into corresponding slots of the display template, so that the client can display the filled display template. The filled display template is displayed through the client, the correlation relationship can be directly displayed to the user, the user can directly obtain the query result of the information correlation through the display of the client, and the operation of the user is reduced.
In order to facilitate understanding of the information relevance query method provided in the embodiment of the present application, an application scenario of the information relevance query method provided in the embodiment of the present application is first described with reference to fig. 1. Fig. 1 is a schematic diagram of a framework of an exemplary application scenario of an information relevance query method according to an embodiment of the present application. The information correlation query method provided by the embodiment of the application can be applied to the server 20.
In practical applications, the server 20 may obtain a search request input by the user through the client 10, and determine whether the search request is a food-related information query request according to the query text in the search request. If so, extracting at least two food names included in the query text, and acquiring relevant relation data corresponding to the at least two food names. And finally, filling at least two food names and corresponding correlation relations into corresponding slots of the display template, so that the client 10 displays the filled display template.
In another possible application scenario, the information relevance query method provided in the embodiment of the present application may be applied to the client 10, and fig. 2 is a schematic diagram of an exemplary application scenario of another information relevance query method provided in the embodiment of the present application. The client 10 acquires a search request input by a user, and judges whether the search request is a food correlation information query request or not according to a query text in the search request; if so, extracting at least two food names included in the query text, and acquiring relevant relation data corresponding to the at least two food names; and filling at least two food names and the related relation data corresponding to the at least two food names into the display template. The client 10 displays the populated display template so that the user can obtain the correlation relationship through the display template.
Those skilled in the art will appreciate that the frame diagrams shown in fig. 1 and 2 are only two examples in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the present application is not limited in any way by this framework.
It is noted that client 10 may be any user device now existing, developing or later developed that is capable of interacting with each other through any form of wired and/or wireless connection (e.g., Wi-Fi, LAN, cellular, coaxial, etc.), including but not limited to: smart wearable devices, smart phones, non-smart phones, tablets, laptop personal computers, desktop personal computers, minicomputers, midrange computers, mainframe computers, and the like, either now in existence, under development, or developed in the future. The embodiments of the present application are not limited in any way in this respect. It should also be noted that the server 20 in the embodiment of the present application may be an example of an existing device, a device under development or a device developed in the future, which is capable of performing the above operations. The embodiments of the present application are not limited in any way in this respect.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the information correlation query method provided by the embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 3, which is a flowchart of an information relevance query method provided in an embodiment of the present application, as shown in fig. 3, the method may include S301 to S305:
s301: and acquiring a search request input by a user through a client, wherein the search request comprises query text.
When a user encounters a problem of whether there is a correlation between things, the user typically initiates a search for the correlation between things to obtain correlation information between things. Specifically, a user inputs a search request through a client, and then obtains a correlation between searched objects from a search result corresponding to the search request displayed by the client. For example, when food is consumed, part of the food consumed together may cause food poisoning. The user may input a search request through the client before eating the food to obtain the correlation between different foods.
The search request input by the user comprises query text, and the query text refers to the text input by the user and used for representing the search content. The query content of the user can be obtained through the query text in the search request. For example, when a user wants to know the relationship between eggs and sweet potatoes, a query text such as "whether eggs and sweet potatoes can be eaten together" or "eggs and sweet potatoes" is input in the search bar of the client, and the query text is used for representing the content to be queried in the search. The content to be queried searched by the user at the present time can be obtained through the query text in the search request input by the user, and the corresponding search result can be conveniently determined subsequently.
S302: and judging whether the search request is a food correlation information query request or not according to the query text.
After a search request input by a user through a client is acquired, the content of the search request can be determined according to the query text in the search request, and whether the search request is a food-related information query request can be further judged according to the query text.
For the food correlation information query request, the user focuses more on the correlation between the queried foods, rather than the characteristics and functions of the foods. The search results corresponding to the existing food correlation information query request do not directly display the correlation of food, and a user is required to read in a specific webpage. Furthermore, the search result usually also has a description of the function or action of the food, which makes the user need to further extract information from the search result to obtain the food-related relationship.
Therefore, in order to enable the user to obtain the correlation of food in time, the embodiment of the application may process the query request pertaining to the food correlation information. Namely, when the search request is determined to be a food-related information query request, the subsequent process is triggered.
The embodiment of the application can judge whether the search request is a food correlation information query request or not through the extracted keywords in the query text. In a possible implementation manner, the step S302 of determining whether the search request is a food-related information query request according to the query text may specifically include: judging whether the search request is a food correlation information query request or not according to whether the query text comprises at least two food names; or, whether the search request is a food-related information query request is judged by whether the query text includes at least two food names and a specified keyword.
In a first implementation, whether the search request is a food-related information query request may be determined by determining whether at least two food names are included in the query text. In practical applications, the query text may be compared with a preset food name list to determine whether at least two food names are included in the query text.
However, the search request is determined as the food-related information query request only by including at least two food names in the query text, and there is a possibility that the search request including a plurality of food names is erroneously determined as the food-related information query request. For example, when a user searches for recipes, the query text also has a plurality of food names. For another example, when a user performs a search for related ingredients of a food item, the query request also includes a plurality of food names. The search request is judged only by whether at least two food names are included in the query text, and other search requests for searching food-related information are easily erroneously judged as food-related query requests.
Based on the above problem, in a second implementation manner, on the basis of determining whether the query text includes at least two food names, it may be determined whether the query text has a specified keyword. The specified keyword may be a word commonly used when making a food-related information query request, such as "with food", "eat together", "fight against", and "food poisoning", and the like. In a possible implementation manner, keywords extracted from historical food relevance information query requests except for food names are used as the specified keywords by obtaining a large number of historical food relevance information query requests. When the query text comprises at least two food names and specified keywords, the corresponding search request is a food correlation information query request.
Therefore, the category of the search request can be determined more accurately by judging the vocabulary contained in the query text.
S303: if the search request is a food-related information query request, at least two food names included in the query text are extracted.
Based on the above description, when the search request is determined to be a food correlation information query request, the query text has at least two food names to be subjected to correlation query. When the search request is a food correlation information query request, the names of the foods included in the query text can be extracted from the query text, so that the correlation between the foods can be determined and displayed according to the correlation between the foods.
S304: and acquiring the related relation data corresponding to at least two food names included in the query text.
After the at least two food names included in the query text are obtained, the correlation data corresponding to the at least two food names can be obtained. The related relation data at least comprises data for indicating whether the foods can be eaten with each other, and the related relation data also comprises reasons of whether the foods can be eaten with each other and the like.
When the number of the food names included in the query text is greater than two, the correlation data corresponding to at least two food names may be correlation data between partial food names included in the query text, may also be correlation data common to all food names, and may also be correlation data between partial food names and correlation data corresponding to all food names, so that correlation data of different numbers may be obtained. For example, when the query text has names of three foods, namely sweet potato, egg and milk, the obtained correlation data may be any one of the following three types: one can be the data of the correlation relationship between the sweet potatoes and the eggs, the data of the correlation relationship between the sweet potatoes and the milk and the data of the correlation relationship between the eggs and the milk, and 3 pieces of data of the correlation relationship can be obtained at the moment; the other type can be the correlation data of the sweet potatoes, the eggs and the milk, and at the moment, 1 piece of correlation data can be obtained; the third type can be the data of the correlation relationship between the sweet potatoes and the eggs, the data of the correlation relationship between the sweet potatoes and the milk, the data of the correlation relationship between the eggs and the milk and the data of the correlation relationship between the sweet potatoes, the eggs and the milk, and at this time, 4 pieces of data of the correlation relationship can be obtained.
In the embodiment of the present application, a method for obtaining correlation data corresponding to at least two food names is not limited, and in a possible implementation manner, correlation data in a web page may be obtained according to a search request. In another possible implementation manner, since the correlation between the foods is relatively fixed, a corresponding food correlation list may be established in advance, and the correlation data may be obtained through the established food correlation list. The embodiment of the present application further provides an implementation manner of obtaining relevant relationship data corresponding to at least two food names included in the query text in S304, and the specific implementation manner is as follows.
S305: and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of the display template, so that the client displays the filled display template.
After obtaining at least two food names and the correlation corresponding to the at least two food names, the food names and the correlation data may be filled into the slots of the display template. The key information in the food correlation information query request can be displayed through the display template, and then displayed to the user through the client. The user can directly obtain the required information and can timely obtain the relevant relation corresponding to the food name without other operations.
The display template may be a pre-established template for displaying the food name, the correlation corresponding to the food name, and the reason of the correlation. The display template can be provided with a corresponding slot position of the information to be displayed, and the final display template with the information to be displayed can be obtained by filling the corresponding information into the slot position.
The slot position layout of the display template is not limited in the embodiment of the application. For example, the display template may consist of three rows of slots, a first row of slots for filling at least two food names, a second row of slots for filling the correlation, and a third row of slots for filling the correlation cause. The first line of slots can be formed by arranging a plurality of food name slots, the food name slots can be connected by AND, and different numbers of food names can be displayed by matching different display templates.
The embodiment of the present application further provides an implementation manner, in S305, that at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text are filled in corresponding slots of the display template, please refer to the following specifically.
Based on the above, in the information relevance query method provided in the embodiment of the present application, first, whether a search request is a food relevance information query request is determined according to a query text in the obtained search request; if the search request is a food correlation information query request, acquiring at least two food names in a query text for further acquiring correlation data corresponding to the at least two food names; and after the correlation data is obtained, filling the at least two food names and the correlation data corresponding to the at least two food names into the display template. By means of the display template, the key information can be directly displayed, a user does not need to read a long text, and the food correlation relation is obtained through analysis of the text. And moreover, the client side is used for displaying through the display template, so that a user can directly obtain the key information in the display template from the display template without performing webpage skipping operation according to the link in the search result. Therefore, the user can timely acquire the correlation among the foods through a small number of operations.
It can be understood that the correlation corresponding to the food name is relatively fixed, and in order to facilitate the user to query the food correlation information, a food correlation list can be pre-established. When a user inquires, the correlation corresponding to the food name can be directly obtained according to the established food correlation list, and the time for obtaining the correlation data corresponding to the food name is shortened.
Based on the above, an embodiment of the present application provides a method for establishing a food correlation list, including:
and extracting food correlation relation information from the webpage comprising the food correlation relation, and establishing a food correlation relation list. The food correlation relationship list includes food correlation relationship data, each of which includes: at least two food names and at least two kinds of food name corresponding correlation data.
The extracting of the food related relationship information from the web page including the food related relationship may specifically be that, from the web page including the food information, a plurality of food names included in the web page and related relationships among the various food names are mined.
The method comprises the steps of obtaining food related relationship information from a webpage, wherein the food related relationship specifically can be related relationships such as whether multiple foods can be eaten simultaneously, what side effects the multiple foods have with the foods, whether the multiple foods can cause food poisoning, and the like. The food correlation information may include information such as the name of the food, the correlation between the foods, and the reason corresponding to the correlation. In one possible implementation, the food correlation information may be acquired by acquiring information of keywords having food correlation in a network. The keywords of the food-related relationship may include the names of food, "co-eating" and "food poisoning", etc.
And establishing a food correlation relation list according to the obtained food correlation relation information, wherein the food correlation relation list comprises at least one piece of food correlation relation data. Each food incidence relation data comprises at least two food names and incidence relation data corresponding to the at least two food names. The food association relation data may be extracted from the food-related relation information. For example, the food-related relationship information obtained from the web page is that "eating durian with wine will cause alcoholic liver damage due to sulfur-containing substances in durian. It may affect the metabolism of alcohol, make people more susceptible to intoxication, and may increase the damage of alcohol to the body ". According to the extracted food correlation relationship information, the food names in the corresponding food correlation relationship data in the obtained food correlation relationship list are respectively 'durian' and 'wine', the corresponding correlation relationship data are 'incapable of eating with the same food', and the correlation relationship is caused by 'sulfur-containing substances in durian, so that the metabolism of alcohol is possibly influenced, people are more easily drunk, and the damage of alcohol to bodies can be increased'.
By extracting a large amount of food correlation relationship information in the webpage, a food correlation relationship list with a wider range of inclusion can be established. When the user inquires the food correlation relationship, the correlation relationship of the corresponding food can be directly obtained through the established food correlation relationship list.
It should be noted that, since the same food may have a plurality of names, for example, tomatoes may also be called tomatoes. In order to facilitate the user to search for the correlation relationship by using the alias of the food, the corresponding correlation relationship may also be obtained, and the food name in the food correlation relationship list may also include the alias of the food.
In addition, in order to facilitate the user to obtain the reason corresponding to the correlation relationship after obtaining the correlation relationship of the food, the correlation relationship data in the food correlation relationship data may further include the reason corresponding to the correlation relationship. For example, the food names in the food association data are durian and wine, and the corresponding association data are that the food cannot be eaten at the same time and that the sulfur-containing substances in durian may influence the metabolism of alcohol and increase the damage of alcohol to the body.
Based on the above, in the embodiment of the present application, by establishing the food correlation relationship list, the food correlation relationship information in the web page may be extracted. When a user inquires the food correlation information, the correlation data corresponding to the food name can be directly obtained from the established food correlation list, and the correlation data is filled into the display template quickly and displayed for the user.
Further, based on the above method for establishing a food correlation list, an embodiment of the present application further provides a method for acquiring correlation data, that is, the implementation manner for acquiring correlation data corresponding to at least two food names included in the query text in S304 may specifically include the following two steps:
a1: and inquiring whether the related relation data corresponding to at least two food names included in the inquiry text exists in the food related relation list.
After the search request is determined to be a food correlation information query request, whether correlation relation data corresponding to at least two food names included in the query text exists or not is queried in the food correlation relation list according to the at least two food names extracted from the query text. In one possible implementation, the corresponding correlation data may be queried according to the food name.
It should be noted that, when the number of the food names extracted from the query text is more than two, and the correlation data is queried, one query method may be to arbitrarily select a certain number of food names from the food names extracted from the query text for correlation query, where the number of the selected food names is less than the number of the types of all the foods extracted from the query text; another query method can be to query all food names extracted by using the query text; the third query mode may be to select food names less than or equal to the number of categories from the food names extracted from the query text to perform the query of the correlation. The category number refers to the category number of all foods extracted by the query text.
For example, when the query text has three food names of "sweet potato", "egg" and "milk", a corresponding query mode may be to query by using "sweet potato and egg", "sweet potato and milk" and "egg and milk"; the other query mode can be to query by using sweet potatoes, eggs and milk; the third query mode may be query by using "sweet potato and egg", "sweet potato and milk", "egg and milk" and "sweet potato, egg and milk".
Considering that part of food has various names, when inquiring, besides directly inquiring the name of the food included in the inquiring text, other names corresponding to the food can be obtained, and the other names of the food are used for inquiring the related relation data. For example, two food names included in the query text are "tomato" and "shrimp", and when the query is performed, in addition to the related query using "tomato", the query may be performed using an alias of "tomato" corresponding to "tomato".
A2: and if so, acquiring the related relation data corresponding to at least two food names included in the query text from the food related relation list.
And when the food correlation relation list has correlation relation data corresponding to at least two food names included in the query text, acquiring the corresponding correlation relation data from the food correlation relation list for subsequent filling of the display module.
In the embodiment of the application, the correlative relation data corresponding to at least two food names is inquired in the established food correlative relation list, so that the correlative relation data corresponding to at least two food names can be quickly obtained through the food correlative relation list, and a user can conveniently obtain the food correlative relation in time.
In addition, according to the above S305, at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text are filled into the corresponding slots of the display template, so that the client can know the relevant content displayed on the filled display template, and the display template has slots corresponding to the at least two food names and the correlation data.
Based on this, an embodiment of the present application provides a method for filling a slot of a display template, that is, in S305, the at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text are filled into the corresponding slot of the display template, so that the client displays the filled display template, which specifically includes:
and distributing and filling at least two food names included in the query text into the food name slot positions of the display template, and filling the relevant relation data corresponding to the at least two food names included in the query text into the relevant relation slot positions of the display template, wherein the relevant relation slot positions include whether the food can be eaten together with the food slot positions and whether the food can be eaten together with the food reason slot positions.
When the user is presented with the food-related information, the user needs to have the food name and the related relationship. Correspondingly, the display template is provided with a food name slot position and a correlation slot position, wherein the correlation slot position comprises whether the food name slot position can be matched with the food slot position and whether the food reason slot position can be matched with the food reason slot position.
It should be noted that the style and the number of the display template may be determined according to the number of food names included in the query text, the number of the queried related relationship data, and the number of food names corresponding to the related relationship data. Different numbers of food name slots may be provided in different styles of display templates. And the correlation slot position in each display template is used for filling correlation data corresponding to the food name in each food name slot position of the display template. And the related relation data is acquired, wherein whether the same food can be filled into the same food groove or not can be acquired, and the corresponding reason is filled into the same food reason groove or not.
When the query text comprises two food names, the number of the food name slots of the determined display template is 2, and the correlation slot is used for filling correlation data corresponding to the two food names.
When the query text includes more than two food names, in the first scenario, if a plurality of pieces of correlation data are obtained, a plurality of presentation templates may be used for presentation. The number of the display templates can be determined according to the number of the queried related relationship data, and the number of the food name slots of the corresponding display template can be determined according to the number of the food names corresponding to each piece of related relationship data. For example, three food names of sweet potatoes, eggs and milk are contained in the query text, and when the acquired correlation data include 3 pieces of correlation data, namely correlation data of the sweet potatoes and the eggs, correlation data of the sweet potatoes and the milk and correlation data of the eggs and the milk, 3 display templates can be determined, and the number of food name slots of each display template is 2. Sweet potatoes and eggs are filled in the food name slot position in the first display template, the correlation data of the sweet potatoes and the eggs are filled in the correlation slot position, and the rest can be done in the same way. When the acquired correlation data comprises correlation data of sweet potatoes, eggs and milk, 1 display template can be determined, the number of food name slot positions of the display template is 3, the food name slot positions in the display template are filled with the sweet potatoes, the eggs and the milk, and the correlation data of the sweet potatoes, the eggs and the milk are filled in the correlation slot positions. When the acquired correlation data includes 4 pieces of correlation data, namely, correlation data of sweet potatoes and eggs, correlation data of eggs and milk, correlation data of the sweet potatoes, the eggs and the milk, and correlation data of the sweet potatoes, the eggs and the milk, 4 display templates can be determined, wherein the number of the food name slots of 3 display templates is 2, and the number of the food name slots of 1 display template is 3.
When the query text includes two or more food names, in the second scenario, if a plurality of pieces of correlation data are obtained, the correlation data most correlated with the query text is displayed using the display template. The relevant relationship data with the largest number of corresponding food names in the queried relevant relationship data can be determined as the relevant relationship data most relevant to the query text, and the display template is used for displaying. The number of the food name slots of the display template is the number of the food names corresponding to the most relevant correlation data of the query text. For example, the query text has names of three foods, namely sweet potato, egg and milk, and when the acquired correlation data includes 4 pieces of correlation data, namely correlation data of the sweet potato and the egg, correlation data of the sweet potato and the milk, correlation data of the egg and the milk and correlation data of the sweet potato, the egg and the milk, the correlation data of the sweet potato, the egg and the milk can be determined as the correlation data most relevant to the query text. And displaying the relevant relation data by using a display template, wherein the number of the food name slots of the display template is 3.
In practical application, in order to facilitate browsing of a user, a connecting word may be added in the middle of the food name slot of the display template so as to clarify a correlation between food names, and the connecting word may be a word such as "and", "match", "and", or the like. In the embodiment of the present application, the order of allocating the food name slots is not limited, and the food names may be allocated to the food name slots correspondingly according to the order of at least two food names in the query text.
In the embodiment of the application, the slot positions in the display template are filled, so that the key information corresponding to the food correlation information query request can be displayed in the display template, a user can conveniently and visually obtain the food correlation information corresponding to the food correlation information query request, the operation of the user is reduced, and the user can conveniently query.
In some cases, after the user completes one query for food-related information, another query for food-related information may be made. In order to facilitate the user to inquire the new food correlation information, the slot position of the food name in the display template can be set as a slot position in which the filling content can be modified, and the user can directly modify the filling content of the slot position in the display template so as to inquire the food correlation information.
Based on the above, the embodiment of the application further provides an information correlation query method. Referring to fig. 4, this figure is a flowchart of another information relevance query method provided in this embodiment of the present application. In the above S305, that is, the at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text are filled into the corresponding slots of the display template, so that the client displays the filled display template, and then, the method further includes S306-S308:
s306: in response to a modification to at least one food name in the presentation template, the most recent at least two food names in the presentation template are extracted. Wherein, the latest at least two food names in the extraction display template may specifically be: and extracting the information filled in the slot corresponding to the food name in the display template.
When the user inquires about other food related information, the filling content of the slot corresponding to the food name in the display template displayed by the client can be modified. After the user has finished modifying, a query for food relevance information is triggered, which may be done again in response to a modification to at least one food name in the presentation template. For example, a user firstly inquires the correlation information of eggs and sweet potatoes, and in the obtained display template, the filling contents of the slots corresponding to the food names are 'eggs' and 'sweet potatoes'. When a user wants to inquire the correlation information of the sweet potatoes and the milk, the 'eggs' in the slot positions can be modified into 'milk', and the filling contents of the slot positions in the modified display template are 'milk' and 'sweet potatoes' respectively. After the modification is completed, the user can trigger the corresponding correlation information query again to query the correlation information of the sweet potatoes and the milk. The number of the modified food names is not limited in the embodiment of the application, partial food names in the slot position of the display module can be modified, and all the food names in the slot position of the display module can also be modified.
After the user completes modifying the food name in the presentation template, a food-related information query request may be sent, thereby triggering execution of S306. The manner in which the determination is responsive to the modification to the at least one food name in the presentation template is not limited in the embodiments of the present application. In one possible implementation, a corresponding "confirm" or "query" button may be set, and when the user triggers such a button, the server or the client responds to the modification to the at least one food name in the presentation template. In another possible implementation, the user may trigger the server or the client to respond to a modification to at least one food name in the presentation template by clicking on an area of the presentation template outside the slot.
And in response to the modification of at least one food name in the display template, extracting the latest at least two food names in the modified display template, wherein the obtained at least two food names are the food names to be subjected to the food correlation information query at this time. In particular, at least two food names may be obtained from slots in the modified display template that correspond to the food names. It is understood that the user may make multiple modifications of the food names when making the modifications, and the latest at least two food names in the presentation template are extracted after responding to the modifications to at least one food name in the presentation template.
In the embodiment of the application, in response to modification of at least one food name in the display template, the latest at least two food names in the display template are extracted, the obtained at least two food names are used as the food names queried according to the food correlation information, and subsequent query and display are performed. The user can inquire other food related information by directly modifying the food name in the display template without inputting the inquiry text again and sending a search request, so that the step of searching the food related information again by the user is simplified, and the user can conveniently inquire the food related information.
S307: and acquiring related relation data corresponding to at least two latest food names in the display template.
And acquiring the correlation data corresponding to the latest at least two food names in the display template according to the latest at least two food names in the display template. The correlation data includes at least data indicating whether or not foods can be eaten together with each other and the reason for the correlation.
The number of the types of the food names corresponding to the acquired correlation is not limited in the embodiment of the application. When the number of the obtained food names is more than two, the correlation data corresponding to at least two food names can be correlation data of part of the food names in the food names; or the common correlative relation data of all food names; the food name correlation data can also be the correlation data of partial food names and the correlation data corresponding to all the food names.
When there is the established food correlation relationship list, S307 obtains correlation relationship data corresponding to at least two latest food names in the presentation template, including the following two steps:
b1: and inquiring whether the related relation data corresponding to at least two latest food names in the display template exists from the food related relation list.
After at least two latest food names in the display template are extracted, whether relevant relation data corresponding to the at least two latest food names in the display template exist is inquired from the food relevant relation list. The query of the correlation data can be performed through the latest at least two food names in the extracted presentation template.
When the food names extracted from the display template are more than two, and the correlation data is queried, the query mode can be that a certain number of food names are arbitrarily selected from the more than two food names to query the correlation. The certain number may be any one of a number smaller than the number of the extracted types of food names in the display template, a number smaller than or equal to the number of the extracted types of food names, and a number equal to the number of the extracted types of food names.
In addition, for food with other names, the query of the related relation data can be performed according to the food names corresponding to the food names extracted from the display template when the query is performed.
B2: and if so, acquiring the correlation relation data corresponding to at least two latest food names in the display template from the food correlation relation list.
And when the food correlation relationship list has correlation relationship data corresponding to at least two latest food names in the display template, acquiring the corresponding correlation relationship data from the food correlation relationship list for filling the display module corresponding to the query.
In the embodiment of the application, the correlation data corresponding to the latest at least two food names in the display template is obtained for subsequent filling of the display template. When the food correlation relationship list exists, correlation relationship data corresponding to at least two latest food names in the display template are obtained from the food correlation relationship list, and the speed of obtaining the correlation relationship data is improved.
The implementation process of steps B1-B2 is similar to that of steps a1-a2, and for related descriptions, reference may be made to the above-mentioned embodiments, which are not repeated herein.
S308: and updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
And after acquiring the related relation data corresponding to at least two latest food names in the display template, updating the content of the slot position corresponding to the display template modified by the user according to the related relation data. It can be understood that, since the content in the slot corresponding to the food name in the display template is the modified food name, when the display template is updated, the food name does not need to be updated.
Specifically, the step S308 of updating the content filled in the corresponding slot of the display template according to the correlation data corresponding to the latest at least two food names in the display template includes:
and updating the related relation data corresponding to at least two latest food names in the display template into related relation slots of the display template, wherein the related relation slots comprise a food slot position and a food reason slot position.
When the relevant relation slot position includes the food and food reason slot positions, whether the data of the food can be correspondingly filled in the relevant relation data corresponding to the latest at least two food names in the obtained display template can be correspondingly filled in the food and food reason slot positions, and the data of the corresponding relevant relation reason can be filled in the food and food reason slot positions. And finishing the updating of the display template corresponding to the food correlation information query request.
And displaying the updated display template through the client so that the user can obtain the food correlation information corresponding to the food correlation information query request according to the content in the display template.
In the embodiment of the application, a new food correlation information query request can be initiated by modifying the food name in the display template. Therefore, the user can not input a new query text for query any more, the operation of the user is reduced, and the user can conveniently query the food correlation information. And the related relation data corresponding to at least two latest food names in the display template are updated in the slot positions, so that a new query result of the food related information can be directly displayed for a user, the user can conveniently obtain the food related information, and the user can conveniently search and browse.
Based on the information correlation query method provided by the above method embodiment, an embodiment of the present application further provides an information correlation query device, which is described below with reference to the accompanying drawings.
Referring to fig. 5, this figure is a schematic structural diagram of an information correlation query apparatus according to an embodiment of the present application.
An information correlation inquiry apparatus provided in an embodiment of the present application includes:
a search request obtaining unit 501, configured to obtain a search request input by a user through a client, where the search request includes a query text;
a search request judging unit 502, configured to judge whether the search request is a food-related information query request according to the query text;
a food name extracting unit 503, configured to extract at least two food names included in the query text if the search request is a food-related information query request;
a correlation data obtaining unit 504, configured to obtain correlation data corresponding to at least two food names included in the query text;
a display template filling unit 505, configured to fill the at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text into corresponding slots of the display template, so that the client displays the filled display template.
In one possible implementation, the apparatus further includes:
the food correlation relation list establishing unit is used for extracting food correlation relation information from a webpage comprising food correlation relations and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
In a possible implementation manner, the relevant relationship data obtaining unit 504 is specifically configured to query whether relevant relationship data corresponding to at least two food names included in the query text exists in the food relevant relationship list; and if so, acquiring the relevant relation data corresponding to at least two food names included in the query text from the food relevant relation list.
In a possible implementation manner, the search request determining unit 502 includes:
a food name judging subunit, configured to judge whether the search request is a food-related information query request according to whether the query text includes at least two food names;
alternatively, the first and second electrodes may be,
and the keyword judgment subunit is used for judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names and the specified keyword.
In a possible implementation manner, the display template filling unit 505 is specifically configured to allocate and fill at least two food names included in the query text into a food name slot of the display template, and fill the relevant relationship data corresponding to the at least two food names included in the query text into a relevant relationship slot of the display template; the correlation slot position comprises whether the food can be eaten with the food slot position or not and whether the food can be eaten with the food reason slot position or not.
In one possible implementation, the apparatus further includes:
an extraction unit for extracting at least two latest food names in the presentation template in response to a modification to at least one food name in the presentation template;
the acquisition unit is used for acquiring the related relation data corresponding to at least two latest food names in the display template;
and the related relation data updating unit is used for updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
Fig. 6 shows a block diagram of a client 1200. For example, client 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so forth.
Referring to fig. 6, client 1200 may include one or more of the following components: processing component 1202, memory 1204, power component 1206, multimedia component 1208, audio component 1210, input/output (I/O) interface 1212, sensor component 1214, and communications component 1216.
The processing component 1202 generally controls overall operation of the client 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operations at the client 1200. Examples of such data include instructions for any application or method operating on client 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 1206 provides power to the various components of the client 1200. The power components 1206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the client 1200.
The multimedia components 1208 include screens between the client 1200 and the user that provide an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front facing camera and/or a rear facing camera. When the client 1200 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1210 is configured to output and/or input audio signals. For example, audio component 1210 includes a Microphone (MIC) configured to receive external audio signals when client 1200 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 1204 or transmitted via the communication component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 1214 includes one or more sensors for providing various aspects of state assessment for the client 1200. For example, sensor assembly 1214 may detect an open/closed state of device 1200, the relative positioning of components, such as a display and keypad of client 1200, sensor assembly 1214 may also detect a change in position of client 1200 or a component of client 1200, the presence or absence of user contact with client 1200, client 1200 orientation or acceleration/deceleration, and a change in temperature of client 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the client 1200 and other devices in a wired or wireless manner. The client 1200 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the client 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the following methods:
acquiring a search request input by a user through a client, wherein the search request comprises a query text;
judging whether the search request is a food correlation information query request or not according to the query text;
if the search request is a food correlation information query request, extracting at least two food names included in the query text;
acquiring related relation data corresponding to at least two food names included in the query text;
and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of a display template, so that the client displays the filled display template.
Optionally, the method further includes:
extracting food correlation relation information from a webpage comprising food correlation relations, and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
Optionally, the obtaining of the relevant relationship data corresponding to at least two food names included in the query text includes:
inquiring whether relevant relation data corresponding to at least two food names included in the inquiry text exists in the food relevant relation list;
and if so, acquiring the relevant relation data corresponding to at least two food names included in the query text from the food relevant relation list.
Optionally, the determining, according to the query text, whether the search request is a query request for food-related information includes:
judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names;
or, judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names and a specified keyword.
Optionally, the filling, into the corresponding slot of the display template, at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text includes:
allocating and filling at least two food names included in the query text into food name slots of a display template, and filling the relevant relationship data corresponding to the at least two food names included in the query text into relevant relationship slots of the display template; the correlation slot position comprises whether the food can be eaten with the food slot position or not and whether the food can be eaten with the food reason slot position or not.
Optionally, the method further includes:
in response to a modification to at least one food name in the presentation template, extracting the most recent at least two food names in the presentation template;
acquiring related relation data corresponding to at least two latest food names in the display template;
and updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application. The server 1300 may vary widely in configuration or performance and may include one or more Central Processing Units (CPUs) 1322 (e.g., one or more processors) and memory 1332, one or more storage media 1330 (e.g., one or more mass storage devices) storing applications 1342 or data 1344. Memory 1332 and storage medium 1330 may be, among other things, transitory or persistent storage. The program stored on the storage medium 1330 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a server. Still further, the central processor 1322 may be arranged to communicate with the storage medium 1330, and execute a series of instruction operations in the storage medium 1330 for performing the above-described information correlation query method on the server 1300.
The server 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input-output interfaces 1356, one or more keyboards 1356, and/or one or more operating systems 1341 such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
In addition, the embodiment of the present application also provides a computer readable medium, on which instructions are stored, which when executed by one or more processors, cause an apparatus to execute the above information correlation query method.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An information correlation query method, the method comprising:
acquiring a search request input by a user through a client, wherein the search request comprises a query text;
judging whether the search request is a food correlation information query request or not according to the query text;
if the search request is a food correlation information query request, extracting at least two food names included in the query text;
acquiring related relation data corresponding to at least two food names included in the query text;
and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of a display template, so that the client displays the filled display template.
2. The method of claim 1, further comprising:
extracting food correlation relation information from a webpage comprising food correlation relations, and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
3. The method according to claim 2, wherein the obtaining of the correlation data corresponding to at least two food names included in the query text comprises:
inquiring whether relevant relation data corresponding to at least two food names included in the inquiry text exists in the food relevant relation list;
and if so, acquiring the relevant relation data corresponding to at least two food names included in the query text from the food relevant relation list.
4. The method of claim 1, wherein the determining whether the search request is a food-related information query request according to the query text comprises:
judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names;
or, judging whether the search request is a food correlation information query request according to whether the query text comprises at least two food names and a specified keyword.
5. The method of claim 1, wherein the populating at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text into corresponding slots of a presentation template comprises:
allocating and filling at least two food names included in the query text into food name slots of a display template, and filling the relevant relationship data corresponding to the at least two food names included in the query text into relevant relationship slots of the display template; the correlation slot position comprises whether the food can be eaten with the food slot position or not and whether the food can be eaten with the food reason slot position or not.
6. The method according to any one of claims 1-5, further comprising:
in response to a modification to at least one food name in the presentation template, extracting the most recent at least two food names in the presentation template;
acquiring related relation data corresponding to at least two latest food names in the display template;
and updating the contents filled in the corresponding slots of the display template according to the related relation data corresponding to the latest at least two food names in the display template.
7. An information correlation query apparatus, comprising:
the search request acquisition unit is used for acquiring a search request input by a user through a client, wherein the search request comprises a query text;
a search request judging unit, configured to judge whether the search request is a food-related information query request according to the query text;
a food name extracting unit, configured to extract at least two food names included in the query text if the search request is a food-related information query request;
the related relation data acquisition unit is used for acquiring related relation data corresponding to at least two food names included in the query text;
and the display template filling unit is used for filling at least two food names included in the query text and the correlation data corresponding to the at least two food names included in the query text into corresponding slots of the display template, so that the client displays the filled display template.
8. The apparatus of claim 7, further comprising:
the food correlation relation list establishing unit is used for extracting food correlation relation information from a webpage comprising food correlation relations and establishing a food correlation relation list, wherein the food correlation relation list comprises food correlation relation data; each of the food association relationship data includes: at least two food names and the corresponding correlation data of the at least two food names.
9. An information relevancy query apparatus comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs configured to be executed by one or more processors include instructions for:
acquiring a search request input by a user through a client, wherein the search request comprises a query text;
judging whether the search request is a food correlation information query request or not according to the query text;
if the search request is a food correlation information query request, extracting at least two food names included in the query text;
acquiring related relation data corresponding to at least two food names included in the query text;
and filling at least two food names included in the query text and the related relation data corresponding to the at least two food names included in the query text into corresponding slots of a display template, so that the client displays the filled display template.
10. A computer-readable medium having stored thereon instructions, which, when executed by one or more processors, cause an apparatus to perform the information relevance querying method of one or more of claims 1 to 6.
CN202010466785.7A 2020-05-28 2020-05-28 Information correlation query method and device Pending CN111625723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010466785.7A CN111625723A (en) 2020-05-28 2020-05-28 Information correlation query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010466785.7A CN111625723A (en) 2020-05-28 2020-05-28 Information correlation query method and device

Publications (1)

Publication Number Publication Date
CN111625723A true CN111625723A (en) 2020-09-04

Family

ID=72272031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010466785.7A Pending CN111625723A (en) 2020-05-28 2020-05-28 Information correlation query method and device

Country Status (1)

Country Link
CN (1) CN111625723A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598617A (en) * 2015-01-30 2015-05-06 百度在线网络技术(北京)有限公司 Method and device for displaying search results
CN106528889A (en) * 2016-12-21 2017-03-22 维沃移动通信有限公司 Information search method and terminal
CN107526744A (en) * 2016-06-21 2017-12-29 北京搜狗科技发展有限公司 A kind of information displaying method and device based on search
CN108630297A (en) * 2018-05-04 2018-10-09 京东方科技集团股份有限公司 A kind of information processing method and equipment
US20190303409A1 (en) * 2017-01-31 2019-10-03 Fujitsu Limited Data search method, data search apparatus, and non-transitory computer-readable storage medium storing program for data search

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598617A (en) * 2015-01-30 2015-05-06 百度在线网络技术(北京)有限公司 Method and device for displaying search results
CN107526744A (en) * 2016-06-21 2017-12-29 北京搜狗科技发展有限公司 A kind of information displaying method and device based on search
CN106528889A (en) * 2016-12-21 2017-03-22 维沃移动通信有限公司 Information search method and terminal
US20190303409A1 (en) * 2017-01-31 2019-10-03 Fujitsu Limited Data search method, data search apparatus, and non-transitory computer-readable storage medium storing program for data search
CN108630297A (en) * 2018-05-04 2018-10-09 京东方科技集团股份有限公司 A kind of information processing method and equipment

Similar Documents

Publication Publication Date Title
CN106605224B (en) Information searching method and device, electronic equipment and server
US8756313B2 (en) Method and system for notifying network resource updates
CN107256509B (en) Price comparison method and device, terminal, server and storage medium
US10241994B2 (en) Electronic device and method for providing content on electronic device
CN107463643B (en) Barrage data display method and device and storage medium
CN106896991B (en) Method and device for updating information
CN109933714B (en) Entry weight calculation method, entry weight search method and related device
CN105095427A (en) Search recommendation method and device
CN117390330A (en) Webpage access method and device
CN109389440B (en) Method and device for providing data object information and electronic equipment
CN107229403B (en) Information content selection method and device
CN105373580A (en) Method and device for displaying subjects
CN107402767B (en) Method and device for displaying push message
US20160241674A1 (en) Method and device of filtering address
CN106844572B (en) Search result processing method and device for search result processing
CN107870721B (en) Search result display method and device for search result display
CN112307281A (en) Entity recommendation method and device
CN106951541B (en) Cooking information recommending and acquiring method and device
CN106886541B (en) Data searching method and device for data searching
CN107239462B (en) Searching method and device and browser
CN111752436A (en) Recommendation method and device and recommendation device
CN110020335B (en) Favorite processing method and device
CN111625723A (en) Information correlation query method and device
CN113918661A (en) Knowledge graph generation method and device and electronic equipment
CN110020206B (en) Search result ordering method and device

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