Interaction method and device, equipment and storage medium
By building graph structure data and machine learning models, the intelligent question-and-answer system can automatically analyze the complex attribute comparison relationship between products, solving the limitations of the intelligent question-and-answer system in the comparison of complex products, achieving efficient product comparison and cost-effective analysis, reducing the Manual intervention reduces operating costs.
Patent Information
- Application Number
- CN202411377507.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
When dealing with complex product comparison problems, especially when comparing cost-effectiveness, it is difficult to deeply analyze market understanding and user evaluation. Manual customer service often requires intervention, which increases the operating costs of the enterprise.
By constructing graph structure data, the machine learning model is used to accurately reflect the comparison relationship between complex attributes between goods in the graph feature representation between nodes, automatically extract the comparison attributes and analyze the graph feature representation of nodes, and provide target reply for the comparison request. content.
It realizes comparison and analysis of more attributes, reduces manual customer service intervention, improves work efficiency, saves training costs, and provides more comprehensive product comparison information.
Smart Images

Figure CN119272878A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to a method, apparatus, device, and storage medium for interaction. Background Art
[0002] Intelligent question-answering systems are an important part of the question-answering scenario about product information. These systems are usually built based on natural language processing and machine learning model technologies, and can automatically answer users' questions and provide personalized recommendations and shopping guide services. The application of intelligent question-answering systems not only improves the customer service efficiency of e-commerce platforms, but also enhances users' shopping experience. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for interaction is provided. The method proposed herein includes: obtaining input content, the input content at least indicating a comparison request related to a first object and a second object for a target attribute; determining graph structure data related to the input content, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and wherein each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object; using a first machine learning model, determining a first node related to the target attribute in a group of nodes related to the first object, and determining a second node related to the target attribute in a group of nodes related to the second object; and determining a target reply content for the comparison request based on a graph feature representation related to the first node and the second node in the graph structure data.
[0004] In a second aspect of the present disclosure, a device for interaction is provided, and the device proposed herein includes: a content acquisition module, configured to acquire input content, the input content at least indicating a comparison request related to a first object and a second object for a target attribute; a graph structure data determination module, configured to determine graph structure data related to the input content, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and wherein each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object; a graph structure data processing module, configured to determine, by using a first machine learning model, a first node related to the target attribute in a group of nodes related to the first object, and a second node related to the target attribute in a group of nodes related to the second object; and a reply content determination module, configured to determine the target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The 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. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[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 implement the method of the first aspect.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which includes computer executable instructions, and when the instructions are executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0008] It should be understood that the contents described in this content section 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] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. 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 according to an embodiment of the present disclosure is shown;
[0011] Figure 2 A flowchart showing an example process of a method for interaction according to some embodiments of the present disclosure;
[0012] Figure 3 A schematic diagram showing an example of graph structure data according to some embodiments of the present disclosure;
[0013] Figure 4 A flowchart showing an example process of a method for interaction according to some embodiments of the present disclosure;
[0014] Figure 5 A schematic structural block diagram of an apparatus for interaction according to some embodiments of the present disclosure is shown; and
[0015] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain 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 set forth 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.
[0017] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0018] 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 be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0019] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.
[0020] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0021] As briefly described above, in the question-and-answer scenario about product information, the intelligent question-and-answer system can automatically answer users' questions and provide personalized recommendations and shopping guide services. However, the current intelligent question-and-answer system still faces certain limitations in practical applications. Especially when dealing with product comparison questions, the intelligent question-and-answer system needs to extract relevant information from the product's parameter table and provide answers to users based on the differences in parameters. However, when it comes to some complex comparisons that cannot be fully reflected in the parameter table, such as the price-performance comparison between product A and product B, the intelligent question-and-answer system is powerless. Such questions often require in-depth market understanding, product analysis, and user evaluation. Therefore, manual customer service intervention is often required. Training a qualified manual customer service not only takes time, but also requires a lot of training resources, which undoubtedly increases the operating costs of the company.
[0022] In view of this, an embodiment of the present disclosure provides a scheme for interaction. According to the scheme, input content is first obtained, and the input content at least indicates a comparison request related to a first object and a second object for a target attribute. Then, graph structure data related to the input content is determined, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and wherein each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object. Then, using a first machine learning model, a first node related to the target attribute is determined in a group of nodes related to the first object, and a second node related to the target attribute is determined in a group of nodes related to the second object. Finally, based on the graph feature representation related to the first node and the second node in the graph structure data, the target reply content for the comparison request is determined.
[0023] It will be more clearly understood through the description below that this solution constructs graph structure data, creates nodes for various attributes of each product, and uses the graph feature representation between nodes to accurately reflect the comparison relationship between complex attributes of the products. When a user asks a question such as "Which one is more cost-effective, product C1 or product C2", this solution can use the first machine learning model to extract the comparison attribute "cost-effectiveness", find the corresponding node in the graph structure data, and determine the comparison result by analyzing the graph feature representation of the node. In this way, this solution breaks through the limitations of the parameter table and can compare and analyze more attributes, thereby achieving a more comprehensive product comparison.
[0024] Various example implementations of the solution will be described in detail below in conjunction with the accompanying drawings.
[0025] Figure 1 A schematic diagram of an example environment 100 according to an embodiment of the present disclosure is shown. Figure 1 , the example environment 100 may include a terminal device 110 and an electronic device 120 .
[0026] In the exemplary environment 100, an application 130 for interacting with an electronic device 120 is installed in a terminal device 110. A user 140 may interact with the application 130 via the terminal device 110 and / or its attached devices.
[0027] As an example, user 140 may provide input content to application 130, and the input content may indicate a comparison request related to the target attribute of the first object and the second object. After receiving the input content, application 130 may send it to electronic device 120. After receiving the input content, electronic device 120 may determine a first node related to the target attribute of the first object and a second node related to the target attribute of the second object in the graph structure data related to the input content. Then, electronic device 120 determines the target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data. Subsequently, electronic device 120 may return the determined target reply content to terminal 110, thereby presenting the target reply content to user 140 with the aid of application 130. In addition, terminal device 110 may present interface 150 of application 130, and target reply content may be presented on interface 150.
[0028] In some embodiments, the terminal device 110 can 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, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the terminal device 110 can also support any type of interface for the user (such as "wearable" circuits, etc.).
[0029] The electronic device 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The electronic device 120 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. The electronic device 120 may provide background services for the application 130 that supports content presentation in the terminal device 110.
[0030] A communication connection may be established between the electronic device 120 and the terminal device 110. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a universal serial bus connection, a wireless fidelity connection, etc., and the embodiments of the present disclosure are not limited in this respect. In the embodiments of the present disclosure, the electronic device 120 and the terminal device 110 may implement signaling interaction through the communication connection between the two.
[0031] 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.
[0032] Figure 2 A flowchart of an example process 200 of a method for interaction according to some embodiments of the present disclosure is shown. The process 200 may be implemented at the electronic device 120.
[0033] Reference Figure 2 In box 210, the electronic device 120 obtains input content, and the input content at least indicates a comparison request related to the first object and the second object with respect to a target attribute.
[0034] In some embodiments, the input content may be obtained based on an input operation (e.g., keyboard input or voice command) of a target user (e.g., user 140). As an example, the electronic device 120 may be applied to a question-and-answer scenario regarding product information. For example, the electronic device 120 may be applied to an automatic question-and-answer system on an e-commerce platform. In such a scenario, the electronic device 120 may compare information about different products for the target user to help the target user make a purchase decision.
[0035] For the sake of clarity, unless otherwise specified, the following describes various embodiments of the present disclosure using the question-and-answer scenario about product information as an example. It should be noted that, according to actual needs, various embodiments of the present disclosure can also be applied to any other appropriate scenarios, and the embodiments of the present disclosure are not listed one by one here.
[0036] In the question-and-answer scenario about product information, the input content may refer to specific questions or instructions initiated by the target user related to comparing product information. For example, the first object may refer to the first product that the target user wants to compare, the second object may refer to the second product that the target user wants to compare, and the target attribute may refer to the product characteristics or product performance that the target user cares about, such as "screen size", "photo quality" or "battery life".
[0037] At block 220 , the electronic device 120 determines graph structure data related to the input content.
[0038] Figure 3A schematic diagram of an example 300 of graph structured data 310 according to some embodiments of the present disclosure is shown.
[0039] Reference Figure 3 The graph structure data 310 includes multiple groups of nodes related to multiple objects, and each node in the multiple groups of nodes is related to at least one attribute (such as "screen size", "photo effect" or "battery life", etc.), and different nodes in the same group of nodes are related to different attributes of the same object.
[0040] As an example, in Figure 3 6 nodes 301 - 1 , 301 - 2 , . . . , 301 - 6 are shown in FIG. 6 . For the sake of clarity, the 6 nodes 301 - 1 , 301 - 2 , . . . , 301 - 6 are also collectively referred to as nodes 301 below.
[0041] Among the six nodes 301, 301-1, 301-2, ..., 301-6, node 301-1 and node 301-2 are the same group of nodes, and these two nodes 301 are related to object A1, and node 301-1 is related to attribute B1 of object A1, and node 301-2 is related to attribute B2 of object A1. Node 301-3 and node 301-4 are the same group of nodes, and these two nodes 301 are related to object A2, and node 301-3 is related to attribute B1 of object A2, and node 301-2 is related to attribute B2 of object A2. Node 301-5 and node 301-6 are the same group of nodes, and these two nodes 301 are related to object A3, and node 301-5 is related to attribute B3 of object A3, and node 301-6 is related to attribute B2 of object A3.
[0042] It should be noted that Figure 3 Only six nodes 301 in the graph structure data 310 are shown as an example. According to actual needs, the graph structure data 310 may include more nodes 301, and the distribution and connection relationship of these nodes 301 are not limited to Figure 3 The method shown.
[0043] Figure 4 A flow chart is shown of an example process 400 of a method for interaction according to some embodiments of the present disclosure.
[0044] Reference Figure 4 In block 401, the electronic device 120 determines whether the input content belongs to a commodity comparison question. If it is a commodity comparison question, the electronic device 120 may execute block 402, otherwise, the electronic device 120 may end process 400 and enter the answering process of the corresponding type of question.
[0045] In box 402, in response to obtaining the input content, the electronic device 120 retrieves candidate reply content that matches the input content from a set of candidate reply content. In box 409, the electronic device determines whether there is candidate reply content that matches the input content in a set of candidate reply content. If there is no candidate reply content that matches the input content in a set of candidate reply content, the electronic device 120 executes box 403, that is, determines the graph structure data 310 related to the input content. If there is candidate reply content that matches the input content in a set of candidate reply content, the electronic device 120 executes box 404, that is, determines the candidate reply content as the target reply content for the comparison request.
[0046] In some embodiments, a set of candidate answer contents may refer to a set of preset answer contents. For at least one candidate answer content in the set of candidate answer contents, the candidate answer content may be associated with one or more predetermined questions.
[0047] As an example, a set of answer contents may be pre-defined and stored in a specific question-answer knowledge base.
[0048] As an example, the electronic device 120 may find a predetermined question similar to the current input content from one or more predetermined questions, and then the electronic device 120 uses the candidate answer content associated with the found predetermined question as the candidate answer content matching the input content.
[0049] As an example, the electronic device 120 may use an encoder to encode one or more predetermined questions into vector feature representations. When the electronic device 120 obtains the current input content of the target user, it may also encode the input content into vector feature representations, and then based on the vector feature representation, through methods such as cosine similarity calculation, find the predetermined questions with the highest similarity as the predetermined questions similar to the current input content.
[0050] As an example, the dimension of the vector feature representation may be set to 1024, and the predetermined questions with the highest similarity may refer to the predetermined questions with the top three similarities.
[0051] As an example, the electronic device 120 can use the third machine learning model to determine whether there are any questions equivalent to the input content among the three predetermined questions. As an example, the determination of equivalent questions can be implemented by a pre-set first instruction template, and the first instruction template is designed to guide the third machine learning model to more accurately capture the key information of the question, and then make a more accurate equivalence judgment. For example, the first instruction template may include a series of question features, such as question type, keywords, semantic structure, etc., which help the third machine learning model to fully understand the essence of the problem.
[0052] As an example, after determining a predetermined question equivalent to the input content, the electronic device 120 may determine the predetermined question as a predetermined question similar to the current input content, and find one associated with the predetermined question from a set of candidate answer contents as the candidate answer content that matches the input content. Furthermore, the electronic device 120 may determine the candidate answer content as the target answer content for the comparison request, thereby achieving a quick answer.
[0053] In this way, the electronic device 120 can first determine whether the current question of the target user can be quickly answered through preliminary retrieval before determining the graph structure data 310. If the current question of the target user can be quickly answered, there is no need to perform subsequent processing based on the graph structure data 310, thereby improving the answering efficiency.
[0054] It should be noted that the above screening process for candidate reply content is only an example. According to actual needs, the screening process for candidate reply content (such as the similarity calculation method, the dimension of vector feature representation, etc.) can adopt any other suitable scheme.
[0055] In some embodiments, if there is no candidate response content in a set of candidate response content that matches the input content, the electronic device 120 will perform further processing, that is, through box 403, determine the graph structure data 310 related to the input content, and determine the target response content for the comparison request through boxes 405 to 407.
[0056] As described above, the graph structure data 310 includes multiple groups of nodes related to multiple objects, and each node 301 in the multiple groups of nodes is related to at least one attribute, and different nodes 301 in the same group of nodes are related to different attributes of the same object. Figure 3 , three edges 302-1, ..., 303-3 connecting two nodes 301 are also shown. For the sake of clarity, the three edges 302-1, ..., 303-3 are collectively referred to as edges 302 below.
[0057] As an example, the graph structure data 310 is a data structure for representing entities and the relationships between them, and is composed of nodes 301 (vertices) and edges 302 (edges). In the graph structure data 310, the nodes 301 represent entities, and the edges 302 represent the relationships between these entities.
[0058] As an example, the graph structure data 310 includes multiple groups of nodes, each group of nodes is associated with a specific object. These objects can indicate the commodities described above. For example, each object can correspond to a stock keeping unit (SKU), and different objects correspond to different SKUs.
[0059] As described above, each node 301 in the graph structure data 310 is related to at least one attribute of at least one object. The edge 302 between the node 301 and the node 301 can indicate the comparison relationship between the attributes corresponding to the two nodes 301. For example, the edge 302-1 between the node 301-1 and the node 301-3 indicates the comparison relationship between the node 301-1 and the node 301-3 for the attribute B1, the edge 302-2 between the node 301-2 and the node 301-4 indicates the comparison relationship between the node 301-2 and the node 301-4 for the attribute B2, and the edge 302-3 between the node 301-4 and the node 301-6 indicates the comparison relationship between the node 301-4 and the node 301-6 for the attribute B2.
[0060] In some embodiments, at least some of the nodes 301 in the graph structure data 310 are constructed based on at least one of the following: pictures related to a group of objects, parameter tables related to a group of objects, or commentary content related to a group of objects.
[0061] Taking the question-and-answer scenario about product information as an example, pictures related to a group of objects may refer to pictures containing product details, which provide intuitive visual information by showing the appearance and functions of the products. Parameter tables related to a group of objects may refer to data tables that list various attributes and technical parameters of the products. Comments related to a group of objects may refer to the actual use experience and comparative evaluation of the products by one or more users.
[0062] As an example, for a picture related to a group of objects, the electronic device 120 can use optical character recognition (OCR) technology combined with a fourth machine learning model capable of performing visual analysis tasks to identify and parse text information in the picture. By designing an appropriate first prompt content (prompt), the fourth machine learning model can extract from the picture and obtain structured data D0 for constructing the graph structure data 310. The structured data D0 may include the SKU name, attribute parameter name, and the comparative relationship between the attribute parameters involved in the picture. As an example, the electronic device 120 can check the characters on the picture, determine the shape by detecting dark and light patterns, and then use character recognition methods to translate the shape into text content that can be processed by the computer.
[0063] For a parameter table related to a group of objects, since it is already structured data, the electronic device 120 can directly extract the required attribute parameter name and attribute value information therefrom, and this information will also be integrated into the structured data D0.
[0064] For review content related to a group of objects, this part of data is usually unstructured. The electronic device 120 can extract users' evaluation and comparison information on products from the review content based on the second prompt content with the help of a fifth machine learning model that can perform natural language processing tasks, and convert and integrate it into the structured data D0.
[0065] The structured data D0 described above can be encoded into a corresponding vector feature representation by an encoder after verification of compliance accuracy and completeness. Furthermore, the embodiments of the present disclosure can construct the graph structured data described above based on data in the form of vector feature representation.
[0066] In some embodiments, new products may appear at regular intervals. For these new products, the electronic device 120 may update the graph structure data 310 according to a predetermined period based on the above method, thereby ensuring the timeliness of the graph structure data 310.
[0067] Return to reference Figure 2 In box 230, the electronic device 120 uses the first machine learning model 320 to determine a first node related to the target attribute in a group of nodes related to the first object, and determines a second node related to the target attribute in a group of nodes related to the second object.
[0068] In some embodiments, in the graph structure data 310, in a group of nodes related to the first object, the first node related to the target attribute can be a node 301 representing a specific value or feature of the attribute. For example, if the first object is object A1 (e.g., a smartphone) and the target attribute is its attribute B1 (e.g., screen size), then the first node can be a node 301-1 indicating a specific value of attribute B1 of object A1. Similarly, in a group of nodes related to the second object, the second node related to the target attribute represents a specific value or feature of the same attribute of the second object. If the second object is object A2 (e.g., another smartphone), then the second node can be a node 301-3 indicating a specific value of attribute B1 of object A2.
[0069] As an example, the electronic device 120 can extract features from the input content based on the preset second instruction template using a sixth machine learning model capable of performing natural language processing tasks to determine the target attribute. For example, for the question "Which screen is bigger, smartphone A3 or smartphone B3", the electronic device 120 can determine "screen size" as the target attribute.
[0070] In some embodiments, the first machine learning model 320 is constructed based on a graph neural network. The graph neural network is particularly suitable for processing graph structure data 310, so that the complex relationship between nodes 301 can be effectively learned.
[0071] Optionally, the first machine learning model 320 learns the feature representation of the node 301 through a graph convolution operation, which extends the concept of convolutional neural networks from Euclidean data to graph structure data 310, and improves the model's ability to capture and utilize the associated information between nodes 301. In this way, the first machine learning model 320 can more accurately understand and represent the unique position and role of each node 301 in the graph.
[0072] In addition to taking advantage of the graph neural network, the first machine learning model 320 can also incorporate a transformer-based architecture. The Transformer architecture is designed for processing sequence data (such as text), but it also shows great potential when processing graph structure data 310. By incorporating this architecture, the first machine learning model 320 can have greater flexibility and generalization capabilities when processing complex graph structure data 310.
[0073] In block 240 , the electronic device 120 determines target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data 310 .
[0074] Reference Figure 4 As an example, in box 405, the electronic device 120 can encode the extracted target attribute and the SKU corresponding to the first object and the second object, and use them together as the input of the first machine learning model 320. The first machine learning model 320 can determine the first node, the second node, and the graph feature representation related to the first node and the second node in the graph structure data 310 based on the received input. Then, in box 406, the first machine learning model 320 can determine the predicted comparison result and the corresponding confidence of the first node and the second node with respect to the target attribute based on the input data. Then, the electronic device 120 can determine the target reply content based on the predicted comparison result and the corresponding confidence.
[0075] In some embodiments, the graph feature representation may indicate respective properties of the first node and the second node, such as the degree of the node 301 (i.e., the number of edges 302 directly connected to the node 301), which reflects the importance and connectivity of the node 301 in the graph structure data 310. In some embodiments, the graph feature representation may also indicate the association relationship between the nodes 301, such as whether there is a direct edge 302 connection, or an indirect connection through other nodes 301, which helps analyze the mutual influence between the nodes 301. This information can be represented in the form of, for example, vector features, so that the relationship between these nodes 301 can be calculated.
[0076] In some embodiments, the electronic device 120 determines a predicted comparison result for a comparison request and a confidence level associated with the predicted comparison result based on the graph feature representation and utilizing the first machine learning model 320, wherein the confidence level at least indicates the probability that the first machine learning model 320 determines a target comparison result from a set of candidate comparison results as the predicted comparison result.
[0077] As an example, a high confidence level indicates that the first machine learning model 320 has a high confidence in the predicted comparison result determined by it, while a low confidence level indicates that there is a certain degree of uncertainty in the predicted comparison result determined by the first machine learning model 320. In this way, the electronic device 120 can accurately give a predicted comparison result by integrating the capabilities of the graph feature representation and the machine learning model, and quantify the confidence level of the model in the result through the confidence level.
[0078] In some embodiments, the first machine learning model 320 can determine the predicted comparison result and the corresponding confidence based on the edge 302 connecting the first node and the second node.
[0079] In some embodiments, if the graph feature indicates that there is an edge 302 connecting the first node and the second node in the graph structure data 310, the electronic device 120 determines the comparison weight of the first node and the second node for the target attribute based on the edge 302 connecting the first node and the second node. Then, based on the type of the comparison weight, the electronic device 120 determines the target comparison result related to the type of the comparison weight in a group of candidate comparison results as the predicted comparison result. Then, the electronic device 120 determines the confidence related to the predicted comparison result based at least on the value of the comparison weight.
[0080] As described above, in the graph structure data 310, the nodes 301 indicate certain attributes of the object, such as screen size, battery capacity, etc. The edges 302 between the nodes 301 indicate the comparative relationship between these attributes, which may specifically include "excellent" or "inferior".
[0081] As an example, in the graph structure data 310, for any two nodes 301, the first machine learning model 320 can determine a comparison weight that can indicate a comparison result of the two nodes 301 for a target attribute by at least analyzing an edge 302 between the two nodes 301. As an example, the edge 302 between the two nodes 301 can be determined when constructing the graph structure data 310, and can be updated in real time as the graph structure data 310 continues to change.
[0082] As an example, in the graph structure data 310, when the first node is superior to the second node in the target attribute, the first machine learning model 320 can determine that the comparison weights of the two nodes 301 for the target attribute are positive by at least analyzing the edge 302 connecting the first node and the second node. When the first node is inferior to the second node in the target attribute, the first machine learning model 320 can determine that the comparison weights of the two nodes 301 for the target attribute are negative by at least analyzing the edge 302 connecting the first node and the second node. In other words, in this example, the types of comparison weights can include at least two types: "positive value" and "negative value".
[0083] As an example, a set of candidate comparison results includes at least a first candidate comparison result associated with the "positive value" described above (e.g., the target attribute of the first node is better than the target attribute of the second node) and a second candidate comparison result associated with a "negative value" (e.g., the target attribute of the first node is inferior to the target attribute of the second node). The type of comparison weight (positive value / negative value) will affect the selection of the predicted comparison result. For example, if the comparison weight for the target attribute is determined to be a positive value, the first machine learning model 320 can determine the first candidate comparison result as the predicted comparison result; if the comparison weight for the target attribute is determined to be a negative value, the first machine learning model 320 can determine the second candidate comparison result as the predicted comparison result.
[0084] In some embodiments, the value of the comparison weight can be used to determine the confidence level associated with the predicted comparison result. As an example, the greater the absolute value of the comparison weight, the higher the confidence level may be. For example, if the comparison weight is positive and large, it means that the first node is significantly better than the second node in terms of the target attribute. Conversely, if the comparison weight is negative and the absolute value is large, it means that the first node is significantly inferior to the second node in terms of the target attribute.
[0085] In some embodiments, the first machine learning model 320 can be constructed based on the original graph convolutional neural network.
[0086] As an example, the original graph convolutional neural network is a graph convolutional neural network designed for the classification task of node 301. In this network, the importance of the original node 301 and the adjacent node 301 are equally weighted.
[0087] As an example, as the number of network layers increases, the representation of node 301 (i.e., the feature vector of node 301) may gradually become smaller, which affects the performance and expressiveness of the model. In order to solve the problem that the representation of node 301 becomes smaller as the number of layers increases, the embodiment of the present disclosure adds a residual connection layer to the original graph convolutional neural network.
[0088] Specifically, after each layer of graph convolution, the output of the current layer is added to the output of the previous layer (i.e., the residual). This process can be expressed by Formula 1:
[0089]
[0090] in is the vector representation of node j at the kth layer, b (k) is the bias term of the kth layer, W (k) is the weight matrix of the kth layer. is the vector representation of node j at the k-1th layer.
[0091] At the kth layer, the graph convolution operation can be expressed by Formula 2:
[0092]
[0093] Where N i is the set of neighbor nodes of node i, is the normalization factor.
[0094] In some embodiments, the embodiments of the present disclosure can also add more multi-layer perceptrons (MLP) to the original graph convolutional neural network to map the final node 301 representation to the prediction of the classification task. Taking adding two layers of multi-layer perceptrons (MLP) as an example, the output of the first layer of MLP is 1 It can be expressed by formula 3, and the output O of the second layer MLP can be expressed by formula 4:
[0095] O 1 =σ(W 1 H+b 1 );
[0096] Formula 3
[0097] O = Softmax(W 2 O 1 +b 2 );
[0098] Formula 4
[0099] Where σ is a nonlinear activation function (such as ReLU, Sigmoid, etc.), H is the input feature matrix, and softmax is a normalized exponential function.
[0100] In some embodiments, the first machine learning model 320 is trained by a cross entropy loss function. As an example, the parameters of the model are optimized by minimizing the cross entropy loss function so that the predicted output of the model is as consistent as possible with the true label. As an example, the cross entropy loss function can be expressed by Formula 5:
[0101]
[0102] Where N is the number of nodes 301, C is the number of categories, and y i,c is the true label of node i for category c, o i,c is the predicted probability of node i for category c output by the MLP.
[0103] For the trained first machine learning model 320, when specific data (such as the target attributes of two SKUs, etc.) is input, the first machine learning model 320 will output the predicted comparison results of the target attributes of the two SKUs and the confidence associated with the predicted comparison results. In this way, the electronic device 120 can use the graph neural network and graph feature representation to accurately predict and compare the differences in target attributes of different SKUs and provide corresponding confidence assessments.
[0104] In some embodiments, if the graph feature representation indicates that the edge 302 connecting the first node and the second node does not exist in the graph structure data 310, the electronic device 120 determines the predetermined content as the predicted comparison result.
[0105] In some embodiments, if the graph feature indicates that there is no edge 302 connecting the first node and the second node in the graph structure data 310, this means that the two nodes 301 have no direct comparison relationship in the target attribute (or the two nodes 301 are roughly equivalent in the target attribute). In this case, the electronic device 120 can determine the predetermined content (such as "incomparable" or "equivalent results") as the predicted comparison result.
[0106] In block 410, the electronic device 120 determines whether the confidence is greater than or equal to a predetermined threshold. In some embodiments, if the confidence is greater than or equal to the predetermined threshold, the electronic device 120 executes block 407, that is, based on the predicted comparison result, generates a target reply content for the comparison request, and if the confidence is less than the predetermined threshold, the electronic device 120 executes block 408, that is, requests a third party to determine the target reply content for the comparison request.
[0107] As an example, when the confidence level of the predicted comparison result is greater than or equal to a predetermined threshold, the electronic device 120 will trust the predicted comparison result given by the first machine learning model 320, and automatically generate the target reply content for the user's request accordingly. When the confidence level of the predicted comparison result is lower than the predetermined threshold, the electronic device 120 will determine that the first machine learning model 320 cannot give a sufficiently reliable reply. In this case, the electronic device 120 will instead request a third party (such as manual customer service) to intervene to ensure that the user can get an accurate and comprehensive answer.
[0108] In the context of question-and-answer scenarios about product information, this method of learning the relationship between the attributes of different SKUs based on graph structures has significant advantages. It can not only automatically capture and understand the complex relationships between products, but also conduct in-depth analysis through the multi-hop reasoning capabilities of graph neural networks, thereby providing users with valuable comparison information. More importantly, this method greatly reduces the burden of people manually organizing product comparison knowledge and improves work efficiency.
[0109] As described above, the electronic device 120 can quickly respond to the comparison request for the target attribute based on a set of candidate answer contents in the question-answer knowledge base. In some embodiments, the electronic device 120 updates a set of candidate answer contents based on the target answer contents generated for the comparison request. In this way, the electronic device 120 can regularly update a set of candidate answer contents based on the output of the first machine learning model 320, thereby ensuring the timeliness and accuracy of a set of candidate answer contents.
[0110] In some embodiments, the input content is obtained based on the input operation of the target user. Alternatively, the input content is simulated input content constructed based on two nodes 301 with edges 302 in the graph structure data 310 using a second machine learning model.
[0111] In some embodiments, the input content may include at least two sources. As described above, the input content may come from the input operation of the target user. Based on such input content, the electronic device 120 may give the target user a reply content through boxes 210 to 240. In addition, the electronic device 120 also automatically constructs simulated questions and answers them using the first machine learning model 320. On this basis, the electronic device 120 may use these answers to update and optimize a set of candidate reply contents in the question-and-answer knowledge base, thereby enriching the question-and-answer knowledge base and reducing the delay in automatically answering user questions.
[0112] According to the various embodiments described above, it can be clearly understood that the embodiments of the present disclosure construct graph structure data 310, create nodes 301 for various attributes of each commodity, and use the graph feature representation between nodes 301 to accurately reflect the comparison relationship between complex attributes of commodities. When a user asks a question such as "Which one is more cost-effective, commodity C1 or commodity C2", the embodiments of the present disclosure can use the first machine learning model 320 to extract the comparison attribute "cost-effectiveness", find the corresponding node 301 in the graph structure data 310, and determine the comparison result by analyzing the graph feature representation of the node 301. In this way, the embodiments of the present disclosure break through the limitations of the parameter table and can compare and analyze more attributes, thereby achieving a more comprehensive product comparison.
[0113] In this way, when faced with more complex issues such as "cost-effectiveness" comparison, the embodiments of the present disclosure do not require human intervention, thereby saving customer service training costs and improving customer service efficiency.
[0114] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 5 A schematic structural block diagram of an apparatus 600 for interaction according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in the electronic device 120. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware or any combination thereof.
[0115] Reference Figure 5 , the device 500 includes a content acquisition module 510, a graph structure data determination module 520, a graph structure data processing module 530 and a reply content determination module 540. In some embodiments, the content acquisition module 510 is configured to acquire input content, and the input content at least indicates a comparison request related to a first object and a second object for a target attribute. The graph structure data determination module 520 is configured to determine graph structure data related to the input content, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object. The graph structure data processing module 530 is configured to use a first machine learning model to determine a first node related to the target attribute in a group of nodes related to the first object, and to determine a second node related to the target attribute in a group of nodes related to the second object. The reply content determination module 540 is configured to determine the target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data.
[0116] In some embodiments, the reply content determination module 540 is further configured to: based on the graph feature representation, using a first machine learning model, determine a predicted comparison result for the comparison request and a confidence level related to the predicted comparison result, the confidence level at least indicating the probability that the first machine learning model determines the target comparison result from a set of candidate comparison results as the predicted comparison result; and if the confidence level is greater than or equal to a predetermined threshold, generate target reply content for the comparison request based on the predicted comparison result.
[0117] In some embodiments, the reply content determination module 540 is further configured to: if the confidence level is less than a predetermined threshold, request a third party to determine a target reply content for the comparison request.
[0118] In some embodiments, the reply content determination module 540 is further configured to: if the graph feature representation indicates that there is an edge connecting the first node and the second node in the graph structure data, determine the comparison weight of the first node and the second node related to the target attribute based on the edge connecting the first node and the second node; based on the type of the comparison weight, determine the target comparison result related to the type of the comparison weight in a group of candidate comparison results as the predicted comparison result; and determine the confidence related to the predicted comparison result at least based on the value of the comparison weight.
[0119] In some embodiments, the reply content determination module 540 is further configured to: determine the predetermined content as the predicted comparison result if the graph feature representation indicates that there is no edge connecting the first node and the second node in the graph structure data.
[0120] In some embodiments, the graph structure data determination module 520 is further configured to: in response to obtaining input content, retrieve candidate reply content that matches the input content from a set of candidate reply content; and if there is no candidate reply content that matches the input content in the set of candidate reply content, determine the graph structure data related to the input content. The device 600 also includes a quick reply module. The quick reply module is configured to: if there is candidate reply content that matches the input content in a set of candidate reply content, determine the candidate reply content as the target reply content for the comparison request.
[0121] In some embodiments, the apparatus 600 further includes an updating module. The updating module is configured to update a set of candidate answer contents based on the target answer contents generated for the comparison request.
[0122] In some embodiments, the input content is obtained based on the input operation of the target user; or the input content is simulated input content constructed using a second machine learning model based on two nodes having edges in the graph structure data.
[0123] In some embodiments, at least some of the nodes in the graph structure data are constructed based on at least one of the following: a picture related to a group of objects; a parameter table related to a group of objects; or comment content related to a group of objects.
[0124] In some embodiments, the first machine learning model is built based on a graph neural network.
[0125] Figure 6 1 is a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. The electronic device 600 may be used to implement, for example, Figure 1 The electronic device 120 shown. It should be understood that Figure 6The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.
[0126] Reference Figure 6 , the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
[0127] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, caches, 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 630 can be a removable or non-removable medium, and can include a machine-readable medium, such as a flash drive, a disk, or any other medium, which can be used to store information and / or data and can be accessed within the electronic device 600.
[0128] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As 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. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0129] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 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 301.
[0130] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 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 600, or communicate with any device that allows the electronic device 600 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).
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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 determination of the 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 interaction, comprising: Acquire input content, where the input content at least indicates a comparison request related to a first object and a second object with respect to a target attribute; Determining graph structure data related to the input content, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and wherein each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object; Using the first machine learning model, Determine a first node related to the target attribute among a group of nodes related to the first object; Determining a second node related to the target attribute among a group of nodes related to the second object; as well as Based on the graph feature representation related to the first node and the second node in the graph structure data, a target reply content for the comparison request is determined.
2. The method according to claim 1, wherein determining the target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data comprises: Based on the graph feature representation, using the first machine learning model, determine a predicted comparison result for the comparison request and a confidence level associated with the predicted comparison result, wherein the confidence level at least indicates a probability that the first machine learning model determines a target comparison result from a set of candidate comparison results as the predicted comparison result; as well as If the confidence level is greater than or equal to a predetermined threshold, the target reply content for the comparison request is generated based on the predicted comparison result.
3. The method according to claim 2, wherein determining the target reply content for the comparison request based on the graph feature representation related to the first node and the second node in the graph structure data further comprises: If the confidence level is less than the predetermined threshold, a third party is requested to determine the target reply content for the comparison request.
4. The method of claim 2, wherein determining a predicted comparison result for the comparison request and a confidence level associated with the predicted comparison result comprises: If the graph feature indicates that there is an edge connecting the first node and the second node in the graph structure data, determine a comparison weight of the first node and the second node related to the target attribute based on the edge connecting the first node and the second node; Based on the type of the comparison weight, determining a target comparison result related to the type of the comparison weight in the set of candidate comparison results as the predicted comparison result; as well as A confidence level associated with the predicted comparison result is determined based at least on the value of the comparison weight.
5. The method according to claim 2, wherein determining a predicted comparison result for the comparison request comprises: If the graph feature indicates that there is no edge connecting the first node and the second node in the graph structure data, predetermined content is determined as the predicted comparison result.
6. The method according to claim 1, wherein determining graph structure data related to the input content comprises: In response to obtaining the input content, retrieving candidate answer content matching the input content from a set of candidate answer contents; as well as If there is no candidate answer content matching the input content in the set of candidate answer contents, determining graph structure data related to the input content, The method further comprises: If there is a candidate reply content matching the input content in the set of candidate reply contents, the candidate reply content is determined as the target reply content for the comparison request.
7. The method according to claim 6, further comprising: The set of candidate response contents is updated based on the target response content generated in response to the comparison request.
8. The method according to any one of claims 1 to 7, wherein: The input content is obtained based on an input operation of a target user; or The input content is simulated input content constructed using a second machine learning model based on two nodes having edges in the graph structure data.
9. The method according to any one of claims 1 to 7, wherein at least part of the nodes in the graph structure data are constructed based on at least one of the following: Pictures related to a group of objects; a list of parameters associated with a set of objects; or Comments about a set of objects.
10. The method of claim 1, wherein the first machine learning model is built based on a graph neural network.
11. A device for interaction, comprising: A content acquisition module is configured to acquire input content, wherein the input content at least indicates a comparison request related to a first object and a second object with respect to a target attribute; A graph structure data determination module is configured to determine graph structure data related to the input content, wherein the graph structure data includes multiple groups of nodes related to multiple objects, and wherein each node in the multiple groups of nodes is related to at least one attribute, and different nodes in the same group of nodes are related to different attributes of the same object; The graph structure data processing module is configured to utilize a first machine learning model, Determine a first node related to the target attribute among a group of nodes related to the first object; Determining a second node related to the target attribute among a group of nodes related to the second object; as well as A reply content determination module is configured to determine target reply content for the comparison request based on graph feature representations related to the first node and the second node in the graph structure data.
12. An electronic device comprising: at least one processing unit; as well as 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, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to any one of claims 1 to 10.
13. 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 10.
14. 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 10.