Method, device and equipment for determining query result and readable medium
By extracting entities, relationships and attributes of multi-source databases, building a knowledge graph and artificial intelligence model, it solves the accuracy and efficiency of users in searching products in the health field in e-commerce platforms, and achieves efficient and accurate query results and Improved user experience.
Patent Information
- Application Number
- CN202411156009.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
AI Technical Summary
When existing e-commerce platforms look for products in health fields, traditional search methods have problems such as high user usage costs, inaccurate search results, inability to meet refined needs and instant updates, and the existing technology cannot effectively utilize user demand scenarios. and multiple rounds of demand refinement.
By performing entity extraction, relationship extraction and attribute extraction on multi-source databases, we build a knowledge graph associated with the artificial intelligence model, respond to user query instructions, determine the query results based on scenarios, entities, entity relationships and attributes, and combine query results. Provide more accurate and efficient query results.
It improves the accuracy and efficiency of query results, improves user experience, can directly find target products from query results, reduces user usage costs, and supports multiple rounds of demand refinement and instant updates.
Smart Images

Figure CN119127909A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for determining query results. Background Art
[0002] With the rapid development of information technology and mobile Internet, e-commerce platforms have become an important channel for people to shop. Pharmaceuticals, nutritional supplements, medical devices and other products in the health field have also gradually moved to e-commerce platforms. In the e-commerce platform scenario, users looking for products is one of the important scenarios. How to quickly find the products that users want among a large number of products is an urgent problem to be solved in the health scenario. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for determining a query result is provided. The method includes: determining a knowledge graph associated with an artificial intelligence model by performing entity extraction, relationship extraction, and attribute extraction on a multi-source database; in response to receiving a user query instruction, providing the user query instruction to the artificial intelligence model to determine at least one of the scene, entity, entity relationship, and attribute corresponding to the user query instruction; based on at least one of the scene, entity, entity relationship, and attribute, determining a first candidate query result and a second candidate query result from the artificial intelligence model and the knowledge graph, respectively; and performing query result combination on the first candidate query result and the second candidate query result to determine the query result corresponding to the user query instruction.
[0004] In the second aspect of the present disclosure, a device for determining a query result is provided. The device includes: an extraction module configured to determine a knowledge graph associated with an artificial intelligence model by performing entity extraction, relationship extraction, and attribute extraction on a multi-source database; a providing module configured to provide the user query instruction to the artificial intelligence model in response to receiving a user query instruction to determine at least one of the scene, entity, entity relationship, and attribute corresponding to the user query instruction; a determination module configured to determine a first candidate query result and a second candidate query result from the artificial intelligence model and the knowledge graph respectively based on at least one of the scene, entity, entity relationship, and attribute; and a combination module configured to perform query result combination on the first candidate query result and the second candidate query result to determine the query result corresponding to the user query instruction.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method of the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to perform the method according to the first aspect of the present disclosure.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, wherein the computer executable instructions can be executed by a processor to perform the method according to the first aspect of the present disclosure.
[0008] It should be understood that the contents described in the summary of the invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0011] Figure 2 A flowchart showing a process of determining query results according to some embodiments of the present disclosure;
[0012] Figure 3 A schematic diagram showing a process of constructing a knowledge graph according to some embodiments of the present disclosure;
[0013] Figure 4 A flowchart showing a process of determining query results according to some embodiments of the present disclosure;
[0014] Figure 5 A schematic diagram showing a process of knowledge construction according to some embodiments of the present disclosure;
[0015] Figure 6 A schematic diagram of an artificial intelligence model architecture interface according to some embodiments of the present disclosure is shown;
[0016] Figure 7 A schematic diagram showing an interface for determining entities and entity attributes according to some embodiments of the present disclosure is shown;
[0017] Figure 8 A schematic diagram showing an interface for determining entity relationships and relationship attributes according to some embodiments of the present disclosure;
[0018] Fig. 9A schematic structural block diagram of an apparatus for determining a query result according to some embodiments of the present disclosure is shown; and
[0019] Fig.10 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0022] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0023] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0024] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to software or hardware such as electronic devices, applications, servers or storage media that execute operations of the technical solution of the present disclosure based on the prompt message.
[0025] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0026] Traditionally, the object query result determination scheme is applied to the case where users of e-commerce platforms are looking for products. The main method is to search for related products by entering keywords, and display the screening conditions of dimensions such as "price range", "discount and service", "product classification" and the sorting methods of dimensions such as "comprehensive sorting" and "sales priority" on the search results page, so that users can find the products that best meet their needs on the search results page. However, this method has a large user usage cost, especially in areas where users are relatively unfamiliar, such as the health field. Whether the search keywords entered by the user can accurately and comprehensively describe their own needs, whether they can better use the screening and sorting functions of the search results page to further obtain products that better meet their needs, etc. And this method requires the search keywords entered by the user to describe their own needs as accurately and comprehensively as possible. In addition, the query results obtained by the above method are often a series of products. Users need to browse, filter, sort and other operations carefully to find the target products, which greatly increases the user's usage cost and cannot meet the user's more refined needs. In addition, this method of determining query results cannot provide users with a wealth of related products based on user demand scenarios, and cannot support users to perform multiple rounds of demand refinement and instant update of demand.
[0027] In the traditional solution for determining the query result of an object, users in the e-commerce field usually find the target product by searching. The commonly used search technology in the above solution is the keyword matching algorithm, which mainly includes the following categories: fuzzy matching algorithm, split matching algorithm, and feature matching algorithm. Knowledge graph is a semantic knowledge base with a complex structure. Knowledge graph is also a semantic network that explains the relationship between entities and can formally describe things and the relationship between things. With the continuous growth of e-commerce data scale and the increasing complexity of data association, the application of knowledge graph can optimize the commodity search mechanism to a certain extent. At present, the construction of knowledge graph in the e-commerce field is mainly based on the commodity dimension. In terms of knowledge extraction, text is matched mainly through artificially constructed rules, and features are constructed through artificially designed templates based on high-quality annotated corpora. Furthermore, sequence annotation models such as hidden Markov models and conditional random field models are used for training and recognition. In the above solution, models such as Bi-LSTM are usually used to realize information extraction, and methods such as entity alignment and entity linking are often used for knowledge fusion.
[0028] Specifically, for the "find product" scenario, the question-answering system can improve the user experience to a certain extent. A question-answering system is an intelligent system that can extract answers from a predefined knowledge base or corpus based on the questions entered by the user and generate replies. The main processes of the question-answering system include: question parsing, information retrieval, candidate answer generation, answer sorting, answer output and display. The question-answering system technologies used in the traditional solution for determining the object query results mainly include the following four types. The first is a question-answering system based on a large-scale document set. This question-answering system obtains keywords from the user's natural language questions, uses the keywords to search for relevant documents in network documents, extracts candidate answers, sorts and verifies the answers, and finally outputs the answers. The second is a question-answering system based on question-answer pairs. This question-answering system also includes two types, namely, a question-answering system based on frequently asked questions and a question-answering system based on community questions and answers. The former has the advantages of high quality and good organization, which can improve the level of the system's answering questions. The latter can select the most similar existing question-answering pairs by matching the new questions with all existing questions in the Internet community, which contains a list of possible answers to the new questions. The third type is a question-and-answer system based on knowledge graphs. This type of question-and-answer system is a question-and-answer method that relies on the understanding of natural language questions and relies on the knowledge base to obtain answers. Users can get answers and content related to the answers. Traditionally, the main methods used by question-and-answer systems based on knowledge graphs are template matching, semantic parsing, and deep learning. The fourth type is a question-and-answer system based on large models. Large models refer to deep learning models with a large number of parameters and complex structures. They have emergence capabilities, general capabilities, and can handle complex downstream tasks. This type of question-and-answer system can understand user intentions well, achieve effective multi-round communication, and provide complete answers, clear key points, and logic.
[0029] Traditionally, the question-answering system used in the e-commerce field mainly uses intelligent customer service robots to complete the question-answering process. However, in some questions and answers related to product orders, intelligent customer service robots cannot provide shopping guide functions for users. Traditionally used question-answering technologies still have certain limitations. The first type of question-answering system based on large-scale document sets has limitations such as data quality cannot be guaranteed and the association and context information between documents cannot be effectively utilized. The second type of question-answering system based on question-answer pairs has limitations such as high data acquisition cost, large rule restrictions, data accuracy, and long-tail problems. Moreover, the third type of question-answering system based on knowledge graphs has low efficiency and strong subjectivity in corpus data annotation, poor generability, limited semantic understanding ability, weak common sense ability, and weak knowledge completeness. The above-mentioned question-answering systems generally have problems such as large rule restrictions, insufficient flexibility, insufficient knowledge, inability to optimize multiple rounds, and unnatural language. Although these question-answering systems based on large models can improve the above problems to a certain extent, they have some limitations, such as poor interpretability, insufficient credibility, poor traceability, insufficient domain capabilities, and insufficient real-time knowledge update.
[0030] In addition, the existing search technology or question-answering technology applied in the e-commerce field does not have relevant technologies for the health field, and health is a field with obvious domain characteristics. Therefore, the existing relevant technologies with strong versatility cannot solve the shopping guide problem in the health e-commerce field.
[0031] In view of this, an embodiment of the present disclosure provides a solution for determining query results. The solution includes: determining a knowledge graph associated with an artificial intelligence model by performing entity extraction, relationship extraction, and attribute extraction on a multi-source database; in response to receiving a user query instruction, providing the user query instruction to the artificial intelligence model to determine at least one of the scene, entity, entity relationship, and attribute corresponding to the user query instruction; based on at least one of the scene, entity, entity relationship, and attribute, determining a first alternative query result and a second alternative query result from the artificial intelligence model and the knowledge graph, respectively; and performing query result combination on the first alternative query result and the second alternative query result to determine the query result corresponding to the user query instruction. In this way, the accuracy and efficiency of determining the query result can be improved, and the user experience can also be improved.
[0032] Figure 1 A schematic diagram of an example environment 100 is shown in which embodiments of the present disclosure can be implemented.
[0033] like Figure 1As shown, the query system 110 may include a knowledge graph 112 and an artificial intelligence model 114. If a user query instruction 105 is received, the query system 110 may use the knowledge graph 112 and the artificial intelligence model 114 to determine a query result 120. In this way, a query result with high accuracy may be determined, and the user experience may also be improved.
[0034] In some embodiments, the knowledge graph 112 may be associated with a scenario. In some examples, in a health scenario, the knowledge graph 112 may be a health knowledge graph 112. Specifically, the knowledge graph 112 is a semantic network used to describe various entities and concepts existing in the real world, as well as the relationships between entities and concepts.
[0035] In other embodiments, the artificial intelligence model 114 may be an artificial intelligence model with large-scale parameters and complex computing structure (e.g., a large model). Specifically, a large model refers to an artificial intelligence model with a large parameter scale and complexity. In addition, in the field of deep learning, a large model generally refers to a neural network model with millions to billions of parameters.
[0036] In more embodiments, the query result 120 may indicate an object set, an answer, etc. corresponding to the user query instruction 105. In some examples, when the user query instruction 105 indicates that the query target is an object, the query result 120 may indicate an object set corresponding to the user query instruction 105. Specifically, the object may be a commodity, a doctor, an expert, etc. In other examples, when the user query instruction 105 indicates that the query target is an answer, the query result 120 may indicate an answer corresponding to the user query instruction 105.
[0037] The query system 110 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, server devices, etc. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable game terminals, VR / AR devices, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDA), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, game devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.
[0038] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.
[0039] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.
[0040] Figure 2 FIG. 2 is a flowchart of a process 200 for determining query results according to some embodiments of the present disclosure. The process 200 may be implemented at the query system 110. For ease of discussion, reference will be made to FIG. Figure 1 The process 200 is described with reference to the environment 100 of FIG.
[0041] In box 210, the query system 110 determines the knowledge graph 112 associated with the artificial intelligence model by performing entity extraction, relationship extraction and attribute extraction on the multi-source database. Specifically, the multi-source database can be a database that gathers various related knowledge corresponding to the predetermined scene. Further, in the health scene, the entity can indicate the objective thing or concept in the scene. Specifically, the objective thing in the scene can indicate at least one of the user, doctor, hospital, department, merchant, commodity or scene, and the concept in the scene can indicate at least one of the category and evaluation. Further, the relationship can indicate at least one of the mutual relationship between the objective thing and the concept in the scene, and the mutual relationship between the objective thing and the objective thing. More, the attribute can indicate the characteristics related to the objective thing or concept itself in the scene. For example, the attribute can indicate at least one of the category name and category heat related to the category, and the attribute can also indicate at least one of the doctor name, professional direction, title, praise, number of consultations, average waiting time and consultation fee related to the doctor. It can be understood that this is only exemplary and not restrictive.
[0042] In addition, the attribute may also indicate characteristics related to the relationship in the scenario. For example, the attribute may indicate the relationship strength associated with the relationship between the scenario and the user, and the attribute may also indicate at least one of the purchase frequency and activity associated with the relationship between the category and the user. It is understood that this is merely exemplary and not restrictive.
[0043] In some examples, the multi-source database may include at least one of the e-commerce platform user attributes and user behavior data, e-commerce platform commodity data, e-commerce platform user data, external health encyclopedia data, or external health platform data. Specifically, the e-commerce platform user data may be user-generated content (UGC) of the e-commerce platform. In some embodiments, the multi-source database may be associated with a scene. In some examples, assuming that in a health scene, the multi-source database may include health-related data, such as health-related commodities and corresponding commodity information, users with health-related needs and corresponding user information, doctors and corresponding doctor information, merchants selling health-related commodities and corresponding merchant information. Specifically, health-related commodities may be medicines, massage instruments, health care equipment, nursing appliances, etc. that comply with sales regulations. It can be understood that this is only exemplary and not restrictive. In this way, a comprehensive knowledge graph 112 can be obtained to facilitate subsequent accurate and comprehensive query results. Since a multi-source database containing multi-faceted data and a large amount of data is used to construct a knowledge graph and train an artificial intelligence model, data quality can be guaranteed, and the association and context information between documents can be effectively used to determine a query result with high accuracy. Furthermore, since the multi-source database corresponds to a specific usage scenario, the query system 110 has strong domain capabilities. In addition, the multi-source database can be updated in real time, which can ensure the strong real-time performance of the data in the multi-source database.
[0044] In some examples, for entity extraction of unstructured data, the information extraction capability of the artificial intelligence model 114 can be enhanced by using P-tuning v2 fine-tuning before using the artificial intelligence model 114. In this way, the efficiency of corpus data annotation can be improved by using the artificial intelligence model 114, which has the characteristics of objectivity, strong common sense ability, strong knowledge completeness, and no limitations.
[0045] Specifically, l trainable attention keys and value embeddings are connected to the prefix at each layer of the artificial intelligence model 114. Given the original key vector K∈Rl×d and value vector V∈Rl×d, the trainable vectors Pk and Pv will be connected to K and V respectively. The calculation formula of the attention mechanism head is:
[0046]
[0047] Wherein, the superscript (i) represents the part of the vector corresponding to the i-th attention head, K and V represent the original key vector and value vector respectively, and P k and P v Represent trainable vectors respectively.
[0048] In some embodiments, the query system 110 may determine an entity extraction method corresponding to the entity type of the entity. In some examples, in a health scenario, the entity may be at least one of a doctor, a hospital, a department, a user, a scene, a category, a merchant, an evaluation, and a commodity. In some examples, it may be that the first type of entity corresponds to the first entity extraction method, and the second type of entity corresponds to the second entity extraction method. In some embodiments, the entity type may include a first type and a second type. In some embodiments, the first type of entity indicates a structured or semi-structured entity. In some examples, in a health scenario, the structured or semi-structured entity may be at least one of a category, a merchant, a commodity, a doctor, a hospital, a department, and a user. In other embodiments, the second type of entity indicates an unstructured entity. In some examples, in a health scenario, an unstructured entity may be at least one of a demand scenario and an evaluation. In this way, since the extracted entity includes a scene, more relevant commodities can also be provided to the user based on the scene required by the user.
[0049] In some embodiments, the query system 110 may perform entity extraction from a multi-source database based on an entity extraction method. In some embodiments, if the entity type indicates a first type, the query system 110 may determine that the entity extraction method indicates a first entity extraction method, and the first entity extraction method may indicate that entity extraction is performed based on entity extraction rules. In other embodiments, if the entity type indicates a second type, the query system 110 determines that the entity extraction method indicates a second entity extraction method, and the second entity extraction method indicates that entity extraction is performed using an artificial intelligence model. In some examples, before using the artificial intelligence model 114 to perform entity extraction, a few-sample learning may be performed on the artificial intelligence model 114, so that the artificial intelligence model 114 obtained in this way performs entity extraction better. In this way, a query result with high accuracy can be obtained, and the efficiency of the query result determination process can be improved.
[0050] In some embodiments, the entity type is determined based on the data type associated with the entity. In some examples, an entity extracted based on structured or semi-structured data can be determined as a structured or semi-structured entity. In other examples, an entity extracted based on unstructured data can be determined as an unstructured entity. It is understood that this is merely exemplary and not restrictive.
[0051] In some embodiments, the query system 110 may determine a relation extraction method for entity relations. Further, the query system 110 may perform relation extraction from a multi-source database based on the relation extraction method. In this way, using different relation extraction methods for different entity relations may improve the efficiency and accuracy of the relation extraction process.
[0052] In some embodiments, if the entity relationship indicates a corresponding relationship between entities of the first type, the query system 110 determines that the relationship extraction method indicates a first relationship extraction method, and the first relationship extraction method indicates that relationship extraction is performed based on relationship extraction rules. In some examples, the corresponding relationship between entities of the first type can be at least one of the relationship between categories, the relationship between categories and merchants, the relationship between categories and users, the relationship between categories and goods, the relationship between merchants and goods, the relationship between merchants and users, the relationship between goods and users, the relationship between goods and goods, the relationship between doctors and hospitals, the relationship between doctors and departments, the relationship between doctors and users, the relationship between departments and users, and the relationship between users. It can be understood that this is merely exemplary and not restrictive.
[0053] In other embodiments, if the entity relationship indicates a corresponding relationship between an entity of the first type and an entity of the second type or indicates a corresponding relationship between entities of the second type, the query system 110 may determine that the relationship extraction method indicates a second relationship extraction method, and the second relationship extraction method indicates that the relationship extraction is performed using an artificial intelligence model. In some examples, the corresponding relationship between the first type of entity and the second type of entity may include at least one of the relationship between the scene and the category, the relationship between the scene and the merchant, the relationship between the scene and the product, the relationship between the scene and the doctor, the relationship between the scene and the user, the relationship between the evaluation and the product, and the relationship between the evaluation and the doctor. In other examples, the corresponding relationship between entities of the second type may include the relationship between scenes. It will be understood that this is merely exemplary and not restrictive.
[0054] In some embodiments, the query system 110 may determine an attribute extraction method corresponding to the attribute type of the attribute. Further, the query system 110 performs attribute extraction from the multi-source database based on the attribute extraction method. In this way, different attribute extraction methods are used for different attribute relationships, which can improve the efficiency and accuracy of the attribute extraction process.
[0055] In some embodiments, the attribute type may include a general attribute type and a non-general attribute type. Specifically, the general attribute type may indicate an attribute type that can be obtained without calculation. For example, the general attribute type may indicate the department to which the doctor belongs, and this attribute does not need to be obtained by calculation. Further, the non-general attribute type may indicate an attribute type that needs to be obtained by calculation. For example, the non-general attribute type may indicate the heat of the relationship between the user and the product, and this attribute needs to be calculated using the user behavior data and the product heat attribute. In some embodiments, if the attribute type indicates a general attribute type, the query system 110 determines that the attribute extraction method indicates a first attribute extraction method, and the first attribute extraction method indicates that attribute extraction is performed based on attribute extraction rules.
[0056] In other embodiments, if the attribute type indicates a non-general attribute type, the query system 110 determines that the attribute extraction method indicates a second attribute extraction method, and the second attribute extraction method indicates that the attribute extraction is performed based on the calculation logic corresponding to the attribute. In some examples, the attribute of the non-general attribute type can indicate at least one of heat and intensity.
[0057] In some embodiments, the query system 110 performs at least one of entity extraction, relationship extraction, and attribute extraction from a multi-source database to obtain at least one of an entity set, a relationship set, and an attribute set to determine an alternative database. In some examples, in a health scenario, an entity set may include at least one of a category, a merchant, a commodity, a doctor, a hospital, a department, a user, a demand scenario, and an evaluation, and corresponding entity attribute information. In other examples, a relationship set may include the relationship between categories, the relationship between categories and merchants, the relationship between categories and users, the relationship between categories and commodities, the relationship between merchants and commodities, the relationship between merchants and users, the relationship between commodities and users, the relationship between commodities and commodities, the relationship between doctors and hospitals, the relationship between doctors and departments, the relationship between doctors and users, the relationship between departments and users, the relationship between users and users, the relationship between scenes and categories, the relationship between scenes and merchants, the relationship between scenes and commodities, the relationship between scenes and doctors, the relationship between scenes and users, the relationship between evaluations and commodities, and the relationship between evaluations and doctors. In this way, an alternative database with more comprehensive knowledge can be determined.
[0058] In more examples, the attribute set may indicate entity attributes corresponding to the entity and relationship attributes corresponding to the entity relationship. Specifically, the entity attribute may indicate at least one of the doctor's name, professional direction, title, favorable rating, number of patients, average waiting time, and price corresponding to the doctor. Further, the doctor's name may indicate the doctor's name. Further, the doctor's professional direction may indicate the doctor's ability area. For example, the professional direction may indicate that the doctor is good at treating skin vasculitis, skin pathology, etc. It can be understood that this is only exemplary and not restrictive. Further, the doctor's title may indicate the doctor's position in the hospital to which he belongs. For example, the doctor's title may indicate that the doctor is an associate chief physician. It can be understood that this is only exemplary and not restrictive. Further, the doctor's favorable rating may indicate the user's satisfaction with the doctor. Specifically, the doctor's favorable rating may indicate four stars, and the doctor's favorable rating may also indicate 95 points. It can be understood that this is only exemplary and not restrictive. More, the doctor's price may indicate the doctor's consultation fee. It can be understood that this is only exemplary and not restrictive.
[0059] Furthermore, the entity attributes may also indicate at least one of the hospital name, hospital category, and hospital grade corresponding to the hospital, the entity attributes may also indicate at least one of the department name and department category corresponding to the department, the entity attributes may also indicate at least one of the gender, age, city level, purchasing power, and whether the user is a member user corresponding to the user, the entity attributes may also indicate at least one of the scene name, scene heat, and heat level corresponding to the demand scenario, the entity attributes may also indicate at least one of the category name and category heat corresponding to the category, the entity attributes may also indicate at least one of the merchant name and merchant heat corresponding to the merchant, the entity attributes may also indicate at least one of the evaluation type and evaluation label corresponding to the evaluation, and the entity attributes may also indicate at least one of the product name, product price, discount information, applicable population, main diseases, applicable symptoms, ingredients, usage, after-sales, evaluation, and product heat corresponding to the product.
[0060] Further, the query system 110 uses the artificial intelligence model to perform knowledge fusion on the data in the candidate database to determine the target database. In some examples, the knowledge fusion may indicate at least one of name or definition completion, name alignment and standardization, entity standardization alignment, and synonym extraction and fusion. In this way, a comprehensive and unified target database can be obtained to avoid the situation where the same entity corresponds to two different names.
[0061] Furthermore, the query system 110 determines the knowledge graph 112 based on the target database. In some embodiments, the knowledge graph 112 may indicate a structured semantic knowledge base. In some embodiments, the query system 110 may determine nodes, node attributes, and node relationships from entities, entity attributes, and entity relationships in the target database, respectively. Further, the query system 110 may determine the knowledge graph 112 based on nodes, node attributes, and node relationships. In this way, a comprehensive and structured knowledge graph may be determined to facilitate providing corresponding knowledge for user queries.
[0062] After the query system 110 determines the knowledge graph 112, in response to receiving the user query instruction 105, the query system 110 may provide the user query instruction 105 to the artificial intelligence model at block 220 to determine at least one of the scene, entity, entity relationship, and attribute corresponding to the user query instruction 105. In this way, the efficiency and accuracy of determining the query result may be improved, and the user experience may be enhanced.
[0063] In box 230, the query system 110 determines the first candidate query result 120 and the second candidate query result 120 from the artificial intelligence model and the knowledge graph 112 based on at least one of the scenario, entity, entity relationship, and attribute. In some examples, in the health scenario, the entity can be at least one of a doctor, a hospital, a department, a user, a demand scenario, a category, a merchant, an evaluation, and a product. In this way, a query result with comprehensive knowledge can be obtained. In addition, since the query result obtained is highly accurate, in the health product search scenario, the target product can be found directly from the query results, and no further browsing, filtering, sorting, etc. operations are required to find the target product from multiple products in the query results, which can reduce the user's usage cost.
[0064] In some embodiments, the query system 110 may determine the storage structure type of the knowledge graph 112. Further, the query system 110 may convert at least one of the scene, entity, entity relationship, and attribute into a graph query statement corresponding to the storage structure type. Further, the query system 110 may determine the second candidate query result 120 from the knowledge graph 112 based on the graph query statement. In this way, the efficiency and accuracy of determining the second candidate query result 120 using the knowledge graph 112 may be improved.
[0065] In box 240, the query system 110 performs a query result 120 combination on the first candidate query result 120 and the second candidate query result 120 to determine the query result 120 corresponding to the user query instruction 105. Specifically, the second candidate query result 120 obtained from the knowledge graph 112 can be assembled with the first candidate query result 120 of the artificial intelligence model to obtain the query result 120. In some examples, the relevant knowledge obtained from the health e-commerce knowledge graph 112 can be put into the context of the Prompt assembly stage of the artificial intelligence model. At the same time, combined with the knowledge breadth of the artificial intelligence model 114 itself, the answer is further enriched and output in a natural language. In addition, multiple rounds of questions and answers can be performed to provide users with an instant demand update method. For example, multiple rounds of questions and answers can include context management and updates. Specifically, after each round of dialogue is completed, the incremental learning method can be used to add the dialogue history to the artificial intelligence model, and fine-tune and optimize it as needed, while using a memory mechanism to store and retrieve the previous dialogue history to better manage and update the context information, thereby building a context environment. The context environment usually includes the user's questions, the model's answers, and other dialogue-related information, such as the number of dialogue rounds, the identities of the dialogue participants, etc. Further, multi-round questions and answers can also include context understanding. Specifically, the powerful language representation ability of the artificial intelligence model 114 is used to input the current question and the context history into the model together, and the representation ability of the model is used for semantic understanding and logical reasoning. At the same time, the attention mechanism is used to capture the relationship between different parts, so as to better understand the background and context information of the dialogue. In this way, the accuracy, breadth and naturalness of the question and answer can be enhanced, and the query results 120 can be updated in real time according to changes in user needs. The corresponding query results can also be determined according to the refined needs indicated in the query request received from the user, which can meet the user's more refined needs, and the query results can be updated in time according to changes in user needs.
[0066] Continue to refer to Figure 3-Figure 8 Some exemplary processes or exemplary interfaces in health scenarios are further described. It will be understood that these are merely exemplary and not restrictive.
[0067] Figure 3 FIG. 3 is a schematic diagram of a process 300 for constructing a knowledge graph according to some embodiments of the present disclosure. The process 300 may be implemented at the query system 110. For ease of discussion, reference will be made to Figure 1 The process 300 is described with reference to the environment 100 of FIG.
[0068] like Figure 3As shown, before the process of constructing the knowledge graph 112, the multi-source data 301 corresponding to the scene can be determined. Specifically, the multi-source data 301 may include at least one of the e-commerce platform user attributes and behavior data, e-commerce platform product data, e-commerce platform user data, external health encyclopedia data, and external health platform data. In some examples, the e-commerce platform product data may include various product attributes to better match users with products that meet their needs. In other examples, collecting e-commerce platform user attributes and behavior data can better understand user preferences, match users with products that meet their preferences, and also better enrich product attributes (such as product popularity). In other examples, e-commerce platform user data, external health encyclopedia data, and external health platform data can better describe the user's needs in health scenarios.
[0069] Before using the artificial intelligence model 114 to build the health knowledge graph 112, the large model can be trained and tuned to better extract entities and relationships in the question and identify user intentions at the semantic level. Specifically, the health knowledge graph 112 can be used to enhance the pre-training of the large model, that is, the knowledge graph 112 information is input as the large model using a graph structure, and the chain relationship of the knowledge graph 112 is input into the large model as the pre-training corpus of the large model to enhance the pre-training capability of the large model. In addition, the supervised fine-tuning and alignment fine-tuning of the large model are enhanced through instruction fine-tuning training and reinforcement learning based on knowledge graph 112 feedback.
[0070] Further, in the process of constructing the knowledge graph 112, knowledge modeling can be performed. Specifically, in box 310, concepts and concept attribute construction are performed. Further, in box 320, relationships between concepts and relationship attribute construction are performed. Further, in box 330, ontology construction is performed. In some examples, entities, entity relationships, and attributes can be determined by ontology construction. Specifically, attributes include entity attributes and relationship attributes. Further, entity attributes can indicate the characteristics of objective entities or concepts in a predetermined scenario. For example, entity attributes can indicate evaluation types related to evaluations, hospital categories related to hospitals, category heat related to categories, etc. It can be understood that this is merely exemplary and not restrictive. Further, relationship attributes can indicate the characteristics of relationships between entities. For example, relationship attributes can indicate relationship strength, relationship type, activity, purchase frequency, etc. It can be understood that this is merely exemplary and not restrictive.
[0071] In some examples, ontology construction can be performed based on multiple issues that users are concerned about in health scenarios. Specifically, in health scenarios, users may be concerned about whether the product or doctor can meet their needs (for example, the user has a bad cervical spine and hopes to find relevant equipment, medicines, and doctors to consult for the treatment of the cervical spine). Users may also pay attention to issues such as the price and discount of the product, the quality of the product, the composition of the product, the method of using the product, the after-sales service of the product, the professional direction and professionalism of the doctor. In some examples, ontology construction can be performed based on the user attributes or behavioral attributes of the user in the health scenario. In addition, the user's age, purchasing power and other attribute characteristics, as well as browsing, adding to purchases, and purchasing behavior characteristics can characterize user preferences to a certain extent. Fusion of user preference characteristics can provide more accurate shopping guide services for users.
[0072] Furthermore, in the process of constructing the knowledge graph 112, knowledge extraction may be performed. Specifically, entity extraction is performed in box 340. In some examples, entity extraction may be performed from the multi-source data 301 based on an entity extraction method. In other examples, the entity extraction method includes performing entity extraction based on entity extraction rules or performing entity extraction using an artificial intelligence model 114. Specifically, entity extraction may be performed based on entity extraction rules for structured or semi-structured entities, and entity extraction may be performed using an artificial intelligence model 114 for unstructured entities.
[0073] Further, relationship extraction is performed in box 350. In some examples, relationship extraction can be performed from multi-source data 301 based on a relationship extraction method. In other examples, the relationship extraction method includes performing relationship extraction based on relationship extraction rules or performing relationship extraction using artificial intelligence model 114. Specifically, if the entity relationship indicates a corresponding relationship between entities of the first type, relationship extraction is performed based on relationship extraction rules, and if the entity relationship indicates a corresponding relationship between an entity of the first type and an entity of the second type or indicates a corresponding relationship between entities of the second type, relationship extraction is performed using artificial intelligence model 114. Specifically, the first type of entity can indicate an entity extracted based on structured or semi-structured data, such as a category, a merchant, a commodity, a doctor, a hospital, a department, and a user. More, the second type of entity can indicate an entity extracted based on unstructured data, such as a scene and an evaluation. In some examples, the corresponding relationship between the first type of entity and the second type of entity may indicate at least one of the relationship between goods and reviews, the relationship between doctors and reviews, the relationship between scenes and categories, the relationship between scenes and merchants, the relationship between scenes and goods, the relationship between scenes and doctors, and the relationship between scenes and users. The corresponding relationship between the second type of entities may indicate the relationship between scenes, and the corresponding relationship between the first type of entities may indicate at least one of the relationship between merchants and goods, the relationship between merchants and users, the relationship between goods and goods, the relationship between hospitals and doctors, the relationship between doctors and departments, the relationship between doctors and users, the relationship between users, the relationship between categories, the relationship between categories and merchants, the relationship between categories and goods, and the relationship between goods and users.
[0074] In some examples, relationship extraction can also be performed based on semantic matching. Specifically, for the relationship between entities in a scene, and the relationship between an entity and other entities, direct matching will result in poor results due to the complex semantics and the fact that the scene is usually short. External health knowledge can be introduced to enrich the semantic information of the demand scene to improve the large model's ability to understand the relationship between words and better establish the association between the demand scene and other entities.
[0075] Furthermore, attribute extraction is performed in box 360. In some examples, attribute extraction can be performed from multi-source data 301 based on an attribute extraction method. In other examples, the attribute extraction method includes performing attribute extraction based on attribute extraction rules or performing attribute extraction based on calculation logic corresponding to the attributes. Specifically, attribute extraction can be performed based on attribute extraction rules for general attribute types, and based on calculation logic corresponding to the attributes for non-general attribute types. In some examples, the popularity attribute of some entities can be determined by calculating the popularity attribute values of the goods associated with the entity through addition, normalization, and the like.
[0076] Furthermore, in the process of constructing the knowledge graph 112, knowledge fusion can be performed. Specifically, entity fusion is performed in box 370. Further, relationship fusion is performed in box 380. Still further, attribute fusion is performed in box 390. Specifically, since there may be knowledge overlap due to different sources, the extracted knowledge is fused. The artificial intelligence model 114 is used to complete term definitions, align and standardize terms, align entity standardization, extract and fuse synonyms, etc., to achieve knowledge fusion and completion. In some examples, a Neo4j graph database can be used to create nodes and relationships and add node attributes to determine the knowledge graph 112.
[0077] After completing knowledge modeling, knowledge extraction, and knowledge fusion using the data in the multi-source data 301, a health knowledge graph 112 can be obtained. Specifically, entities in the health knowledge graph 112 may include scenarios, categories, merchants, commodities, doctors, and users).
[0078] Continue to refer to Figure 4 The following further describes an example process of determining the query result 120. It should be understood that this is merely exemplary and not limiting.
[0079] Figure 4 4 is a flowchart of a process 400 for determining query results according to some embodiments of the present disclosure. The process 400 may be implemented at the query system 110. For ease of discussion, reference will be made to Figure 1 The process 400 is described with reference to the environment 100 of FIG.
[0080] In block 410, the query system 110 receives a user query request. In some examples, the user query request may be a query statement. In other examples, the user query request may be a keyword for querying. It is understood that this is merely exemplary and not restrictive.
[0081] After receiving the user query request, in box 420, the query system 110 performs entity recognition and relationship extraction based on the artificial intelligence model 114. Specifically, the entities in the user query request are recognized and the relationships between the recognized entities are extracted. Before executing box 420, the artificial intelligence model can also be trained and tuned. During the training process of the artificial intelligence model, the artificial intelligence model can also be used to perform entity alias completion and entity hyponym reasoning.
[0082] In block 430 , the query system 110 generates query logic. Specifically, the query system 110 may provide the extracted entities and relationships to the artificial intelligence model to generate query logic.
[0083] In box 440, the query system 110 performs knowledge retrieval. In some examples, prompt engineering can be used to guide the model to generate high-quality, accurate and targeted outputs. Specifically, prompt engineering is a technique for designing, experimenting and optimizing input prompts for pre-trained language models. In this way, the common sense and health e-commerce domain knowledge reasoning ability of the artificial intelligence model 114 can be enhanced, the effectiveness and accuracy of the output of the artificial intelligence model 114 can be improved, the interpretability of the reasoning of the artificial intelligence model 114 can be enhanced, and the real-time performance of the artificial intelligence model 114 can be enhanced.
[0084] Specifically, the query system 110 can perform knowledge retrieval using the health knowledge graph 112 and the artificial intelligence model. Furthermore, before the query system 110 can perform knowledge retrieval using the health knowledge graph 112, it is necessary to convert the content to be retrieved into a query language supported by the health knowledge graph 112 to obtain relevant knowledge from the health knowledge graph 112. Furthermore, the query system 110 can combine the relevant knowledge obtained from the health knowledge graph 112 with the knowledge obtained from the artificial intelligence model, and perform answer assembly in box 450. Specifically, the answer assembly can be to complete the relevant knowledge obtained from the health knowledge graph 112 using the knowledge obtained from the artificial intelligence model, and convert it into natural language. In box 460, the query system 110 performs answer output. Specifically, the query system 110 performs output of the answer in natural language.
[0085] In some examples, multiple rounds of questions and answers can also be performed to provide users with an instant demand update method. For example, multiple rounds of questions and answers can include context management and updating. Specifically, after each round of dialogue is completed, the incremental learning method can be used to add the dialogue history to the artificial intelligence model, and fine-tune and optimize it as needed, and use the memory mechanism to store and retrieve the previous dialogue history to better manage and update the context information, thereby building a context environment. The context environment usually contains the user's questions, the model's answers, and other dialogue-related information, such as the number of dialogue rounds, the identities of the dialogue participants, etc. Further, multiple rounds of questions and answers can also include context understanding. Specifically, the powerful language representation ability of the artificial intelligence model 114 is used to input the current question and the context history into the model together, and the representation ability of the model is used for semantic understanding and logical reasoning. At the same time, the self-attention mechanism is used to capture the relationship between different parts, so as to better understand the background and context information of the dialogue. In this way, the accuracy, breadth and naturalness of the question and answer can be enhanced, and the query results 120 can be updated in real time according to changes in user needs.
[0086] Continue to refer to Figure 5 The exemplary process of knowledge construction is further described. It should be understood that this is merely exemplary and not restrictive.
[0087] Figure 5 FIG. 5 is a schematic diagram of a process 500 for knowledge construction according to some embodiments of the present disclosure. The process 500 may be implemented at the query system 110. For ease of discussion, reference will be made to Figure 1 The process 500 is described with reference to the environment 100 of FIG.
[0088] like Figure 5 As shown, before the knowledge graph 112 is constructed, the query system 110 can determine the multi-source data 301 corresponding to the scenario. Specifically, the multi-source data 301 can include at least one of the e-commerce platform user attribute and behavior data, e-commerce platform product data, e-commerce platform user data, external health encyclopedia data, and external health platform data.
[0089] Furthermore, in block 520 , the query system 110 performs data labeling, and specifically, performs data labeling by using the artificial intelligence model 114 to perform few-sample learning.
[0090] In box 530, the query system 110 performs knowledge extraction. Specifically, the understanding ability of the artificial intelligence model 114 is used to enhance the knowledge extraction level. Further, in the process of performing knowledge extraction, it is also necessary for the query system 110 to perform knowledge tracing in box 510. In some examples, knowledge tracing is to call part or all of the data from the multi-source data 301.
[0091] In block 540, the query system 110 performs knowledge fusion. Specifically, the artificial intelligence model 114 is used as an encoder and a generator to implement knowledge fusion. In some examples, knowledge completion is also performed during the knowledge fusion process.
[0092] In block 550 , the query system 110 performs knowledge storage, specifically, using the artificial intelligence model 114 to generate the knowledge graph 112 to store knowledge.
[0093] In box 560, the query system 110 performs knowledge computing. Specifically, the query system 110 can use the semantic understanding and general knowledge ability of the artificial intelligence model 114 to improve the knowledge computing ability. Further, the above box 510 needs to be executed in the process of performing knowledge computing. In other examples, the knowledge computing can be the calculation of heat attributes, etc. It can be understood that this is merely exemplary and not restrictive.
[0094] In block 570 , the query system 110 performs knowledge application, specifically, utilizing the artificial intelligence model 114 to enhance the question-answering capability of the knowledge graph 112 and the ability to generate text from the knowledge graph 112 .
[0095] Continue to refer to Figure 6 The exemplary architecture of the artificial intelligence model is further described. It is understood that this is merely exemplary and not restrictive.
[0096] Figure 6 FIG. 6 is a schematic diagram of an artificial intelligence model architecture interface 600 according to some embodiments of the present disclosure. Figure 1 The interface 600 is described with reference to the environment 100 .
[0097] like Figure 6 As shown, the architecture 620 of the artificial intelligence model can be composed of multiple layers of Transformers, and each Transformer structure 625 can include a multi-head attention mechanism 640, a layer normalization 650, a fully connected layer 660, and a layer normalization 670. In some examples, the multi-head attention mechanism 640 is an allocation mechanism that highlights certain important features of an object by finding the correlation between the original data. Resources are reallocated according to the importance of the attention object (also called weight).
[0098] The text and position embedding representations can be provided to the architecture 620 of the artificial intelligence model in box 610 to obtain specific tasks in box 630, such as simple extraction, knowledge fusion, etc.
[0099] Continue to refer to Figure 7 An exemplary interface for determining entities and entity attributes is further described. It should be understood that this is merely exemplary and not restrictive.
[0100] Figure 7 FIG. 7 is a schematic diagram of an interface 700 for determining entities and entity attributes according to some embodiments of the present disclosure. Figure 1 The interface 700 is described with reference to the environment 100 .
[0101] like Figure 7 As shown, the entity may indicate at least one of a doctor, a hospital, a department, a user, a scenario, a category, a merchant, a review, and a merchant.
[0102] Further, in the case where the entity is a doctor, the entity attribute may indicate at least one of the doctor's name, professional direction, title, praise, number of patients, average waiting time, and price corresponding to the doctor. Further, in the case where the entity is a hospital, the entity attribute may also indicate at least one of the hospital name, hospital category, and hospital grade corresponding to the hospital. Further, in the case where the entity is a department, the entity attribute may also indicate at least one of the department name and department category corresponding to the department. Further, in the case where the entity is a user, the entity attribute may also indicate at least one of the gender, age, city level, purchasing power, and whether the user is a member user corresponding to the user. More, in the case where the entity is a scene, the entity attribute may also indicate at least one of the scene name, scene heat, and heat level corresponding to the scene. More, in the case where the entity is a category, the entity attribute may also indicate at least one of the category name and category heat corresponding to the category. More, in the case where the entity is a merchant, the entity attribute may also indicate at least one of the merchant name and merchant heat corresponding to the merchant. Furthermore, when the entity is a review, the entity attribute may also indicate at least one of the review type and review label corresponding to the review. In addition, when the entity is a product, the entity attribute may also indicate at least one of the product name, product price, discount information, applicable population, main diseases, applicable symptoms, ingredients, usage, after-sales service, review, and product popularity corresponding to the product.
[0103] In some examples, scene popularity can be determined based on the popularity of goods associated with the scene. In other instances, category popularity can be determined based on the sales of goods under the category and user activity. In other embodiments, merchant popularity can be determined based on the sales of goods associated with the merchant and user activity. In more examples, the evaluation type may include at least one of a doctor's evaluation or a product evaluation. In more examples, the evaluation tag can be identified based on the doctor's evaluation text Mr. Hu and the product evaluation text. In addition, the popularity of the product can be determined based on the sales of the product and user activity. In this way, user needs can be comprehensively and accurately considered to provide users with more accurate query results.
[0104] Continue to refer to Figure 8 An exemplary interface for determining entity relationships and relationship attributes is further described. It should be understood that this is merely exemplary and not restrictive.
[0105] Figure 8 FIG. 8 is a schematic diagram of an interface 800 for determining entity relationships and relationship attributes according to some embodiments of the present disclosure. Figure 1 The process 200 is described with reference to the environment 100 of FIG.
[0106] In some embodiments, the entity relationship may indicate at least one of the relationship between a merchant and a commodity, the relationship between a merchant and a user, the relationship between commodities and commodities, the relationship between a hospital and a doctor, the relationship between a doctor and a department, the relationship between a doctor and a user, the relationship between commodities and evaluations, the relationship between doctors and evaluations, the relationship between users and users, the relationship between scenes and scenes, the relationship between scenes and categories, the relationship between scenes and merchants, the relationship between scenes and commodities, the relationship between scenes and doctors, the relationship between scenes and users, the relationship between categories and categories, the relationship between categories and merchants, the relationship between categories and commodities, and the relationship between commodities and users. In some examples, the relationship between a merchant and a commodity may indicate that the commodity is sold by the merchant, the relationship between a merchant and a user may indicate that the user has purchased the merchant's commodity, the user has followed the merchant's store, the merchant has recommended the commodity to the user, etc., the relationship between commodities indicates that they belong to the same category, have been purchased by the same user, are sold in the same merchant's store, etc., and the relationship between a hospital and a doctor may indicate that the doctor works in the hospital. It can be understood that this is merely exemplary and not restrictive. It can be understood that this is merely exemplary and not restrictive. In other examples, the relationship between a doctor and a department may indicate that the doctor belongs to the department, the relationship between a doctor and a user may indicate that the doctor has provided consulting services to the user, the relationship between a product and a review may indicate that the review is closely related to the product, the review is irrelevant to the product, etc., the relationship between a doctor and a review may indicate that the review is closely related to the doctor, the review is irrelevant to the doctor, etc., and the relationship between users may indicate similar users, friend relationships, etc. It is understood that this is merely exemplary and not restrictive.
[0107] In other examples, the relationship between scenes can indicate a high correlation, an upstream relationship, a downstream relationship, etc., the relationship between scenes and categories can indicate that the category is sold in the scene, the relationship between scenes and merchants can indicate that the merchant's business type is closely related to the scene, the relationship between scenes and goods can indicate that the goods are sold in the scene, the relationship between scenes and doctors can indicate that doctors serve users in the scene, and the relationship between scenes and users can indicate that users query in the scene. It can be understood that this is merely exemplary and not restrictive. In more examples, the relationship between categories and categories can indicate a high correlation, an upstream relationship, a downstream relationship, etc., the relationship between categories and merchants can indicate that the merchant's goods belong to the category, the relationship between categories and goods can indicate that the goods belong to the category, and the relationship between goods and users can indicate that the user is interested in the goods, the user is not interested in the goods, etc. It can be understood that this is merely exemplary and not restrictive.
[0108] In other embodiments, the relationship attribute may indicate at least one of purchase frequency, user cognition, relationship type, number of consultations, relationship strength, purchase frequency, and activity. Further, the purchase frequency may indicate the number of times a user purchases a certain commodity or a certain type of commodity within a certain time range. For example, assuming that the time range is one month, and the user purchases Category A commodities three times within the month, it can be determined that the user's purchase frequency of Category A commodities is 3. It will be understood that this is merely exemplary and not restrictive. Further, user cognition may indicate the user's rational and emotional judgment of a certain merchant or a certain type of merchant. For example, user cognition may indicate that the user is not interested in merchant C, and user cognition may also indicate that the user is interested in merchant F. It will be understood that this is merely exemplary and not restrictive. Furthermore, the relationship type may indicate at least one of a high correlation, an upstream relationship, or a downstream relationship between commodities, the relationship type may also indicate at least one of a similar user relationship or a friend relationship between users, the relationship type may also indicate at least one of a high correlation, an upstream relationship, or a downstream relationship between scenes, and the relationship type may also indicate at least one of a high correlation, an upstream relationship, or a downstream relationship between categories. Specifically, a high correlation may indicate a relationship between multiple objects (such as commodities, scenes, or categories) whose correlation is higher than a correlation threshold, and the upstream relationship and the downstream relationship are relative relationships. For example, if badminton is an upstream commodity of a badminton racket, then the badminton racket is a downstream commodity of badminton, so badminton and badminton racket have an upstream relationship, and the badminton racket and badminton have a downstream relationship. It can be understood that this is merely exemplary. Furthermore, the number of consultations may indicate the number of times a user consults a certain doctor within a predetermined time range. For example, assuming that the predetermined time range is one week, and the user consults doctor H twice within the week, it can be determined that the number of consultations the user has with doctor H is 2 times. It will be appreciated that this is exemplary only and not limiting.
[0109] Furthermore, the relationship strength may indicate the closeness of the relationship between objects (e.g., the relationship between users, the relationship between goods and reviews, the relationship between doctors and reviews, the relationship between scenes, the relationship between scenes and categories, the relationship between scenes and merchants, the relationship between scenes and goods, the relationship between scenes and doctors, the relationship between scenes and users, and the relationship between categories). For example, the relationship strength may indicate that category A is closely related to scene B, and the relationship strength may be expressed as grade A. It is understood that this is merely exemplary and not restrictive. Furthermore, the purchase frequency may indicate the number of times a user purchases goods from a certain merchant within a predetermined time period or the number of times a user purchases a certain category within a period of time. Specifically, assuming that the predetermined time period is two months, and the number of times a user purchases category S within these two months is 4, it can be determined that the user's purchase frequency of the category is 4. It is understood that this is merely exemplary and not restrictive. More, the activity level may indicate the user's activity level under a certain category. It is understood that this is merely exemplary and not restrictive.
[0110] In some examples, when the entity relationship indicates the relationship between a merchant and a user, the relationship attribute may indicate at least one of the purchase frequency or the user's cognition. In other examples, when the entity relationship indicates the relationship between commodities and commodities, the relationship attribute may indicate the relationship type. In other examples, when the entity relationship indicates the relationship between a doctor and a user, the relationship attribute may indicate the number of consultations. In other examples, when the entity relationship indicates the relationship between commodities and reviews, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between doctors and reviews, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between users and users, the relationship attribute may indicate at least one of the relationship type and the relationship strength. In other examples, when the entity relationship indicates the relationship between scenes and scenes, the relationship attribute may indicate at least one of the relationship type and the relationship strength. In other examples, when the entity relationship indicates the relationship between scenes and categories, the relationship attribute may indicate the relationship attribute. In other examples, when the entity relationship indicates the relationship between scenes and merchants, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between scenes and commodities, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between the scene and the doctor, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between the scene and the user, the relationship attribute may indicate the relationship strength. In other examples, when the entity relationship indicates the relationship between categories, the relationship attribute may indicate at least one of the relationship type and the relationship strength. In other examples, when the entity relationship indicates the relationship between categories and users, the relationship attribute may indicate the purchase frequency and activity.
[0111] In some examples, the relationship type corresponding to the relationship between commodities may indicate one of a high association relationship, an upstream relationship, or a downstream relationship. In other examples, the relationship type corresponding to the relationship between users may indicate one of a similar relationship or a friend relationship. In more examples, the relationship type corresponding to the relationship between scenes may indicate one of an association relationship, an upstream relationship, or a downstream relationship, and the relationship strength corresponding to the relationship between scenes may be determined based on user behavior data. In more examples, the relationship strength between scenes and users may be determined based on the user's activity level in the scene or the data of various user behaviors. In more examples, the relationship type between categories and categories may indicate one of an associated category, an upstream category, or a downstream category, and the relationship strength between categories and categories may be determined based on user behavior data. In addition, the activity of the relationship between categories and users may be determined based on the user's active behavior data under the category. Specifically, the active behavior may be at least one of browsing categories, clicking categories, collecting categories, and adding categories to purchase.
[0112] In summary, the embodiments of the present disclosure can build an intelligent health e-commerce shopping guide assistant based on an artificial intelligence model to help users find health products that meet their needs more conveniently, quickly, and specifically, which can effectively improve the user experience and thus better promote user conversion.
[0113] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes.
[0114] Fig. 9 A schematic structural block diagram of an apparatus 900 for determining a query result according to some embodiments of the present disclosure is shown. The apparatus 900 may be implemented as or included in the query system 110. Each module / component in the apparatus 900 may be implemented by hardware, software, firmware, or any combination thereof.
[0115] like Fig. 9As shown, the device 900 includes an extraction module 910, which is configured to determine the knowledge graph associated with the artificial intelligence model by performing entity extraction, relationship extraction and attribute extraction on a multi-source database. The device 900 also includes a providing module 920, which is configured to provide the user query instruction to the artificial intelligence model in response to receiving the user query instruction to determine at least one of the scene, entity, entity relationship and attribute corresponding to the user query instruction. The device 900 also includes a determination module 930, which is configured to determine the first alternative query result and the second alternative query result from the artificial intelligence model and the knowledge graph respectively based on at least one of the scene, entity, entity relationship and attribute. The device 900 also includes a combination module 940, which is configured to perform query result combination on the first alternative query result and the second alternative query result to determine the query result corresponding to the user query instruction.
[0116] In some embodiments, the determination module 930 is also configured to determine the storage structure type of the knowledge graph; convert at least one of the scene, entity, entity relationship, and attribute into a graph query statement corresponding to the storage structure type; and determine a second alternative query result from the knowledge graph based on the graph query statement.
[0117] In some embodiments, the extraction module 910 is also configured to perform at least one of entity extraction, relationship extraction, and attribute extraction from multiple source databases to obtain at least one of an entity set, a relationship set, and an attribute set to determine an alternative database; use an artificial intelligence model to perform knowledge fusion on the data in the alternative database to determine a target database; and determine a knowledge graph based on the target database.
[0118] In some embodiments, the extraction module 910 is also configured to determine nodes, node attributes, and node relationships from entities, entity attributes, and entity relationships in the target database, respectively; and determine a knowledge graph based on nodes, node attributes, and node relationships.
[0119] In some embodiments, the extraction module 910 is further configured to determine an entity extraction method corresponding to the entity type of the entity; and perform entity extraction from the multi-source database based on the entity extraction method.
[0120] In some embodiments, the entity type includes a first type and a second type. In other embodiments, the extraction module 910 is further configured to determine that the entity extraction method indicates a first entity extraction method in response to the entity type indicating the first type, the first entity extraction method indicates that entity extraction is performed based on entity extraction rules; and in response to the entity type indicating the second type, determine that the entity extraction method indicates a second entity extraction method, the second entity extraction method indicates that entity extraction is performed using an artificial intelligence model.
[0121] In some embodiments, the extraction module 910 is further configured to determine a relationship extraction method for entity relationships; and perform relationship extraction from multi-source databases based on the relationship extraction method.
[0122] In some embodiments, the extraction module 910 is also configured to determine that the relationship extraction method indicates a first relationship extraction method in response to the entity relationship indicating the corresponding relationship between entities of the first type, and the first relationship extraction method indicates that relationship extraction is performed based on relationship extraction rules; and to determine that the relationship extraction method indicates a second relationship extraction method in response to the entity relationship indicating the corresponding relationship between entities of the first type and entities of the second type or indicating the corresponding relationship between entities of the second type, and the second relationship extraction method indicates that relationship extraction is performed using an artificial intelligence model.
[0123] In some embodiments, the extraction module 910 is further configured to determine an attribute extraction method corresponding to an attribute type of the attribute; and perform attribute extraction from a multi-source database based on the attribute extraction method.
[0124] In some embodiments, the attribute type includes a general attribute type and a non-general attribute type. In other embodiments, the extraction module 910 is further configured to determine, in response to the attribute type indicating a general attribute type, that the attribute extraction method indicates a first attribute extraction method, the first attribute extraction method indicating that attribute extraction is performed based on attribute extraction rules; and to determine, in response to the attribute type indicating a non-general attribute type, that the attribute extraction method indicates a second attribute extraction method, the second attribute extraction method indicating that attribute extraction is performed based on a calculation logic corresponding to the attribute.
[0125] In some embodiments, the entity type is determined based on a data type associated with the entity, a first type of entity indicating a structured or semi-structured entity, and a second type of entity indicating an unstructured entity.
[0126] In some embodiments, the knowledge graph indicates a structured semantic knowledge base, and a multi-source database is associated with a scenario.
[0127] The units and / or modules included in the device 900 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 900 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0128] It should be understood that one or more steps in the above method can be performed by a suitable electronic device or a combination of electronic devices. Such an electronic device or a combination of electronic devices may include, for example, Figure 1 The query system 110 in.
[0129] Fig.10 1 shows a block diagram of an electronic device 1000 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Fig.10 The electronic device 1000 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Fig.10 The electronic device 1000 shown can be used to implement Figure 1 Query system 110 or Fig. 9 Device 900.
[0130] like Fig.10 As shown, the electronic device 1000 is in the form of a general electronic device. The components of the electronic device 1000 may include, but are not limited to, one or more processors or processing units 1010, a memory 1020, a storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. The processing unit 1010 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 1020. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 1000.
[0131] The electronic device 1000 typically includes a plurality of computer storage media. Such media may be any available media accessible to the electronic device 1000, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1020 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1030 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 1000.
[0132] The electronic device 1000 may further include additional removable / non-removable, volatile / non-volatile storage media. Fig.10As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. Memory 1020 may include a computer program product 1025 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0133] The communication unit 1040 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 1000 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 1000 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0134] The input device 1050 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 1060 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 1000 may also communicate with one or more external devices (not shown) through the communication unit 1040 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 1000, or communicate with any device that allows the electronic device 1000 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0135] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0136] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0137] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0138] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0139] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0140] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for determining a query result, include: Determine the knowledge graph associated with the AI model by performing entity extraction, relationship extraction, and attribute extraction on multi-source databases; In response to receiving a user query instruction, providing the user query instruction to the artificial intelligence model to determine at least one of a scene, an entity, an entity relationship, and an attribute corresponding to the user query instruction; Based on at least one of the scenario, the entity, the entity relationship, and the attribute, determining a first candidate query result and a second candidate query result from the artificial intelligence model and the knowledge graph, respectively; as well as Query result combination is performed on the first candidate query result and the second candidate query result to determine a query result corresponding to the user query instruction.
2. The method according to claim 1, wherein a second candidate query result is determined from the knowledge graph based on at least one of the scenario, the entity, the entity relationship, and the attribute. include: Determine the storage structure type of the knowledge graph; Convert at least one of the scene, the entity, the entity relationship, and the attribute into a graph query statement corresponding to the storage structure type; as well as Based on the graph query statement, determine the second candidate query result from the knowledge graph.
3. The method according to claim 1, wherein determining the knowledge graph include: Perform at least one of entity extraction, relationship extraction and attribute extraction from the multi-source database to obtain at least one of an entity set, a relationship set and an attribute set to determine a candidate database; Using the artificial intelligence model to perform knowledge fusion on the data in the candidate database to determine a target database; as well as Based on the target database, the knowledge graph is determined.
4. The method according to claim 3, wherein the knowledge graph is determined based on the target database include: Determine nodes, node attributes and node relationships respectively from entities, entity attributes and entity relationships in the target database; as well as The knowledge graph is determined based on the nodes, the node attributes and the node relationships.
5. The method according to claim 1, wherein entity extraction is performed on a multi-source database include: Determine an entity extraction method corresponding to the entity type of the entity; as well as Based on the entity extraction method, entity extraction is performed from the multi-source database.
6. The method according to claim 5, wherein the entity type comprises a first type and a second type, and wherein determining an entity extraction mode corresponding to the entity type of the entity include: In response to the entity type indicating a first type, determining that the entity extraction mode indicates a first entity extraction mode, the first entity extraction mode indicating that entity extraction is performed based on an entity extraction rule; as well as In response to the entity type indicating a second type, it is determined that the entity extraction method indicates a second entity extraction method, and the second entity extraction method indicates that entity extraction is performed using an artificial intelligence model.
7. The method according to claim 1, wherein relation extraction is performed on a multi-source database include: Determine the relationship extraction method for entity relationships; as well as Based on the relationship extraction method, relationship extraction is performed from the multi-source database.
8. The method according to claim 7, wherein determining a relationship extraction method for entity relationships include: In response to the entity relationship indicating a corresponding relationship between entities of a first type, determining that the relationship extraction mode indicates a first relationship extraction mode, the first relationship extraction mode indicating performing relationship extraction based on a relationship extraction rule; as well as In response to the entity relationship indicating a corresponding relationship between an entity of the first type and an entity of the second type or indicating a corresponding relationship between entities of the second type, it is determined that the relationship extraction method indicates a second relationship extraction method, and the second relationship extraction method indicates performing relationship extraction using an artificial intelligence model.
9. The method according to claim 1, wherein attribute extraction is performed on a multi-source database include: Determine an attribute extraction method corresponding to the attribute type of the attribute; as well as Based on the attribute extraction method, attribute extraction is performed from the multi-source database.
10. The method according to claim 9, wherein the attribute type includes a general attribute type and a non-general attribute type, and wherein the attribute extraction mode corresponding to the attribute type of the attribute is determined include: In response to the attribute type indicating a general attribute type, determining that the attribute extraction mode indicates a first attribute extraction mode, the first attribute extraction mode indicating that attribute extraction is performed based on an attribute extraction rule; as well as In response to the attribute type indicating a non-general attribute type, it is determined that the attribute extraction mode indicates a second attribute extraction mode, and the second attribute extraction mode indicates that attribute extraction is performed based on a calculation logic corresponding to the attribute.
11. The method of claim 3, wherein the entity type is determined based on a data type associated with the entity, The first type of entity indicates a structured or semi-structured entity, and the second type of entity indicates an unstructured entity.
12. The method according to claim 1, wherein the knowledge graph indicates a structured semantic knowledge base and the multi-source database is associated with the scenario.
13. A device for determining a query result, include: An extraction module, configured to determine a knowledge graph associated with an artificial intelligence model by performing entity extraction, relationship extraction, and attribute extraction on a multi-source database; A providing module, configured to, in response to receiving a user query instruction, provide the user query instruction to the artificial intelligence model to determine at least one of a scene, an entity, an entity relationship, and an attribute corresponding to the user query instruction; A determination module is configured to determine a first candidate query result and a second candidate query result from the artificial intelligence model and the knowledge graph, respectively, based on at least one of the scenario, the entity, the entity relationship, and the attribute; as well as The combination module is configured to perform query result combination on the first candidate query result and the second candidate query result to determine a query result corresponding to the user query instruction.
14. An electronic device, include: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 12.
16. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 12.
