A data processing method, device, and readable storage medium
By constructing a relationship graph and updating the vector representation features, and combining category state and state attributes to predict the category of the intelligent chatbot, the problem of inaccurate recognition results in the existing technology is solved, and higher recognition accuracy and recommendation accuracy are achieved.
Patent Information
- Application Number
- CN202111011004.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2041-08-31
AI Technical Summary
Existing intelligent chatbots rely on the co-occurrence relationship between categories and category states for prediction in the field of category recognition, resulting in inaccurate recognition results and low relevance of recommended target related objects.
By obtaining the object category status and object status attributes of the target object, a relationship graph is constructed, the vector representation features in the relationship graph are updated, and the association between the category status nodes and the status attribute nodes is used to predict the category. The predicted category nodes are then obtained to determine the predicted category result of the target object.
It improves the accuracy of object category identification and associated object recommendation by considering the multi-faceted relationships between category, category status and status attributes, thus achieving more accurate category prediction and recommendation.
Smart Images

Figure CN115730050B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a data processing method, device and readable storage medium. BACKGROUND
[0002] In recent years, with the increasing development of artificial intelligence technology, intelligent dialogue robots have gradually penetrated into various industries, and the functional requirements and robot performance requirements of intelligent dialogue robots for objects in different industries are not the same. For example, for the category identification field, the functional requirements of intelligent dialogue robots for objects are biased towards the category identification professional field, and it is expected that intelligent dialogue robots will predict and identify the category to which an object belongs through dialogue with the object, and then recommend target associated objects associated with the predicted category to the object.
[0003] At present, for intelligent dialogue robots in the category identification field, the co-occurrence relationship between categories and category states is relied on. Once the intelligent dialogue robot identifies that an object has a certain category state in the dialogue process with the object, the object category of the object is predicted as the category corresponding to the category state. For example, category state a and category A have a co-occurrence relationship, and the intelligent dialogue robot identifies that the object category state of the object is category state a through dialogue, and then the intelligent dialogue robot directly determines the object category of the object as category A. However, a category state is not only associated with one category, for example, category state a and category B also have a co-occurrence relationship. Therefore, the identification result is not accurate by predicting and identifying only through the co-occurrence relationship between the category state and the category, and the association degree of the target associated object recommended to the object is also not high, that is, the recommendation accuracy is not high by using the existing method. SUMMARY
[0004] The embodiments of the present application provide a data processing method, device and readable storage medium, which can improve the identification accuracy of the object category.
[0005] The embodiments of the present application provide a data processing method, device and readable storage medium, which can improve the identification accuracy of the object category.
[0006] An object category state corresponding to a target object is obtained, and an object state attribute presented by the target object in the object category state is obtained.
[0007] A relationship graph is obtained, and the relationship graph contains the association relationship between the category nodes, the category state nodes and the state attribute nodes.
[0008] In the category state nodes, a target category state node indicated by the object category state is determined, and in the state attribute nodes having an association relationship with the target category state node, a target state attribute node indicated by the object state attribute is determined.
[0009] update the relation graph according to the vector expression features corresponding to the target category state node and the target state attribute node, to obtain a target relation graph;
[0010] According to the update vector expression features corresponding to each category node in the target relation graph, a predicted category node is obtained in the category nodes of the target relation graph, and category information indicated by the predicted category node is determined as a predicted category result of the target object.
[0011] Embodiments of the present application provide a data processing apparatus, comprising:
[0012] A data acquisition module is configured to acquire an object category state corresponding to a target object and an object state attribute presented by the target object in the object category state.
[0013] A graph acquisition module is configured to acquire a relation graph, wherein the relation graph comprises an association relationship among category nodes, category state nodes and state attribute nodes.
[0014] A node determination module is configured to determine a target category state node indicated by the object category state in the category state nodes, and determine a target state attribute node indicated by the object state attribute in the state attribute nodes associated with the target category state node.
[0015] A graph update module is configured to update the relation graph according to the vector expression features corresponding to the target category state node and the target state attribute node, to obtain a target relation graph.
[0016] A category prediction module is configured to acquire a predicted category node in the category nodes of the target relation graph according to the update vector expression features corresponding to each category node in the target relation graph.
[0017] The category prediction module is further configured to determine category information indicated by the predicted category node as a predicted category result of the target object.
[0018] In an embodiment, the data acquisition module comprises:
[0019] An auxiliary information acquisition unit is configured to acquire predicted auxiliary text information of the target object.
[0020] An information extraction unit is configured to extract state key text information in the predicted auxiliary text information for indicating a category state, and determine the category state indicated by the state key text information as the object category state.
[0021] The state attribute determining unit is configured to determine a state attribute indicated by attribute key text information as an object state attribute if the attribute key text information is contained in the prediction auxiliary text information.
[0022] The state attribute determining unit is further configured to determine the object state attribute according to the object category state and the relationship graph if the attribute key text information is not contained in the prediction auxiliary text information.
[0023] In one embodiment, the state attribute determining unit is further configured to, if the attribute key text information is not contained in the prediction auxiliary text information, obtain a target category state node indicated by the object category state in a category state node of the relationship graph.
[0024] The state attribute determining unit is further configured to, in the relationship graph, take a state attribute node having an association relationship with the target category state node as a candidate state attribute node.
[0025] The state attribute determining unit is further configured to determine a state attribute indicated by the candidate state attribute node as a candidate state attribute set, and show the candidate state attribute set to the target object.
[0026] The state attribute determining unit is further configured to, in response to a selection operation of the target object on the candidate state attribute set, determine a candidate state attribute selected by the selection operation as the object state attribute.
[0027] In one embodiment, the category node contains category node M i , the category state node contains category state node M j , the target category state node is an adjacent node of category node M i , the adjacent node of category node M i further contains category state node M j , i and j are positive integers.
[0028] The graph updating module comprises:
[0029] The vector feature obtaining unit is configured to obtain vector expression features corresponding to the target category state node, the target state attribute node, and category state node M j respectively.
[0030] The vector aggregation unit is configured to aggregate the vector expression features corresponding to the target category state node and the vector expression features corresponding to the target state attribute node to obtain aggregated vector expression features corresponding to the target category state node.
[0031] The vector aggregation unit is further configured to aggregate the aggregated vector expression features corresponding to the target category state node and the vector expression features corresponding to category state node M jcorresponding vector representation features are aggregated to obtain a category node M i corresponding intermediate vector representation features;
[0032] The graph determination unit is configured to determine, when the intermediate vector representation features corresponding to each category node and the intermediate vector representation features corresponding to each category state node are determined, a relationship graph containing the intermediate vector representation features corresponding to each category node, the intermediate vector representation features corresponding to each category state node, and the vector representation features corresponding to each state attribute node as an intermediate relationship graph.
[0033] The graph determination unit is further configured to generate the target relationship graph according to the intermediate relationship graph.
[0034] In an embodiment, the vector aggregation unit is further configured to concatenate the vector representation features corresponding to the target category state node and the vector representation features corresponding to the target state attribute node to obtain a concatenated vector representation feature.
[0035] The vector aggregation unit is further configured to obtain a maximum value on each dimension of the concatenated vector representation feature, and determine a vector representation feature composed of the maximum value on each dimension as the aggregated vector representation feature.
[0036] In an embodiment, the vector aggregation unit is further configured to perform operation processing on the vector representation features corresponding to the target category state node and the vector representation features corresponding to the target state attribute node to obtain an operation vector representation feature.
[0037] The vector aggregation unit is further configured to obtain a maximum value on each dimension of the operation vector representation feature, and determine a vector representation feature composed of the maximum value on each dimension as the aggregated vector representation feature.
[0038] In an embodiment, the graph determination unit is further configured to obtain an iteration number corresponding to the intermediate relationship graph.
[0039] The graph determination unit is further configured to, if the iteration number satisfies an iteration stop condition, determine the intermediate relationship graph as the target relationship graph, and determine the intermediate vector representation features corresponding to the update nodes as the update vector representation features; the update nodes include the category nodes and the category state nodes.
[0040] The graph determination unit is further configured to, if the iteration number does not satisfy the iteration stop condition, update the intermediate relationship graph according to the intermediate vector representation features corresponding to the target category state node and the vector representation features corresponding to the target state attribute node to obtain the target relationship graph.
[0041] In an embodiment, the category nodes include the category node M i , i is a positive integer;
[0042] The category prediction module comprises:
[0043] An update vector feature acquisition unit is configured to acquire an update vector expression feature corresponding to each category node in the target relation graph and an update vector expression feature corresponding to each category state node.
[0044] A vector transformation unit is configured to input the update vector expression feature of the category node M i to a linear layer and perform vector transformation processing on the update vector expression feature of the category node M i by using a logistic regression function in the linear layer to obtain a prediction probability corresponding to the category node M i .
[0045] A category node determination unit is configured to determine a predicted category node according to the prediction probability corresponding to each category node in the target relation graph and the prediction probability corresponding to each category state node.
[0046] In an embodiment, the category node determination unit comprises:
[0047] A probability acquisition subunit is configured to acquire a maximum prediction probability from the prediction probability corresponding to each category node and the prediction probability corresponding to each category state node and determine the acquired maximum prediction probability as an initial prediction probability.
[0048] A first category node determination subunit is configured to determine the node corresponding to the initial prediction probability as the predicted category node if the node corresponding to the initial prediction probability belongs to the category node.
[0049] The first category node determination subunit is further configured to determine the category state indicated by the node corresponding to the initial prediction probability as the predicted category state if the node corresponding to the initial prediction probability belongs to the category state node.
[0050] The first category node determination subunit is further configured to determine the predicted category node according to the prediction number corresponding to the predicted category state.
[0051] In an embodiment, the first category node determination subunit is further configured to determine a maximum prediction probability in the prediction probability corresponding to each category node as a target prediction probability and determine the category node corresponding to the target prediction probability as the predicted category node if the prediction number satisfies a prediction stop condition.
[0052] The first category node determination subunit is further configured to, if the prediction times do not satisfy the prediction stop condition, acquire a prediction category state node indicated by the prediction category state in the target relation graph, update the target relation graph according to an update vector expression feature corresponding to the prediction category state node, an update vector expression feature corresponding to the target category state node, and a vector expression feature corresponding to the target state attribute node, and acquire the prediction category node in the updated target relation graph.
[0053] In an embodiment, the category node determination unit further includes:
[0054] The text pushing subunit is configured to input the update vector expression feature corresponding to the prediction category state node into the neural network model.
[0055] The text pushing subunit is further configured to generate a category state detection text for the prediction category state through the neural network model and the update vector expression feature corresponding to the prediction category state node, and push the category state detection text to the target object.
[0056] The text pushing subunit is further configured to receive a category state confirmation result returned by the target object for the category state detection text.
[0057] The step execution subunit is configured to, if the category state confirmation result is a category state existing result, execute a step of updating the target relation graph according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and acquiring the prediction category node in the updated target relation graph.
[0058] The second category node determination subunit is configured to, if the category state confirmation result is a category state missing result, update the target relation graph according to the update vector expression feature corresponding to the target category state node and the vector expression feature corresponding to the target state attribute node, and acquire the prediction category node in the updated target relation graph.
[0059] In an embodiment, the data processing apparatus further includes:
[0060] The node construction module is configured to acquire real category information, a real category state, and real state attributes of a sample object in the real category state corresponding to the sample object.
[0061] The node construction module is further configured to take the real category information as a category node, take the real category state as a category state node, and take the real state attributes as state attribute nodes.
[0062] The graph construction module is configured to construct an association edge between the category node, the category state node, and the state attribute node according to the association relationship between the real category information, the real category state, and the real state attribute.
[0063] The graph construction module is further configured to construct a relationship graph according to the category node, the category state node, the state attribute node, and the association edge.
[0064] In an embodiment, the graph construction module comprises:
[0065] The information input unit is configured to input sample category text information used to indicate the real category information, sample state text information used to indicate the real category state, and sample attribute text information used to indicate the real state attribute to the encoder.
[0066] The vector feature determination unit is configured to output a vector expression feature corresponding to the real category information by the encoder and the sample category text information, and determine the vector expression feature corresponding to the real category information as a vector expression feature corresponding to the category node.
[0067] The vector feature determination unit is further configured to output a vector expression feature corresponding to the real category state by the encoder and the sample state text information, and determine the vector expression feature corresponding to the real category state as a vector expression feature corresponding to the category state node.
[0068] The vector feature determination unit is further configured to output a vector expression feature corresponding to the real state attribute by the encoder and the sample attribute text information, and determine the vector expression feature corresponding to the real state attribute as a vector expression feature corresponding to the state attribute node.
[0069] The graph construction unit is configured to construct a relationship graph according to the association edge and the vector expression features corresponding to the category node, the category state node, and the state attribute node respectively.
[0070] The present embodiment of the present application provides a computer device, comprising a processor and a memory.
[0071] The memory stores a computer program, and the computer program is executed by the processor to make the processor execute the method in the present application.
[0072] The present embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program comprises program instructions, and the program instructions are executed by the processor to execute the method in the present application.
[0073] In an aspect of the present application, a computer program product or computer program is provided, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method provided in an aspect of the embodiments of the present application.
[0074] In the embodiments of the present application, in the process of predicting the category of the target object, in addition to obtaining the object category state of the target object, the object state attribute exhibited by the target object in the object category state is also obtained. Then, in the relationship graph, the target category state node indicated by the object category state and the target state attribute node indicated by the object state attribute are obtained. According to the vector expression features corresponding to the target category state node and the target state attribute node respectively, the relationship graph is updated to obtain a target relationship graph. Then, according to the updated vector expression features corresponding to each category node in the target relationship graph, a prediction category node is obtained in the target relationship graph, and the category information indicated by the prediction category node can be determined as the prediction category result of the target object. That is, in the present application, in the process of predicting the category of the target object, in addition to considering the category state, the state attribute possessed by the target object in a certain category state is also considered. Since the correlation between the category, the category state and the state attribute is considered in multiple aspects, the content contained in the relationship graph is more comprehensive and rich. Therefore, when predicting the category of the target object, the category state and the deeper state attribute can be queried through the relationship graph, so that the prediction category of the target object can be determined more accurately. That is, the accuracy and precision of the category prediction result can be improved through the comprehensive relationship graph, and the target associated object associated with the category prediction result can be more accurately recommended to the target object. In summary, the prediction (recognition) accuracy of the object category can be improved, and the recommendation accuracy of the associated object can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0076] Figure 1 is a network architecture diagram provided by an embodiment of the present application;
[0077] Figure 2a is a scene schematic diagram provided by an embodiment of the present application;
[0078] Figure 2b is a scene schematic diagram provided by an embodiment of the present application;
[0079] Figure 2c is a scene schematic diagram provided by an embodiment of the present application;
[0080] Figure 3 is a flow schematic diagram of a data processing method provided by an embodiment of the present application;
[0081] Figure 4 is a flow schematic diagram of a data processing method provided by an embodiment of the present application;
[0082] Figure 5 is a schematic diagram of outputting a vector representation feature provided by an embodiment of the present application;
[0083] Figure 6 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application;
[0084] Figure 7 is a structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0085] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work fall within the scope of protection of the present application.
[0086] The present application relates to artificial intelligence (Artificial Intelligence, AI) technology. For the sake of understanding, the artificial intelligence and related concepts will be described first.
[0087] Artificial intelligence (Artificial Intelligence, AI) is to use digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0088] Artificial intelligence technology is a comprehensive discipline involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, automatic driving, intelligent transportation, etc.
[0089] With the research and progress of artificial intelligence technology, artificial intelligence technology is researched and applied in multiple fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned vehicles, autonomous vehicles, drones, robots, intelligent medical care, intelligent customer service, Internet of Vehicles, autonomous driving, intelligent transportation, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0090] The scheme provided by the embodiments of the present application relates to natural language processing (Nature Language processing, NLP) and machine learning (Machine Learning, ML) of artificial intelligence.
[0091] Natural language processing (Nature Language processing, NLP) is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language used in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question and answer, knowledge graph, etc.
[0092] Machine learning (Machine Learning, ML) is a multi-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a discipline that studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and example-based learning.
[0093] See Figure 1 , Figure 1 is a network architecture diagram provided by the embodiments of the present application. As shown inFigure 1 As shown, this network architecture may include a service server 1000 and a terminal device cluster. The terminal device cluster may include one or more terminal devices; the number of terminal devices is not limited here. Figure 1 As shown, multiple terminal devices may include terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n; as Figure 1 As shown, terminal devices 100a, 100b, 100c, ..., 100n can each connect to the business server 1000 via a network, so that each terminal device can interact with the business server 1000 through the network connection.
[0094] It is understandable that, such as Figure 1 Each terminal device shown can have the target application installed. When the target application runs on each terminal device, it can interact with... Figure 1 The business servers 1000 shown interact with each other, enabling each business server 1000 to receive business data from each terminal device. The target application can include applications capable of displaying text, images, audio, and video data. For example, the application can be a medical recognition application, such as an intelligent dialogue application, which can be used for users to input current symptoms (which this application may refer to as category status). This intelligent dialogue application can predict the user's disease category (which this application may refer to as category information) based on the user's input information, and then recommend relevant doctors, departments, etc., based on the predicted disease category. Medical recognition applications can also be image recognition applications, which can be used for users to upload images and view the predicted category of the images; this application can also be an image classification application, which can be used for users to upload at least two images and obtain classification results, etc. The business server 1000 in this application can collect business data through the target application, such as symptom information input by users (e.g., patients). Based on the collected business data, the business server 1000 can predict the user's category (that is, predict the category of the user's disease, such as gastritis). The business server 1000 can then recommend relevant doctors or departments to the user based on this predicted category. For example, if the predicted category is "gastritis," the business server 1000 can recommend doctors associated with gastritis. The business server 1000 can push this recommendation to the user's corresponding target terminal device, where the user can view the recommendation on the target terminal device's display interface and search for a suitable doctor.
[0095] Optionally, the predicted category result from the business server 1000 can also be used as an auxiliary processing result. This auxiliary processing result can be displayed to users (such as doctors), who can then perform further manual processing based on their personal experience and the auxiliary processing result. For example, if the predicted category result is skin allergy in dermatology, after receiving this predicted category result, the user can use it as an auxiliary diagnostic result. The user can then combine this with their personal clinical experience to perform manual analysis and determine the final diagnostic plan for the patient.
[0096] This application embodiment can select one terminal device from multiple terminal devices as the target terminal device. This terminal device may include: smartphones, tablets, laptops, desktop computers, smart TVs, smart speakers, desktop computers, smartwatches, in-vehicle devices, and other smart terminals with multimedia data processing functions (e.g., video data playback functions, music data playback functions), but is not limited to these. For example, this application embodiment can... Figure 1 The terminal device 100a shown serves as the target terminal device, which may integrate the aforementioned target application. In this case, the target terminal device can interact with the business server 1000. For example, when a user uses the target application (such as a medical recognition application) on the terminal device, the user can input their current symptoms (such as abdominal pain, dizziness, dry mouth, etc.; this application may refer to symptoms as category status) through the bound account (which can be called the target object) in the target application. The user can also input the attributes presented under the current symptoms (the attribute can be the location of the symptom: for example, abdominal pain is left abdominal pain, dizziness is whole-head dizziness; the attribute can also be the duration of the symptom: for example, the duration of abdominal pain is 3 hours; the attribute can also be the cause of the symptom: for example, the cause of abdominal pain is eating 3 ice creams in a row).
[0097] Further, the business server 1000 can obtain the input information through the binding account (i.e., the target object) of the user, because the input information contains the category state of the target object (for the sake of understanding, the category state of the target object is referred to as the object category state below) and the state attribute of the target object in the object category state (for the sake of understanding, the state attribute of the target object is referred to as the object state attribute below); that is, the business server 1000 can obtain the object category state and the object state attribute of the target object, and determine the predicted category result of the target object (i.e., determine the disease category to which the target object belongs) according to the object category state and the object state attribute. According to the predicted category result, the business server 1000 can recommend the target associated object (such as a doctor, a department, a medicine, etc.) associated with the predicted category result to the target object, and return the recommendation result (i.e., the target associated object) to the target terminal device, so that the user can view the recommendation result (the target associated object) on the display page of the target terminal device, and perform subsequent processing (such as going to the department for medical inquiry) based on the recommendation result.
[0098] Optionally, the business server 1000 can also send the predicted category result of the target object to the terminal device corresponding to the target associated object (such as a doctor), so that the target associated object can take the predicted category result as an auxiliary diagnosis result, and then combine the auxiliary diagnosis result with personal clinical experience to perform artificial analysis and determine the final diagnosis scheme. The specific method of determining the predicted category result of the target object by the business server 1000 can be referred to the description of steps S101-S105 in the corresponding embodiments below. Figure 3
[0099] It can be understood that the method provided by the embodiments of the present application can be executed by a computer device, which includes but is not limited to a terminal device or a business server. The business server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms.
[0100] The terminal device and the business server can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0101] Optionally, it can be understood that the above computer device (such as the above business server 1000, terminal device 100a, terminal device 100b, etc.) can be a node in a distributed system, wherein the distributed system can be a blockchain system, which can be a distributed system formed by the plurality of nodes connected through network communication. Among them, the nodes can form a peer-to-peer (P2P, Peer To Peer) network, and the P2P protocol is an application layer protocol running on the transmission control protocol (TCP, Transmission Control Protocol). In the distributed system, any form of computer device, such as a business server, a terminal device, and other electronic devices, can become a node in the blockchain system by joining the peer-to-peer network. For ease of understanding, the concept of blockchain will be described below: blockchain is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm, etc. computer technology, mainly used for arranging data in chronological order and encrypting into a ledger, making it tamper-proof and counterfeit-proof, while allowing data verification, storage and updating. When the computer device is a blockchain node, due to the tamper-proof and counterfeit-proof characteristics of the blockchain, the data in the present application (such as user input information, predicted category results for target objects, etc.) can have authenticity and security, so that the results obtained after related data processing based on these data are more reliable.
[0102] For ease of understanding, please refer to Figure 2a , Figure 2a is a scene schematic diagram provided by an embodiment of the present application. As shown in Figure 2a , the terminal device 100a can be the terminal device 100a shown in the above Figure 1 ; as shown in Figure 2a , the business server 1000 can be the business server 1000 shown in the above Figure 1 .
[0103] As shown in Figure 2aAs shown, the user a can use a target application (such as an AI assistant application) in the terminal device 100a, the user a can log in to the target application using a binding account (which can be referred to as a target object) in the target application, and the user a can input his / her own symptoms (symptoms presented when suffering from a certain disease, such as cough, fever, body weakness, sore throat, dry mouth, abdominal pain, knee pain, facial twitching, etc.) through the binding account. Since the symptoms can be understood as a certain state of the user a at present, the symptoms can be referred to as a category state in the present application, and the symptoms attributes (attributes presented by the user under a certain symptom when suffering from the symptom, which can include duration, presentation site, symptom onset time, symptom cause, etc. The symptoms attributes can be referred to as state attributes in the present application) can be input by the user a. The target application can obtain these input information through the binding account (target object) of the user a, and the input information can be the input information corresponding to the target object. The symptoms of the user a in the input information can be the object category state corresponding to the target object, and the symptoms attributes of the user a can be the object state attributes presented by the target object under the object category state.
[0104] For example, as shown in FIG. 1A, the target application can automatically push a symptom description prompt message (such as Figure 2a As shown in FIG. 1A, after the user a enters the dialog box of the target application, the target application can automatically push a symptom description prompt message (such as Figure 2a to the target object corresponding to the user a, and the user a can input his / her own symptoms through the target object according to the symptom description prompt message. The input message of the user a can be input by a keyboard keying contact operation or by a non-contact operation such as voice or gesture, which will not be limited here. As shown in FIG. 1A, the user a inputs the information "I have a little stomachache" through the target object. Figure 2a As shown in FIG. 1A, the user a inputs the information "I have a little stomachache" through the target object. The terminal device 100a can obtain the input information through the target object, and the input information "I have a little stomachache" can be used for category prediction of the target object. The terminal device 100a can use the input information "I have a little stomachache" corresponding to the target object as prediction auxiliary text information, and the terminal device 100a can send the prediction auxiliary text information "I have a little stomachache" to the service server 1000.
[0105] Furthermore, the business server 1000 can identify the entity word (i.e., "stomach ache") used to describe the symptoms in the predictive auxiliary text information "I have a stomach ache". It should be understood that "stomach ache" is equivalent to "abdominal pain", thus the business server 1000 can determine that the target object's symptom is "abdominal pain". Further, the business server 1000 can obtain a relationship graph 2000, which is constructed from the associations between real diseases (which can be called real category information), real symptoms (which can be called real category states), and real symptom attributes (real state attributes) in the sample data. This relationship graph 2000 contains category nodes corresponding to various real category information and category state nodes corresponding to various real category states. A category state node can possess one or more symptom attributes (e.g., symptom location, symptom duration, symptom cause, etc.). Therefore, the relationship graph 2000 will also contain multiple state attribute nodes. For the specific implementation of constructing the relationship graph 2000, please refer to the following sections. Figure 4 The description in the corresponding embodiments.
[0106] For example, such as Figure 2a As shown, the relationship diagram 2000 may include category nodes 20, 21, and 22. Each category node can be connected to different category status nodes (when a category node is connected to a category status node, it indicates that the category node and the category status node are associated, or that the category information indicated by the category node is associated with the category status indicated by the category status node). For example, taking category node 20 as an example, the category status nodes associated with category node 20 include category status nodes 20a, 20b, and 20c (that is, when the target object has the symptoms indicated by category status node 20a, or the symptoms indicated by category status node 20b, or the symptoms indicated by category status node 20c, the category (disease) of the target object is the category indicated by category node 20); and the status attribute node associated with category status node 20a is status attribute node 200a. For category node 21, the category status nodes associated with category node 21 include category status nodes 20b and 20f. For category node 22, the category status nodes associated with category node 21 include category status nodes 20d and 20e, while the status attribute nodes associated with category status node 20d are status attribute nodes 200b and 200c.
[0107] Further, the service server 1000 can obtain the entity word corresponding to the symptom "abdominal pain" in the relationship graph 2000, and the category state node corresponding to the entity word in the relationship graph 2000 can be a target category state node. Assuming that the category state node 20d in the relationship graph 2000 is the category state node corresponding to the entity word "abdominal pain", the category state node 20d can be the target category state node (hereinafter, the category state node 20d is referred to as the target category state node 20d). Since there is no symptom attribute information in the predicted auxiliary text information "I have a little stomachache", the service server 1000 can obtain all state attribute nodes having an association relationship with the target category state node 20d in the relationship graph 2000 (for example, as shown in the table, the state attribute node 200b and the state attribute 200c can be included). Figure 2a It should be understood that the state attributes respectively indicated by the state attribute node 200b and the state attribute 200c can be all possible symptom attributes of the target object under the symptom "abdominal pain". For example, the state attribute (symptom attribute) indicated by the state attribute node 200b is "left abdominal pain", and the state attribute indicated by the state attribute node 200c can be "right abdominal pain", that is, the pain site of the target object under the symptom "abdominal pain" can be the left abdomen or the right abdomen, and the pain site (the site of the symptom) can be the symptom attribute.
[0108] It should be understood that the symptom "abdominal pain" can be understood as the object category state of the target object, and the service server 1000 can determine all possible state attributes under the object category state "abdominal pain" as the possible symptom attributes (which can be referred to as candidate state attributes) of the target object under the object category state "abdominal pain", and all the possible symptom attributes can constitute a candidate state attribute set. The service server 1000 can return the candidate state attribute set (that is, including the state attributes respectively indicated by the state attribute node 200b and the state attribute 200c) to the terminal device 100a.
[0109] Further, please refer to Figure 2b , Figure 2b is a scene schematic diagram provided by an embodiment of the present application. As shown in Figure 2bAs shown, the terminal device 100a can display the candidate state attribute set in the display interface. In the dialog box of the target application, the terminal device 100a can display the selection prompt information "Please select your symptom attribute", and simultaneously display the candidate state attribute "left abdominal pain" and the candidate state attribute "right abdominal pain". The user a can select the candidate state attribute. Meanwhile, the terminal device 100a can also display the confirmation control and the cancellation control. After the user a completes the selection of the candidate state attribute, the user a can enter the subsequent step by clicking the confirmation control. The user a can also cancel the selection of the candidate state attribute through the cancellation control, and enter the previous step or exit the target application. As shown in FIG. 6B, Figure 2b As shown, the candidate state attribute selected by the user a is "right abdominal pain". After the selection is completed and the confirmation control is clicked, the terminal device 100a can respond to the trigger operation, and obtain the symptom attribute (state attribute) "right abdominal pain". The terminal device 100a can take the state attribute "right abdominal pain" as the object state attribute presented by the target object under the category state "abdominal pain".
[0110] Further, as shown in FIG. 6C, Figure 2b As shown, the terminal device 100a can send the object state attribute "right abdominal pain" to the service server 1000. The service server 1000 can obtain, in the relationship graph 2000, the state attribute node corresponding to the object state attribute as the state attribute node 200c. Further, the service server 1000 can obtain the vector expression feature corresponding to the state attribute node 200c (the vector expression feature is also the node value corresponding to the state attribute node 200c in the relationship graph 2000, which can be calculated when the relationship graph 2000 is constructed), and obtain the vector expression feature corresponding to the target category state node 20d hit by the category state "abdominal pain" (that is, the node value corresponding to the target category state node 20d in the relationship graph 2000). Subsequently, the service server 1000 can update the relationship graph 2000 according to the vector expression feature of the node 200c and the vector expression feature of the node 20d.
[0111] It should be understood that, in the present application, the update of the relationship graph can be understood as updating the vector expression features of the nodes in the relationship graph. When the vector expression features of the nodes are updated, the vector expression feature corresponding to the state attribute node in the relationship graph can remain unchanged and need not be updated. That is, the vector expression feature of the state attribute node can be used to update the vector expression features of the category node and the category state node, but itself can remain unchanged. For ease of understanding, the specific method of updating the relationship graph will be described below. As shown in FIG. 6D, Figure 2bFor example, for the specific method of updating the relationship graph 2000, first, because in the relationship graph 2000, the category state node hit by the target object is the target category state node 20d, and in the state attribute node of the target category state node 20d, the state attribute node hit by the target object is the target state attribute node 200c (hereinafter referred to as the target state attribute node 200c). Then, in order to make the vector expression feature of the target category state node 20d more comprehensive, the current vector expression feature of the target category state node 20d can be aggregated (aggregation methods can include splicing, addition, subtraction, etc.) with the current vector expression feature of the target state attribute node 200c. The aggregated vector expression feature can be used as the new vector expression feature of the target category state node 20d (referred to as the aggregated vector expression feature). Optionally, in order to make the dimensions of the vector expression features of each node the same, after obtaining the aggregated vector expression feature, it can be subjected to max pooling processing, that is, the point with the maximum value in the local receptive field is taken. In this application, the vector expression feature is actually a matrix, so max pooling processing on the aggregated vector expression feature is to take the maximum value in the dimension of the matrix. For example, taking the following matrix A1 as the aggregated vector expression feature, the matrix A1 contains 3 dimensions, the first dimension contains the values m1, m2 and m3, the second dimension contains the values m4, m5 and m6, and the third dimension contains the values m7, m8 and m9.
[0112]
[0113] As shown in the above matrix A1, the max pooling processing method of the matrix A1 can be: selecting the maximum value (assuming m4) from the values m1, m4 and m7 in the first dimension, selecting the maximum value (assuming m8) from the values m2, m5 and m8 in the second dimension, and selecting the maximum value (assuming m3) from the values m3, m6 and m9 in the third dimension. According to the maximum value selected in each dimension, the aggregated vector expression feature after max pooling processing (referred to as the pooled vector expression feature) can be composed, which can be shown in the following matrix A2:
[0114] [m4m8m3] matrix A2
[0115] Wherein, the dimension of the matrix A2 is the same as that of the matrix A1 (both are 3 dimensions), but the length (1) of the matrix A2 is less than the length (3) of the matrix A1. That is, through the max pooling operation, the dimension of the vector expression feature remains unchanged, but the length is unitized.
[0116] It should be understood that, by expressing the aggregation of the features by the vector, the vector expression feature of the target category state node 20d can be made to have the vector expression feature of the state attribute node 200c, that is, the state attribute information of "left abdominal pain" has already existed in the aggregation vector expression feature.
[0117] Further, after obtaining the aggregation vector expression feature corresponding to the target category state node 20d hit by the target object, for each node in the relation graph 2000 (except for the state attribute node), the current vector expression feature of its adjacent node (the node having a connection relationship with the node, that is, the node having an association relationship) can be aggregated to obtain the new vector expression feature of each node. For example, taking the category node 22 as an example, in the relation graph 2000, because the target category state node 20d and the category state node 20e both have a connection relationship with the category node 22, the adjacent nodes of the category node 22 can include the target category state node 20d and the category state node 20e; then the category node 22 can be updated according to the current vector expression features of the target category state node 20d and the category state node 20e. Among them, the current vector expression feature of the target category state node 20d is the above-mentioned aggregation vector expression feature, and the current vector expression feature of the category state node 20e is the original vector expression feature (that is, the vector expression feature calculated when the relation graph 2000 is constructed, which has not been aggregated); then the aggregation vector expression feature of the target category state node 20d and the current vector expression feature of the category state node 20e can be aggregated (the aggregation mode can include splicing, addition, subtraction, etc.), thereby obtaining the updated vector expression feature (which can be called an updated vector expression feature) of the category node 22. Similarly, the updated vector expression feature of the category node 22 can also be subjected to max-pooling processing, so that the length of the updated vector expression feature of the category node 22 is 1, and the dimension is the same as that of the vector expression feature of each node.
[0118] Similarly, the update vector expression feature of each category node and category state node can be calculated by using the above method of calculating the update vector expression feature of category node 22. For example, taking category state node 20e as an example, the adjacent node of category state node 20e is category node 22, and the update vector expression feature of category state node 20e can be calculated from the current vector expression feature of category node 22 (i.e., the above update vector expression feature of category node 22). Since there is no other adjacent node, the update vector expression feature of category state node 20e can be the current update vector expression feature of category node 22. It should be understood that the application can set the number of calculation iterations of the relationship graph (which can be artificially specified or randomly generated by the business server 1000), and after the update vector expression feature of each category node and category state node in the relationship graph 2000 is calculated, this can be regarded as one iteration of the relationship graph 2000; the vector expression feature of each category node and category state node can be updated according to the current vector expression feature of each node. For example, after one iteration, the current vector expression feature of target category state node 20d can be obtained again, and the current vector expression feature of target category state node 20d is aggregated with the current vector expression feature of state attribute node 200c (which remains unchanged) to obtain a new aggregated vector expression feature; then, for category node 22, the current vector expression feature of target category state node 20d (i.e., the new aggregated vector expression feature) is aggregated with the current vector expression feature of category state node 20e (the updated vector expression feature calculated after one iteration) to obtain a new update vector expression feature of category node 22. After obtaining the new update vector expression feature of all category nodes and category state nodes, this can be regarded as the second iteration of the relationship graph 2000, and after the number of iterations reaches the preset number of iterations, the calculation and update of the relationship graph 2000 can be stopped, and the relationship graph in which the vector expression features of all nodes (category nodes and category state nodes) are updated after iteration is completed is called relationship graph 2000'. It should be understood that the relationship graph 2000' and the above relationship graph 2000 have the same nodes, but the node values (current vector expression features) of each category node and category state node are not consistent.
[0119] Further, the current vector representation features of each category node and category state node in the relationship graph 2000' can be obtained, and the vector representation features can be processed by vector transformation to convert into probability values. One implementation of processing the vector representation features by vector transformation to convert into probability values can be that the vector representation features can be processed by a logistic regression function (such as a softmax function) to convert into probability values (for example, the current updated vector representation features of the category node 22 can be processed by a softmax function to obtain the probability value corresponding to the category node 22). After obtaining the probability values of each category node and category state node, the maximum probability value can be selected. If the node corresponding to the maximum probability value is a category state node, the category state (i.e., the symptom) indicated by the category state node can be taken as the predicted category state (predicted symptom, i.e., other symptoms that the target object can also present under the current symptom “abdominal pain”), which can be used as the category state for the next inquiry of whether the target object exists; and if the node corresponding to the maximum probability value is a category node, the category (i.e., the disease category) indicated by the category node can be taken as the predicted category result of the target object.
[0120] For example, as shown in 2b, in the category nodes and category state nodes of the relationship graph 2000', the node with the maximum probability value is the category state node 20b, and the category state (symptom) indicated by the category state node 20b is “diarrhea”, which can be taken as the predicted category state. The business server 1000 can return the predicted category state to the terminal device 100a. Further, referring to Figure 2c , Figure 2c is a scenario schematic diagram provided by an embodiment of the present application. As shown in Figure 2c , the terminal device 100a can display the predicted category state “diarrhea” in the display interface. In the dialog box of the target application, the terminal device 100a can display the selection prompt information “Do you have the following symptoms?” and display the control corresponding to the predicted category state “diarrhea” and the “no” control. If the user a has the diarrhea symptom, the control corresponding to the predicted category state “diarrhea” can be clicked; and if the user a does not have the diarrhea symptom, the “no” control can be clicked. At the same time, the terminal device 100a can also display the confirm control and the cancel control. After the selection is completed, the user a can enter the subsequent step by clicking the confirm control. The user a can also cancel the selection by the cancel control and enter the previous step or exit the target application.
[0121] As shown in Figure 2cAs shown, after the user a clicks the control corresponding to the prediction category state "diarrhea" and clicks OK, the business server 1000 can determine that the prediction category state "diarrhea" is a symptom that the target object already has, and the prediction category state "diarrhea" can also be used as the object category state of the target object. Then, the business server 1000 can obtain, in the relationship graph 2000', the category state node (which is the category state node 20b) indicated by the category state "diarrhea"; further, the business server 1000 can continue to obtain all state attribute nodes having a connection relationship with the category state node 20b, and return the state attributes indicated by these state attribute nodes to the terminal device 100a. The terminal device 100a can take these state attributes as candidate state attributes, and form a candidate state attribute set. The terminal 100a can display the candidate state attribute set to the user a for selection, and return the candidate state attribute selected by the user a to the business server 1000. Further, the business server 1000 can obtain the current vector representation features of the category state nodes (including the category state node 20d and the category state node 20b) hit by the target object and the state attribute nodes (including the state attribute node 200c and one or more state attribute nodes of the category state node 20b selected by the user a) in the relationship graph 2000', and update the relationship graph 2000' to obtain a relationship graph 2000". Wherein, the specific manner of updating the relationship graph 2000' can refer to the specific manner of updating the relationship graph 2000 to obtain the relationship graph 2000' described above, which will not be described here in detail.
[0122] Further, the current vector expression features corresponding to the category nodes and the category state nodes in the relationship graph 2000" respectively can be processed by a logistic regression function for vector transformation to obtain probability values corresponding to the category nodes and the category state nodes respectively. Subsequently, the maximum probability value can be selected, and the node (such as the category node 21) corresponding to the maximum probability value can be obtained. The category information (disease category) indicated by the category node 21 can be taken as the predicted category result of the target object. Assuming that the category information indicated by the category node 21 is "appendicitis", the business server 1000 can return the predicted category result "appendicitis" to the terminal device 100a. The terminal device 100a can query doctors (such as doctors 1 and 2) associated with appendicitis according to the predicted category result "appendicitis". Subsequently, the terminal device 100a can generate recommendation information "doctors recommended for you: doctors 1 and 2" according to the doctors 1 and 2, and display the recommendation information "doctors recommended for you: doctors 1 and 2" in the display interface. The terminal device 100a can also display a confirmation control and a cancel control at the same time. It should be understood that the user a can go to the department of the doctors 1 or 2 after viewing the recommendation information to seek medical treatment.
[0123] Optionally, after determining the predicted category result of the target object, the business server 1000 can query doctors associated with the predicted category result and return the doctors associated with the predicted category result to the terminal device 100a, that is, the terminal device 100a can not need to query again.
[0124] Optionally, if the node corresponding to the maximum probability value in the probability values respectively corresponding to the category nodes and the category state nodes in the relationship graph 2000" is a category state node, the prediction number of the category state can be counted at this time, and if the prediction number of the category state reaches a prediction number threshold (which can be artificially specified or generated by the business server 1000), the maximum probability value can be directly obtained from the probability values corresponding to the category nodes at this time, and the category node corresponding to the maximum probability value is determined as the predicted category node, and the category information indicated by the predicted category node is determined as the predicted category result of the target object; and if the prediction number of the category state does not reach the prediction number threshold, the category state can be continued to be used as the predicted category state at this time, and the business server 1000 can return the predicted category state to the terminal device 100a, and the terminal device 100a can continue to display the predicted category state for the user a to select, and update the next round of relationship graph according to the selection result of the user a (if the selection result of the user a is that there is the predicted category state, the new predicted category state can be used as the new object category state, and the current relationship graph can be updated according to the nodes respectively corresponding to the existing object category state, object state attribute, and newly added object category state, object state attribute; if the selection result of the user a is that there is no predicted category state, the current relationship graph can be continued to be updated according to the existing object category state, object state attribute); until the predicted category result of the target object is determined.
[0125] Optionally, for each predicted category state, the terminal device 100a can generate a sentence simulating a doctor asking related symptoms, for example, for the predicted category state "diarrhea", the terminal device 100a can generate a sentence simulating a doctor asking "have you appeared diarrhea symptoms", and the terminal device 100a can display the sentence "have you appeared diarrhea symptoms" in the display interface of the dialogue box, and the user a can input his own answer (such as inputting "there are diarrhea symptoms") through voice, keyboard input, etc. That is, for each predicted category state, in addition to the way of letting the user a select, the terminal device 100a can also select the way of simulating a doctor conversation to determine the current symptoms of the user a.
[0126] It should be noted that the above examples of the relationship graph 2000, the relationship graph 2000', the relationship graph 2000", the category state "abdominal pain", the state attribute "left abdominal pain", "right abdominal pain", etc. are all examples for easy understanding and do not have actual reference significance.
[0127] It should be understood that the application can make the vector expression features of each category state (symptom) exist different state attributes by adding a state attribute node in the relationship graph, so that the connection between the category states and categories can be more comprehensive and rich, and the target object belonging to the category (such as the disease type) can be more accurately predicted by the current existing category state, so that the target associated object (such as the relevant doctor) can be accurately recommended according to the category of the target object.
[0128] Further, please refer to Figure 3 , Figure 3 is a flow diagram of a data processing method provided by an embodiment of the application. The data processing method can be executed by a business server (such as the business server 1000 in the above-mentioned Figure 1 embodiment), or by a terminal device (such as any terminal device in the terminal device cluster in the above-mentioned Figure 1 embodiment, such as the terminal device 100a), or by the business server and the terminal device together. For ease of understanding, the data processing method will be described below by taking the execution of the data processing method by the business server as an example. As shown in Figure 3 , the data processing method can at least include the following steps S101-S105:
[0129] Step S101, obtaining an object category state corresponding to a target object, and an object state attribute presented by the target object in the object category state.
[0130] In the application, the specific method for obtaining the object category state corresponding to the target object can be: obtaining the prediction auxiliary text information of the target object; then, extracting the state key text information in the prediction auxiliary text information for indicating the category state, and determining the category state indicated by the state key text information as the object category state; if the prediction auxiliary text information contains attribute key text information for describing the state key text information, the state attribute indicated by the attribute key text information can be determined as the object state attribute; and if the prediction auxiliary text information does not contain the attribute key text information, the object state attribute can be determined according to the object category state and the relationship graph.
[0131] In the method, the specific method for determining the object state attribute according to the object category state and the relationship graph can be as follows: if the prediction auxiliary text information does not contain attribute key text information, the target category state node indicated by the object category state can be obtained in the category state node of the relationship graph; then, the state attribute node having an association relationship with the target category state node in the relationship graph can be taken as a candidate state attribute node; then, the state attribute indicated by the candidate state attribute node can be determined as a candidate state attribute set, and the candidate state attribute set can be displayed to the target object; and the candidate state attribute selected by a selection operation of the target object on the candidate state attribute set can be determined as the object state attribute.
[0132] It can be understood that the target object can refer to a binding account of a target user using a terminal device to run a target application (such as a medical identification application, an entertainment application, a social application, a video application, etc.) in the target application. The target user can log in to the target application by using the binding account, and the business server can also determine whether the business user logs in, obtain relevant behavior data of the business user in the target application, etc. by using the binding account. When the target application is a medical identification application, the target user can input relevant symptom information in the medical identification application through the target object. The way in which the target user inputs the relevant symptom information can include: inputting text information in a keyboard typing manner, or inputting by voice or gesture non-contact operation. The relevant symptom information can refer to the symptom information presented by the target user, such as the text information “I have a fever and a little cough” input by the user. The text information “I have a fever and a little cough” can be referred to as the relevant symptom information. The business server can obtain the relevant symptom information through the target object. The business server can determine the relevant symptom information as prediction auxiliary text information corresponding to the target object.
[0133] The category state in the present application can be understood as the presented symptoms (when suffering from a certain disease, the possible presented physical reactions such as fever, nausea, diarrhea, cough, general weakness, abdominal pain, and other physical reactions can be referred to as symptoms), and the object category state can be understood as the presented symptoms of the target object, which can be obtained through the predicted auxiliary text information. For example, in the predicted auxiliary text information "I have a little fever and a little cough", the entity words for describing the symptoms include "fever" and "cough", and it can be determined that the entity words "fever" and "cough" are state key text information for describing the category state, and the symptoms (category state) indicated by the state key text information "fever" and "cough" are fever and cough, and the object category state of the target object can be determined through the predicted auxiliary text information to include "fever" and "cough". The state attribute in the present application can be understood as the presented symptom attribute of the target object when there is a certain symptom (for example, the part where the symptom is presented, the duration of the symptom, and the cause of the symptom can all be symptom attributes), and the symptom attribute can also be obtained through the predicted auxiliary text information. For example, in the predicted auxiliary text information "I have a headache for several months", the state key text information for describing the symptom (i.e., for indicating the category state) is "headache", and the symptom "headache" indicated by the state key text information "headache" can be determined as the object category state of the target object. In the predicted auxiliary text information "I have a headache for several months", the text information "for several months" is used to describe the symptom "headache", indicating that the duration of the symptom "headache" is "several months (i.e., long-term)", and the text information "for several months" can be determined as the attribute key text information, and the state attribute "long-term" indicated by the attribute key text information "for several months" can be determined as the object state attribute of the target object.
[0134] Optionally, it can be understood that in a feasible embodiment, if the attribute key text information does not exist in the prediction auxiliary text information of the target object, that is, the target user only inputs part of the symptoms presented by himself, but does not inform the relevant part, duration, cause and other information of the symptoms, and the object state attribute of the target object cannot be determined through the prediction auxiliary text information, at this time, the relationship graph can be obtained, and the object state attribute of the target object is determined through the relationship graph. The relationship graph can be constructed by the association relationship between the real disease type (such as the disease types of diabetes, gastritis, gastric ulcer, skin allergy, cold, etc., which can be referred to as real category information), real symptoms (real symptoms, that is, when suffering from a certain disease, the possible physical reactions, such as fever, nausea, diarrhea, cough, general weakness, abdominal pain, etc. The body reactions can be referred to as symptoms, and the real symptoms can be referred to as real category state), and real symptom attributes (attributes presented under a certain symptom, which can be referred to as real state attribute). In the relationship graph, there are category nodes corresponding to various real category information, category state nodes corresponding to various real category states, and state attribute nodes corresponding to various real state attributes. Different category nodes can be connected with different category state nodes. When there is a connection relationship between any two nodes, it can be indicated that the two nodes have an association relationship. One category state node can have one or more symptom attributes, and one category state node in the relationship graph can have a connection relationship (an association relationship) with one or more state attribute nodes. For the specific implementation manner of constructing the relationship graph, please refer to the description in the subsequent Figure 4 corresponding embodiments.
[0135] The specific method for determining the object state attribute of the target object through the relationship graph can be: in the relationship graph, the target category state node indicated by the object category state can be obtained; then, all state attribute nodes having a connection relationship with the target category state node can be obtained, and the state attributes indicated by these state attribute nodes can be taken as candidate state attributes, which can form a candidate state attribute set. The business server can send the candidate state attribute set to the terminal device corresponding to the target object, and the terminal device can display the candidate state attribute set, and the target user can select, so that the candidate state attribute selected by the target user can be taken as the object state attribute presented by the target object in the object category state. Optionally, after obtaining the candidate state attribute set, for each candidate state attribute, a method of simulating a doctor's inquiry can also be used to determine whether the target object has the candidate state attribute. For example, the candidate state attribute set includes the candidate state attribute “body temperature higher than 38 degrees”, the terminal device can generate the inquiry sentence “do you have a body temperature higher than 38 degrees” for the candidate state attribute “body temperature higher than 38 degrees”, and the terminal device can push the inquiry sentence “do you have a body temperature higher than 38 degrees” to the target object, and the target user can input the answer information through the target object, and whether the target object has the candidate state attribute can be determined through the answer information of the target user.
[0136] In step S102, the relationship graph is obtained; the relationship graph includes the association relationship among the category nodes, the category state nodes, and the state attribute nodes.
[0137] In this application, the relationship graph can be a multi-relationship graph, which can be constructed by the association relationship among the real disease types (which can be referred to as real category information), real symptoms (which can be referred to as real category states), and real symptom attributes (which can be referred to as real state attributes) in the sample data. In the relationship graph, there are category nodes corresponding to various real category information, category state nodes corresponding to various real category states, and state attribute nodes corresponding to various real state attributes. Different category nodes can be connected to different category state nodes. When there is a connection relationship between any two nodes, it means that the two nodes have an association relationship. A category state node can have one or more symptom attributes, and in the relationship graph, a category state node can have a connection relationship (association relationship) with one or more state attribute nodes. For the specific implementation of constructing the relationship graph, please refer to the description in the subsequent Figure 4
[0138] In step S103, the target category state node indicated by the object category state is determined in the category state node, and the target state attribute node indicated by the object state attribute is determined in the state attribute node having an association relationship with the target category state node.
[0139] In the present application, the target category state node indicated by the object category state can be determined in the category state node of the relationship graph. For example, the object category state is "abdominal pain", and in the relationship graph, node 1 is the node corresponding to the category state "abdominal pain", then the node 1 can be determined as the target category state node indicated by the object category state. Similarly, the target state attribute node indicated by the object state attribute can be determined in the state attribute node having an association relationship with the target category state node. For example, the target object presents the state attribute "right abdominal pain" under the object category state "abdominal pain", and in the relationship graph, the state attribute nodes having an association relationship with node 1 include node 11, node 12 and node 13, wherein node 13 is the node corresponding to the state attribute "right abdominal pain", then the node 13 can be determined as the target state attribute node indicated by the object state attribute "right abdominal pain".
[0140] In step S104, the relationship graph is updated according to the vector representation features corresponding to the target category state node and the target state attribute node, to obtain a target relationship graph.
[0141] In the present application, as known from the above, the relationship graph can be constructed by the real category information, the real category state and the real state attribute. In addition to constructing each node and connecting the nodes having an association relationship when constructing the relationship graph, the node values of each node are also generated. In the present application, the node value of the category node can be the vector representation feature corresponding to its real category information, the node value of the category state node can be the vector representation feature corresponding to the real category state, and the node value of the state attribute node can be the vector representation feature corresponding to the real state attribute. The present application can calculate and determine the vector representation features corresponding to the real category information, the vector representation features corresponding to the real category state, and the vector representation features corresponding to the real state attribute, and take each vector representation feature corresponding to the real category information as the vector representation feature (i.e. the node value) of its corresponding node; take each vector representation feature corresponding to the real category state as the vector representation feature (i.e. the node value) of its corresponding node; and take each vector representation feature corresponding to the real state attribute as the vector representation feature (i.e. the node value) of its corresponding node. Thus, the relationship graph containing the category node, the category state node, the state attribute node, the connection edge, and the node value of each node can be obtained. For the specific implementation of calculating and determining the vector representation features corresponding to the real category information, the real category state and the real state attribute, please refer to the description of the corresponding embodiments below. Figure 4
[0142] Further, the node value corresponding to the target category state node in the relationship graph (i.e., the vector expression feature) and the node value corresponding to the target state attribute node (i.e., the vector expression feature) can be obtained, and the entire relationship graph can be updated according to the vector expression features corresponding to the target category state node and the target state attribute node respectively (in fact, the node values of each category node and category state node in the relationship graph are updated), to obtain a target relationship graph. Taking a category node containing category node M i , a category state node containing category state node M j , a target category state node being an adjacent node of category node M i , and the adjacent node of category node M i containing category state node M j (i, j are positive integers) as an example, the specific method for updating the relationship graph to obtain the target relationship graph can be: the vector expression features corresponding to the target category state node, the target state attribute node, and category state node M j are obtained; then, the vector expression feature corresponding to the target category state node is aggregated with the vector expression feature corresponding to the target state attribute node to obtain the aggregated vector expression feature corresponding to the target category state node; then, the aggregated vector expression feature corresponding to the target category state node is aggregated with the vector expression feature corresponding to category state node M j to obtain the intermediate vector expression feature corresponding to category node M i ; when the intermediate vector expression feature corresponding to each category node and the intermediate vector expression feature corresponding to each category state node are determined, the relationship graph containing the intermediate vector expression feature corresponding to each category node, the intermediate vector expression feature corresponding to each category state node, and the vector expression feature corresponding to each state attribute node is determined as an intermediate relationship graph; then, the target relationship graph can be generated according to the intermediate relationship graph.
[0143] In the foregoing method of aggregating the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain the aggregated vector representation feature corresponding to the target category state node, the specific method can be that the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node can be spliced to obtain a spliced vector representation feature, and then the maximum value on each dimension in the spliced vector representation feature can be obtained, and the vector representation feature composed of the maximum value on each dimension can be determined as the aggregated vector representation feature. In the foregoing method of obtaining the maximum value on each dimension in the spliced vector representation feature, in fact, the maximum pooling processing is performed on the spliced vector representation feature. For example, the spliced vector representation feature is shown in the foregoing matrix A1, and the result obtained by taking the maximum value on each dimension in the spliced vector representation feature can be shown in the matrix A2, and the matrix A2 can be determined as the aggregated vector representation feature.
[0144] Optionally, in the foregoing method of aggregating the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain the aggregated vector representation feature corresponding to the target category state node, the specific method can also be that the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node can be subjected to operation processing to obtain an operation vector representation feature, and the maximum value on each dimension in the operation vector representation feature can be obtained, and the vector representation feature composed of the maximum value on each dimension can be determined as the aggregated vector representation feature. In the operation processing, the matrix operation processing such as subtraction, addition, multiplication and the like can be included.
[0145] Further, in the foregoing method of generating the target relationship graph according to the intermediate relationship graph, the specific method can be that the number of iterations corresponding to the intermediate relationship graph can be obtained, and if the number of iterations satisfies an iteration stop condition, the intermediate relationship graph can be determined as the target relationship graph, and the intermediate vector representation feature corresponding to the update node can be determined as the update vector representation feature, wherein the update node can include the category node and the category state node, and if the number of iterations does not satisfy the iteration stop condition, the intermediate relationship graph can be updated according to the intermediate vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain the target relationship graph.
[0146] It should be understood that after obtaining the vector representation features corresponding to the target category state node and the target state attribute node respectively, the vector representation features of the target category state node and the vector representation features of the target state attribute node can be aggregated. The aggregated vector representation features can be used as the new vector representation features of the target category state node. Because after aggregating the vector representation features, the aggregated vector representation features will include the vector representation features of the state attributes, so the new vector representation features of the target category state node will also include these relationships, making the vector representation features of the target category state node richer and more comprehensive. For ease of understanding, please refer to the following formula (1). Formula (1) is the specific way to aggregate the vector representation features of the category state node and the vector representation features of the state attribute node to obtain the aggregated vector representation features of the category state node:
[0147] e i ′=[v i Formula (1)
[0148] Among them, e as shown in formula (1) i ′ can be used to characterize the aggregated vector representation features of category state nodes; as shown in formula (1) e i This can be used to characterize the current vector representation features of the state nodes of this category; as shown in formula (1), v i It can be used to characterize the current vector expression features of a state attribute node that is associated with the state node of this category; as shown in formula (1), w can be used to characterize the calculation parameters (the parameters used when updating the relationship graph, which can also be called model parameters. If the relationship graph can be understood as a model, then the parameters here can be the parameters of the model, which can be in matrix form).
[0149] Understandably, if the aforementioned target category state node has multiple target state attribute nodes, for example, if the target category state node has target state attribute node 1 and target state attribute node 2, then the vector expression feature corresponding to the target category state node can be aggregated with the vector expression feature corresponding to the target state attribute node 1 to obtain initial aggregated vector expression feature 1; subsequently, the vector expression feature corresponding to the target category state node can be aggregated with the vector expression feature corresponding to the target state attribute node 2 to obtain initial aggregated vector expression feature 2; subsequently, the initial aggregated vector expression feature 1 and the initial aggregated vector expression feature 2 can be aggregated (such as by addition, concatenation, subtraction, etc.) to obtain the final aggregated vector expression feature of the target category state node.
[0150] Further, after each target category state node obtains the aggregated vector representation feature, the vector representation features of the adjacent nodes of each category node and category state node in the relation graph can be aggregated, so that the new vector representation features corresponding to each category node or each category state node are obtained. When the calculation and update of all category nodes and category state nodes in the relation graph are completed, it is determined that the relation graph completes an iteration and obtains an intermediate relation graph. At this time, it can be determined whether the intermediate relation graph meets the iteration stopping condition (whether the iteration stopping condition is met can refer to whether the iteration number reaches the iteration number threshold). If the intermediate relation graph meets the iteration stopping condition (i.e., the current iteration number reaches the iteration number threshold), the intermediate relation graph is determined as the target relation graph. If the intermediate relation graph does not meet the iteration stopping condition (i.e., the current iteration number does not reach the iteration number threshold), the node values (i.e., the current vector representation features after calculation and update) of the target category state nodes in the intermediate relation graph and the node values (i.e., the initial vector representation features, which remain unchanged during the update of the relation graph) of the target state attribute nodes in the intermediate relation graph are obtained. Then, the vector representation features of each category node and category state node are calculated and updated by using the above-mentioned node update method. After the calculation and update of the vector representation features of all category nodes and category state nodes are completed, it is determined that another iteration is completed, and a new intermediate relation graph is obtained. At this time, it can be determined whether the new intermediate relation graph meets the iteration stopping condition, and the target relation graph is obtained when the iteration stopping condition is met.
[0151] To facilitate understanding of the specific method of obtaining the vector representation features of each category node and category state node by aggregating the vectors of adjacent nodes, please refer to formula (2), which is a specific implementation of aggregating the vector representation features of adjacent nodes to obtain the vector representation of the current node:
[0152]
[0153] In formula (2), E (+1)The vector representation feature can be used to represent a certain category node or category state node of the current calculation; A can be used to represent a relationship matrix that can be used to store the relationship between symptoms (i.e., category states) and diseases (i.e., category information); I can be a self-loop form of the matrix A, and D can be a regularization term of the matrix A, wherein the sizes of the matrices D, A, and I can all be N*N (i.e., the number of category nodes and category state nodes x the number of category nodes and category state nodes); E' can be an aggregated vector representation feature of the category state node combined with the state attribute; w' can be a model parameter (which can be a matrix with dimensions consistent with the dimensions of the vector representation features of each node), which can be learned through gradient update. It should be understood that the implementation corresponding to formula (2) is that, for each current node (except the state attribute node) in the relationship graph, the current vector representation of its adjacent nodes can be aggregated to obtain.
[0154] In step S105, a predicted category node is obtained in the category nodes of the target relationship graph according to the updated vector representation feature corresponding to each category node in the target relationship graph, and the category information indicated by the predicted category node is determined as the predicted category result of the target object.
[0155] In this application, after the target relationship graph is determined, a predicted category node can be obtained in the category nodes of the target relationship graph according to the updated vector representation feature corresponding to each category node in the target relationship graph. For example, the category nodes include category nodes M i (i is a positive integer), and the specific method can be: the updated vector representation feature corresponding to each category node in the target relationship graph and the updated vector representation feature corresponding to each category state node can be obtained; the updated vector representation feature of the category node M i can be input into a linear layer, and the updated vector representation feature of the category node M i can be processed by vector transformation through a logistic regression function in the linear layer to obtain the prediction probability corresponding to the category node M i Subsequently, the predicted category node can be determined according to the prediction probability corresponding to each category node in the target relationship graph and the prediction probability corresponding to each category state node.
[0156] The specific method for determining the predicted category node according to the prediction number corresponding to the predicted category state can be: if the prediction number satisfies a prediction stop condition, the maximum prediction probability in the prediction probability corresponding to each category node is determined as a target prediction probability, and the category node corresponding to the target prediction probability is determined as the predicted category node; and if the prediction number does not satisfy the prediction stop condition, a prediction category state node indicated by the predicted category state is obtained in the target relation graph, the target relation graph is updated according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and the predicted category node is obtained in the updated target relation graph.
[0157] The specific method for determining the predicted category node according to the prediction number corresponding to the predicted category state can be: if the prediction number satisfies a prediction stop condition, the maximum prediction probability in the prediction probability corresponding to each category node is determined as a target prediction probability, and the category node corresponding to the target prediction probability is determined as the predicted category node; and if the prediction number does not satisfy the prediction stop condition, a prediction category state node indicated by the predicted category state is obtained in the target relation graph, the target relation graph is updated according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and the predicted category node is obtained in the updated target relation graph.
[0158] It should be understood that after the target relation graph is determined, the current vector expression features corresponding to each category node and category state node in the target relation graph (i.e., updated vector expression features) can be obtained. At this time, for each vector expression feature, a vector transformation process can be performed thereon by using a logistic regression function (such as a softmax function), and the logistic regression function can be used to convert the vector expression feature into a probability value (i.e., a predicted probability). Subsequently, the maximum probability value (i.e., the maximum predicted probability) can be selected from the probability values. If the node corresponding to the maximum probability value is a category node, the category node can be determined as a predicted category node, and the category information indicated by the predicted category node can be determined as the predicted category result of the target object. If the node corresponding to the maximum probability value is a category state node, the prediction times of the category state can be counted at this time. If the prediction times have reached a prediction times threshold (i.e., a prediction stop condition is met), it can be indicated that the category state (symptom) has been predicted enough, i.e., the symptoms that the target object can present in the relation graph have been predicted enough (the category state nodes hit by the target object in the target relation graph are enough, and the category of the target object can be predicted), so the maximum probability value can be directly obtained from the probability values corresponding to the category nodes at this time, and the category node corresponding to the maximum probability value can be taken as the predicted category node. The category information indicated by the predicted category node can be determined as the predicted category result of the target object.
[0159] If the number of times of predicting the category state does not reach the threshold of the number of times of prediction (i.e., the prediction stopping condition is not met) after the number of times of predicting the category state, a category state detection text corresponding to the predicted category state can be generated and pushed to the target object. If the target object confirms the existence of the predicted category state (i.e., confirms the existence of the predicted symptom), the predicted category state can be determined as the target category state, the predicted category state node can be determined as the target category state node, and the target relationship graph can be updated according to the updated vector representation feature corresponding to the predicted category state node, the updated vector representation feature corresponding to the target category state node, and the vector representation feature corresponding to the target state attribute node, and the predicted category node can be obtained in the updated target relationship graph in the above manner. If the target object confirms the absence of the predicted category state, the target relationship graph can be updated according to the updated vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node, and the predicted category node can be obtained in the updated target relationship graph in the above manner. The specific method can be as follows: the updated vector representation feature corresponding to the predicted category state node can be input into a neural network model (which can be any model capable of generating text, such as a long short-term memory (LSTM) model); the category state detection text corresponding to the predicted category state can be generated through the neural network model and the updated vector representation feature corresponding to the predicted category state node; then, the category state detection text can be pushed to the target object; then, the category state confirmation result returned by the target object for the category state detection text can be received; if the category state confirmation result is the category state existing result, the target relationship graph can be updated according to the updated vector representation feature corresponding to the predicted category state node, the updated vector representation feature corresponding to the target category state node, and the vector representation feature corresponding to the target state attribute node, and the predicted category node can be obtained in the updated target relationship graph; if the category state confirmation result is the category state missing result, the target relationship graph can be updated according to the updated vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node, and the predicted category node can be obtained in the updated target relationship graph.
[0160] For example, as described above Figure 2a - Figure 2bAs shown in the corresponding scenario embodiment, after determining the predicted category state "diarrhea", the category state detection text "Have you had diarrhea recently" for the predicted category state "diarrhea" can be generated, and the terminal device 100a can display the category state detection text "Have you had diarrhea recently", and the user a can input an answer text through the target object, which can be used as the category state existence result. If the answer text is "had diarrhea", it can be indicated that the category state confirmation result is the category state existence result. Further, in the relationship graph 2000', the entire relationship graph can be updated according to the current vector expression feature of the category state node 20b (the node corresponding to the predicted category state "diarrhea"), the current vector expression feature of the category state node 20d (the existing target category state node), and the current vector expression feature of the state attribute node 200c, and the predicted category node can be obtained in the updated relationship graph.
[0161] In the embodiments of the present application, in the process of category prediction of the target object, in addition to obtaining the object category state of the target object, the object state attribute presented by the target object in the object category state is also obtained. Subsequently, in the relationship graph, the target category state node indicated by the object category state and the target state attribute node indicated by the object state attribute can be obtained. According to the vector expression features corresponding to the target category state node and the target state attribute node respectively, the relationship graph can be updated to obtain a target relationship graph. Subsequently, according to the updated vector expression features corresponding to each category node in the target relationship graph respectively, a predicted category node can be obtained in the target relationship graph, and the category information indicated by the predicted category node can be determined as the predicted category result of the target object. That is, in the process of category prediction of the target object, in addition to considering the category state, the state attribute possessed by the target object in a certain category state is also considered. Since the correlation between the category, the category state and the state attribute is considered in multiple aspects, the accuracy of the category prediction result can be more accurately improved, and the target associated object associated with the category prediction result can be more accurately recommended to the target object. In summary, the present application can improve the prediction (recognition) accuracy of the object category and improve the recommendation accuracy of the associated object.
[0162] Further, please refer to Figure 4 , Figure 4 is a flow diagram of a data processing method provided by an embodiment of the present application. The flow can correspond to the flow of constructing a relationship graph in the above-mentioned Figure 3 embodiments. As shown in Figure 4 , the flow can at least include the following steps S401-S404:
[0163] In step S401, real category information, a real category state, and a real state attribute of a sample object are obtained.
[0164] Specifically, the sample object can refer to an object with a real symptom, a real symptom attribute, and a real disease type.
[0165] In step S402, the real category information is taken as a category node, the real category state is taken as a category state node, and the real state attribute is taken as a state attribute node.
[0166] Specifically, a category node corresponding to each real category information, a category state node corresponding to each real category state, and a state attribute node corresponding to each real state attribute can be constructed.
[0167] In step S403, an association edge is constructed between the category node, the category state node, and the state attribute node according to an association relationship between the real category information, the real category state, and the real state attribute.
[0168] Specifically, an association edge can be constructed between the category node, the category state node, and the state attribute node according to an association relationship between the real category information, the real category state, and the real state attribute. For example, the real category information is “appendicitis”, the symptom (real category state) associated with the real category information is “abdominal pain”, and the real state attribute associated with the real category state is “right abdominal pain” and “sudden sharp pain”. An association edge can be constructed between the category node corresponding to “appendicitis” and the category state node corresponding to “abdominal pain”, so that a connection relationship is formed, thereby enabling an association relationship between the two nodes. Similarly, an association edge can be constructed between the category state node corresponding to “abdominal pain” and the state attribute node corresponding to “right abdominal pain”, and an association edge can be constructed between the category state node corresponding to “abdominal pain” and the state attribute node corresponding to “sudden sharp pain”.
[0169] It should be noted that the above state attribute can include a part attribute, a duration attribute, a symptom cause attribute, and the like, and can also include other attributes for representing a symptom reaction (such as a symptom occurrence time, a symptom occurrence frequency, and the like).
[0170] In step S404, a relationship graph is constructed according to the category node, the category state node, the state attribute node, and the association edge.
[0171] Specifically, the sample category text information indicating the real category information, the sample state text information indicating the real category state, and the sample attribute text information indicating the real state attribute can be input into an encoder; the encoder outputs the vector expression feature corresponding to the real category information, and the vector expression feature corresponding to the real category information is determined as the vector expression feature corresponding to the category node; the encoder outputs the vector expression feature corresponding to the real category state, and the vector expression feature corresponding to the real category state is determined as the vector expression feature corresponding to the category state node; the encoder outputs the vector expression feature corresponding to the real state attribute, and the vector expression feature corresponding to the real state attribute is determined as the vector expression feature corresponding to the state attribute node; and the relational graph is constructed according to the association edge and the vector expression features corresponding to the category node, the category state node, and the state attribute node. It should be understood that the vector expression feature of each node can be understood as the node value corresponding thereto, and the graph including the association edge, each node, and the node value of each node can be determined as the relational graph.
[0172] For ease of understanding, please refer to Figure 5 , Figure 5 is a schematic diagram of outputting a vector expression feature provided by an embodiment of the present application. As shown in Figure 5 , taking the real category state "abdominal pain" as an example, the sample state text information indicating the real category state "abdominal pain" is the sample state text information 500 as shown in Figure 5 , which is "I have a little abdominal pain". The sample state text information is input into an encoder (which can be implemented by an LSTM), and the vector expression feature 5000 corresponding to the sample state text information 500 can be output by the encoder, which can include the vector expression feature corresponding to each word text, i.e., the vector expression feature corresponding to the text word "I", the vector expression feature corresponding to the text word "have", the vector expression feature corresponding to the text word "a little", the vector expression feature corresponding to the text word "abdominal", the vector expression feature corresponding to the text word "pain". Further, the vector expression features of the text words representing the symptoms can be extracted, i.e., the vector expression feature corresponding to the text word "abdominal", the vector expression feature corresponding to the text word "pain", and the vector expression feature corresponding to the text word "abdominal", the vector expression feature corresponding to the text word "pain", and the vector expression feature corresponding to the text word "abdominal" can be determined as the vector expression feature 50000 corresponding to the real category state "abdominal pain".
[0173] In the embodiment of the present application, in the process of predicting the category of the target object, in addition to obtaining the object category state of the target object, the object state attribute presented by the target object in the object category state is also obtained; then, in the relationship graph, the target category state node indicated by the object category state and the target state attribute node indicated by the object state attribute are obtained; according to the vector expression features corresponding to the target category state node and the target state attribute node respectively, the relationship graph is updated to obtain a target relationship graph; then, according to the updated vector expression features corresponding to each category node in the target relationship graph, a prediction category node is obtained in the target relationship graph, and the category information indicated by the prediction category node can be determined as the prediction category result of the target object. That is, in the process of predicting the category of the target object, in addition to considering the category state, the state attribute possessed by the target object in a certain category state is also considered. Since the correlation between the category, the category state and the state attribute is considered in multiple aspects, the accuracy of the category prediction result can be more accurately improved, and the target associated object associated with the category prediction result can be more accurately recommended to the target object. In summary, the prediction (recognition) accuracy of the object category can be improved, and the recommendation accuracy of the associated object can be improved.
[0174] Further, please refer to Figure 6 , Figure 6 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application. The data processing apparatus can be a computer program (including program code) running in a computer device, for example, the data processing apparatus is an application software; the data processing apparatus can be used to execute the method shown in Figure 3 . As shown in Figure 6 , the data processing apparatus 1 can include a data acquisition module 11, a graph acquisition module 12, a node determination module 13, a graph updating module 14 and a category prediction module 15.
[0175] The data acquisition module 11 is configured to acquire an object category state corresponding to a target object and an object state attribute presented by the target object in the object category state.
[0176] The graph acquisition module 12 is configured to acquire a relationship graph; the relationship graph includes the correlation between the category nodes, the category state nodes and the state attribute nodes.
[0177] The node determination module 13 is configured to determine, in the category state nodes, a target category state node indicated by the object category state, and in the state attribute nodes having a correlation with the target category state node, determine a target state attribute node indicated by the object state attribute.
[0178] The graph updating module 14 is configured to update the relation graph according to the vector representation features corresponding to the target category state node and the target state attribute node, to obtain a target relation graph.
[0179] The category prediction module 15 is configured to obtain a predicted category node in the category nodes of the target relation graph according to the vector representation features corresponding to each category node in the target relation graph.
[0180] The category prediction module 15 is further configured to determine the category information indicated by the predicted category node as a predicted category result of the target object.
[0181] The specific implementation of the data obtaining module 11, the graph obtaining module 12, the node determining module 13, the graph updating module 14, and the category prediction module 15 can refer to the descriptions of steps S101-S105 in the above Figure 3 The specific implementation of the data obtaining module 11, the graph obtaining module 12, the node determining module 13, the graph updating module 14, and the category prediction module 15 can refer to the descriptions of steps S101-S105 in the above
[0182] In an embodiment, the data obtaining module 11 can include an auxiliary information obtaining unit 111, an information extracting unit 112, and a state attribute determining unit 113.
[0183] The auxiliary information obtaining unit 111 is configured to obtain predicted auxiliary text information of the target object.
[0184] The information extracting unit 112 is configured to extract state key text information in the predicted auxiliary text information for indicating a category state, and determine the category state indicated by the state key text information as an object category state.
[0185] The state attribute determining unit 113 is configured to, if the predicted auxiliary text information contains attribute key text information for describing the state key text information, determine the state attribute indicated by the attribute key text information as an object state attribute.
[0186] The state attribute determining unit 113 is further configured to, if the predicted auxiliary text information does not contain the attribute key text information, determine the object state attribute according to the object category state and the relation graph.
[0187] The specific implementation of the auxiliary information obtaining unit 111, the information extracting unit 112, and the state attribute determining unit 113 can refer to the description of step S101 in the above Figure 3 The specific implementation of the auxiliary information obtaining unit 111, the information extracting unit 112, and the state attribute determining unit 113 can refer to the description of step S101 in the above
[0188] In an embodiment, the state attribute determining unit 113 is further configured to, if the predicted auxiliary text information does not contain the attribute key text information, obtain a target category state node indicated by the object category state in the category state nodes of the relation graph.
[0189] The state attribute determination unit 113 is also specifically configured to, in the relationship graph, take the state attribute nodes having the association relationship with the target category state node as candidate state attribute nodes.
[0190] The state attribute determination unit 113 is also specifically configured to determine the state attribute indicated by the candidate state attribute nodes as a candidate state attribute set, and show the candidate state attribute set to the target object.
[0191] The state attribute determination unit 113 is also specifically configured to, in response to a selection operation of the target object on the candidate state attribute set, determine the candidate state attribute selected by the selection operation as the object state attribute.
[0192] In one embodiment, the category node includes a category node M i , the category state node includes a category state node M j , the target category state node is an adjacent node of the category node M i , the adjacent node of the category node M i also includes a category state node M j , i and j are positive integers.
[0193] The graph updating module 14 can include a vector feature acquisition unit 141, a vector aggregation unit 142, and a graph determination unit 143.
[0194] The vector feature acquisition unit 141 is configured to acquire the vector expression features corresponding to the target category state node, the target state attribute node, and the category state node M j , respectively.
[0195] The vector aggregation unit 142 is configured to aggregate the vector expression features corresponding to the target category state node and the vector expression features corresponding to the target state attribute node to obtain the aggregated vector expression features corresponding to the target category state node.
[0196] The vector aggregation unit 142 is also configured to aggregate the aggregated vector expression features corresponding to the target category state node and the vector expression features corresponding to the category state node M j to obtain the intermediate vector expression features corresponding to the category node M i .
[0197] The graph determination unit 143 is configured to, when the intermediate vector expression features corresponding to each category node and the intermediate vector expression features corresponding to each category state node are determined, determine a relationship graph including the intermediate vector expression features corresponding to each category node, the intermediate vector expression features corresponding to each category state node, and the vector expression features corresponding to each state attribute node as an intermediate relationship graph.
[0198] The graph determination unit 143 is further configured to generate the target relation graph according to the intermediate relation graph.
[0199] The specific implementation of the vector feature obtaining unit 141, the vector aggregation unit 142, and the graph determination unit 143 can refer to the descriptions of the corresponding steps S101, S102, and S103 in the above Figure 3 The description of step S104 in the corresponding embodiment will not be repeated here.
[0200] In one embodiment, the vector aggregation unit 142 is further configured to concatenate the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain a concatenated vector representation feature.
[0201] The vector aggregation unit 142 is further configured to obtain the maximum value on each dimension of the concatenated vector representation feature, and determine a vector representation feature composed of the maximum value on each dimension as the aggregated vector representation feature.
[0202] In one embodiment, the vector aggregation unit 142 is further configured to perform operation processing on the vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain an operation vector representation feature.
[0203] The vector aggregation unit 142 is further configured to obtain the maximum value on each dimension of the operation vector representation feature, and determine a vector representation feature composed of the maximum value on each dimension as the aggregated vector representation feature.
[0204] In one embodiment, the graph determination unit 142 is further configured to obtain the number of iterations corresponding to the intermediate relation graph.
[0205] The graph determination unit 142 is further configured to, if the number of iterations satisfies an iteration stopping condition, determine the intermediate relation graph as the target relation graph, and determine the intermediate vector representation feature corresponding to the update node as the update vector representation feature. The update node includes a category node and a category state node.
[0206] The graph determination unit 142 is further configured to, if the number of iterations does not satisfy the iteration stopping condition, update the intermediate relation graph according to the intermediate vector representation feature corresponding to the target category state node and the vector representation feature corresponding to the target state attribute node to obtain the target relation graph.
[0207] In one embodiment, the category node includes a category node M i i is a positive integer.
[0208] The category prediction module 15 can include an update vector feature obtaining unit 151, a vector transformation unit 152, and a category node determination unit 153.
[0209] The update vector feature acquisition unit 151 is configured to acquire an update vector expression feature corresponding to each category node in the target relation graph and an update vector expression feature corresponding to each category state node.
[0210] The vector transformation unit 152 is configured to input the update vector expression feature of the category node M i to a linear layer, and perform vector transformation processing on the update vector expression feature of the category node M i by using a logistic regression function in the linear layer to obtain a predicted probability corresponding to the category node M i .
[0211] The category node determination unit 153 is configured to determine a predicted category node according to the predicted probability corresponding to each category node in the target relation graph and the predicted probability corresponding to each category state node.
[0212] The specific implementation of the update vector feature acquisition unit 151, the vector transformation unit 152, and the category node determination unit 153 can refer to the description of step S105 in the above-mentioned corresponding embodiments, and will not be described here in detail. Figure 3
[0213] In one embodiment, the category node determination unit 153 can include a probability acquisition subunit 1531 and a first category node determination subunit 1532.
[0214] The probability acquisition subunit 1531 is configured to acquire a maximum predicted probability from the predicted probability corresponding to each category node and the predicted probability corresponding to each category state node, and determine the acquired maximum predicted probability as an initial predicted probability.
[0215] The first category node determination subunit 1532 is configured to determine the node corresponding to the initial predicted probability as the predicted category node if the node corresponding to the initial predicted probability belongs to the category node.
[0216] The first category node determination subunit 1532 is further configured to determine the category state indicated by the node corresponding to the initial predicted probability as the predicted category state if the node corresponding to the initial predicted probability belongs to the category state node.
[0217] The first category node determination subunit 1532 is further configured to determine the predicted category node according to the predicted number of times corresponding to the predicted category state.
[0218] The specific implementation of the probability acquisition subunit 1531 and the first category node determination subunit 1532 can refer to the description of step S105 in the above-mentioned corresponding embodiments, and will not be described here in detail. Figure 3
[0219] In an embodiment, the first category node determining subunit 1532 is further specifically configured to: if the prediction number satisfies the prediction stop condition, determine the maximum prediction probability in the prediction probability corresponding to each category node as a target prediction probability, and determine the category node corresponding to the target prediction probability as a prediction category node;
[0220] The first category node determining subunit 1532 is further specifically configured to: if the prediction number does not satisfy the prediction stop condition, obtain a prediction category state node indicated by the prediction category state in the target relation graph, update the target relation graph according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and obtain the prediction category node in the updated target relation graph.
[0221] In an embodiment, the category node determining unit 153 can further include a text pushing subunit 1533, a step executing subunit 1534, and a second category node determining subunit 1535.
[0222] The text pushing subunit 1533 is configured to input the update vector expression feature corresponding to the prediction category state node into a neural network model.
[0223] The text pushing subunit 1533 is further configured to generate a category state detection text for the prediction category state by the neural network model and the update vector expression feature corresponding to the prediction category state node, and push the category state detection text to a target object.
[0224] The text pushing subunit 1533 is further configured to receive a category state confirmation result returned by the target object for the category state detection text.
[0225] The step executing subunit 1534 is configured to: if the category state confirmation result is a category state existing result, execute a step of updating the target relation graph according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and obtaining the prediction category node in the updated target relation graph.
[0226] The second category node determining subunit 1535 is configured to: if the category state confirmation result is a category state missing result, update the target relation graph according to the update vector expression feature corresponding to the target category state node and the vector expression feature corresponding to the target state attribute node, and obtain the prediction category node in the updated target relation graph.
[0227] The specific implementation of the text pushing sub-unit 1533, the step executing sub-unit 1534, and the second category node determining sub-unit 1535 can be referred to the description of the corresponding embodiments above. Figure 3 The description of step S105 in the corresponding embodiments will not be repeated here.
[0228] In an embodiment, the data processing apparatus 1 can further include a node construction module 16 and a graph construction module 17.
[0229] The node construction module 16 is configured to obtain real category information, a real category state, and real state attributes of a sample object in the real category state.
[0230] The node construction module 16 is further configured to take the real category information as a category node, take the real category state as a category state node, and take the real state attributes as state attribute nodes.
[0231] The graph construction module 17 is configured to construct an association edge between the category node, the category state node, and the state attribute node according to an association relationship between the real category information, the real category state, and the real state attributes.
[0232] The graph construction module 17 is further configured to construct a relationship graph according to the category node, the category state node, the state attribute node, and the association edge.
[0233] The specific implementation of the node construction module 16 and the graph construction module 17 can be referred to the description of the corresponding embodiments above. Figure 4 The description of steps S401-S404 in the corresponding embodiments will not be repeated here.
[0234] In an embodiment, the graph construction module 17 can include an information input unit 171, a vector feature determining unit 172, and a graph construction unit 173.
[0235] The information input unit 171 is configured to input sample category text information indicating real category information, sample state text information indicating a real category state, and sample attribute text information indicating real state attributes to an encoder.
[0236] The vector feature determining unit 172 is configured to output a vector expression feature corresponding to the real category information by the encoder and the sample category text information, and determine the vector expression feature corresponding to the real category information as a vector expression feature corresponding to the category node.
[0237] The vector feature determining unit 172 is further configured to output a vector expression feature corresponding to the real category state by the encoder and the sample state text information, and determine the vector expression feature corresponding to the real category state as a vector expression feature corresponding to the category state node.
[0238] The vector feature determination unit 172 is further configured to output the vector expression feature corresponding to the real state attribute by encoding the sample attribute text information, and determine the vector expression feature corresponding to the real state attribute as the vector expression feature corresponding to the state attribute node.
[0239] The graph construction unit 173 is configured to construct a relationship graph according to the association edges and the vector expression features corresponding to the category nodes, the category state nodes and the state attribute nodes respectively.
[0240] The specific implementation of the information input unit 171, the vector feature determination unit 172 and the graph construction unit 173 can refer to the description of step S404 in the above-mentioned Figure 4 embodiment, which will not be described here in detail.
[0241] In the embodiment of the present application, in the process of predicting the category of the target object, in addition to obtaining the object category state of the target object, the object state attribute presented by the target object in the object category state is also obtained; then, in the relationship graph, the target category state node indicated by the object category state and the target state attribute node indicated by the object state attribute are obtained; according to the vector expression features corresponding to the target category state node and the target state attribute node respectively, the relationship graph is updated to obtain a target relationship graph; then, according to the updated vector expression features corresponding to each category node in the target relationship graph respectively, a prediction category node is obtained in the target relationship graph, and the category information indicated by the prediction category node can be determined as the prediction category result of the target object. That is, in the process of predicting the category of the target object in the present application, in addition to considering the category state, the state attribute possessed by the target object in a certain category state is also considered. Since the multi-aspect association relationship among the category, the category state and the state attribute is considered, the prediction accuracy of the category prediction result can be more accurate, and the target associated object associated with the category prediction result can be more accurately recommended to the target object. In summary, the prediction (recognition) accuracy of the object category can be improved, and the recommendation accuracy of the associated object can be improved.
[0242] Further, please refer to Figure 7 , Figure 7 is a structural schematic diagram of a computer device provided in an embodiment of the present application. As shown in Figure 7 , the above-mentioned Figure 6The data processing device 1 in the corresponding embodiment can be applied to the aforementioned computer device 8000. The computer device 8000 may include a processor 8001, a network interface 8004, and a memory 8005. Furthermore, the computer device 8000 also includes a user interface 8003 and at least one communication bus 8002. The communication bus 8002 is used to enable communication between these components. The user interface 8003 may include a display screen and a keyboard; optionally, the user interface 8003 may also include a standard wired interface or a wireless interface. The network interface 8004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 8005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 8005 may also be at least one storage device located remotely from the aforementioned processor 8001. Figure 7 As shown, the memory 8005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0243] exist Figure 7 In the computer device 8000 shown, the network interface 8004 provides network communication functionality; the user interface 8003 is mainly used to provide an input interface for the user; and the processor 8001 can be used to call the device control application program stored in the memory 8005 to achieve:
[0244] Get the object category state corresponding to the target object, and the object state attributes presented by the target object in the object category state;
[0245] Obtain the relationship graph; the relationship graph contains the associations between category nodes, category status nodes, and status attribute nodes;
[0246] In the category status node, determine the target category status node indicated by the object category status; in the status attribute nodes that are associated with the target category status node, determine the target status attribute node indicated by the object status attribute.
[0247] The relationship graph is updated based on the vector representation features corresponding to the target category state nodes and the target state attribute nodes, respectively, to obtain the target relationship graph;
[0248] Based on the feature expression of the update vector corresponding to each category node in the target relationship graph, the predicted category node is obtained from the category nodes in the target relationship graph, and the category information indicated by the predicted category node is determined as the predicted category result of the target object.
[0249] It should be understood that the computer device 8000 described in the embodiments of the present application can execute the foregoing Figure 3 to Figure 4 The description of the data processing method in the corresponding embodiments can also execute the foregoing Figure 6 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.
[0250] In addition, it should be noted here that the embodiments of the present application also provide a computer readable storage medium, and the aforementioned computer readable storage medium stores the computer program executed by the aforementioned data processing computer device 1000, and the aforementioned computer program includes program instructions, and when the aforementioned processor executes the aforementioned program instructions, the aforementioned computer device can execute the foregoing Figure 3 to Figure 6 The description of the data processing method in the corresponding embodiments, therefore, will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer readable storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application.
[0251] The aforementioned computer readable storage medium can be an internal storage unit of the aforementioned data processing device or the aforementioned computer device, such as the hard disk or the memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as the plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the computer device. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the computer device. The computer readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.
[0252] In one aspect of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in one aspect of the embodiments of the present application.
[0253] The terms "first", "second", etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or units is not limited to the steps or units listed, but can optionally further include steps or units not listed, or can optionally further include other steps units inherent to the process, method, device, product or equipment.
[0254] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0255] The method and related apparatus provided by the embodiments of the present application are described with reference to the method flowchart and / or structural schematic diagram provided by the embodiments of the present application. Each flow and / or block in the method flowchart and / or structural schematic diagram, and the combination of the flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device that realizes the functions specified in the flowchart and / or block diagram. Figure One The functions specified in one flow or multiple flows and / or structural schematic Figure One The functions specified in one flow or multiple flows and / or structural schematic Figure One The functions specified in one flow or multiple flows and / or structural schematic Figure One The functions specified in one flow or multiple flows and / or structural schematic Figure One Figure One The functions specified in one flow or multiple flows and / or structural schematic The functions specified in one flow or multiple flows and / or structural schematic
[0256] The above descriptions are only the preferred embodiment of the application, of course, cannot be used to limit the scope of the application, therefore, the equivalent variations made by the claims of the application, still belongs to the scope of the application covered.
Claims
1. A data processing method, characterized by, The method comprises the following steps: obtaining an object category state corresponding to a target object and an object state attribute presented by the target object in the object category state; obtaining a relationship graph; The relationship graph comprises an association relationship among a category node, a category state node and a state attribute node; the category node comprises category node M i , the category state node comprises category state node M j , and i and j are positive integers. In the category state node, a target category state node indicated by the object category state is determined, and in a state attribute node having an association relationship with the target category state node, a target state attribute node indicated by the object state attribute is determined; the target category state node is an adjacent node of the category node M i , and the adjacent node of the category node M i also contains the category state node M j ; updating the relationship graph according to vector expression features corresponding to the target category state node and the target state attribute node, to obtain a target relationship graph; The target relationship graph is obtained by updating the relationship graph according to the vector expression features corresponding to the target category state node and the target state attribute node respectively. j The vector expression features corresponding to the target category state node and the target state attribute node are aggregated to obtain the aggregated vector expression features corresponding to the target category state node; and the aggregated vector expression features corresponding to the target category state node and the vector expression features corresponding to the category state node M j are aggregated to obtain the vector expression features corresponding to the category node M i The intermediate relationship graph is determined when the intermediate vector expression features corresponding to each category node and the intermediate vector expression features corresponding to each category state node are determined; and the target relationship graph is generated according to the intermediate relationship graph. obtaining a predicted category node in the category nodes of the target relationship graph according to the updated vector expression features corresponding to each category node in the target relationship graph, and determining category information indicated by the predicted category node as a predicted category result of the target object.
2. The method of claim 1, wherein, The method comprises the following steps: obtaining predicted auxiliary text information of the target object; extracting state key text information in the predicted auxiliary text information for indicating a category state, and determining the category state indicated by the state key text information as the object category state; if the predicted auxiliary text information contains attribute key text information for describing the state key text information, determining a state attribute indicated by the attribute key text information as the object state attribute; if the predicted auxiliary text information does not contain the attribute key text information, determining the object state attribute according to the object category state and the relationship graph.
3. The method of claim 2, wherein, The method comprises the following steps: if the predicted auxiliary text information does not contain the attribute key text information, obtaining the target category state node indicated by the object category state in the category state nodes of the relationship graph; in the relationship graph, taking a state attribute node having an association relationship with the target category state node as a candidate state attribute node; determining a state attribute indicated by the candidate state attribute node as a candidate state attribute set, and displaying the candidate state attribute set to the target object; in response to a selection operation of the target object on the candidate state attribute set, determining a candidate state attribute selected by the selection operation as the object state attribute.
4. The method of claim 1, wherein, The method comprises the following steps: splicing the vector expression feature corresponding to the target category state node and the vector expression feature corresponding to the target state attribute node to obtain a spliced vector expression feature; obtaining a maximum value on each dimension of the spliced vector expression feature, and determining a vector expression feature composed of the maximum value on each dimension as the aggregated vector expression feature.
5. The method of claim 1, wherein, The method comprises the following steps: The vector expression feature corresponding to the target category state node is operated with the vector expression feature corresponding to the target state attribute node to obtain an operation vector expression feature; A maximum value of each dimension in the operation vector expression feature is obtained, and a vector expression feature composed of the maximum value of each dimension is determined as the aggregation vector expression feature.
6. The method of claim 1, wherein, The target relationship graph is generated according to the intermediate relationship graph, including: An iteration number corresponding to the intermediate relationship graph is obtained; If the iteration number satisfies an iteration stop condition, the intermediate relationship graph is determined as the target relationship graph, and an intermediate vector expression feature corresponding to an update node is determined as an update vector expression feature; the update node includes the category node and the category state node; If the iteration number does not satisfy the iteration stop condition, the intermediate relationship graph is updated according to the intermediate vector expression feature corresponding to the target category state node and the vector expression feature corresponding to the target state attribute node, to obtain the target relationship graph.
7. The method of claim 1, wherein, The predicted category node is obtained from the category nodes in the target relationship graph according to the update vector expression feature corresponding to each category node in the target relationship graph, including: The update vector expression feature corresponding to each category node in the target relationship graph and the update vector expression feature corresponding to each category state node are obtained; The category node M i updates the vector expression feature input to a linear layer, and the vector expression feature of the category node M i updates is processed by a logistic regression function in the linear layer to obtain the corresponding prediction probability of the category node M i . The predicted category node is determined according to the prediction probability corresponding to each category node in the target relationship graph and the prediction probability corresponding to each category state node.
8. The method of claim 7, wherein, The predicted category node is determined according to the prediction probability corresponding to each category node in the target relationship graph and the prediction probability corresponding to each category state node, including: A maximum prediction probability is obtained from the prediction probability corresponding to each category node and the prediction probability corresponding to each category state node, and the obtained maximum prediction probability is determined as an initial prediction probability; If the node corresponding to the initial prediction probability belongs to the category node, the node corresponding to the initial prediction probability is determined as the predicted category node; If the node corresponding to the initial prediction probability belongs to the category state node, a category state indicated by the node corresponding to the initial prediction probability is determined as a predicted category state, and the predicted category node is determined according to the prediction number corresponding to the predicted category state.
9. The method of claim 8, wherein, The predicted category node is determined according to the prediction number corresponding to the predicted category state, including: If the prediction number satisfies a prediction stop condition, a maximum prediction probability in the prediction probability corresponding to each category node is determined as a target prediction probability, and the category node corresponding to the target prediction probability is determined as the predicted category node; If the prediction number does not satisfy the prediction stop condition, a prediction category state node indicated by the prediction category state is obtained in the target relation graph, the target relation graph is updated according to an update vector expression feature corresponding to the prediction category state node, an update vector expression feature corresponding to the target category state node, and a vector expression feature corresponding to the target state attribute node, and the prediction category node is obtained in the updated target relation graph.
10. The method of claim 9, wherein, The method further comprises: inputting the update vector expression feature corresponding to the prediction category state node into a neural network model; generating a category state detection text for the prediction category state through the neural network model and the update vector expression feature corresponding to the prediction category state node, and pushing the category state detection text to the target object; receiving a category state confirmation result returned by the target object for the category state detection text; if the category state confirmation result is a category state existing result, performing the step of updating the target relation graph according to the update vector expression feature corresponding to the prediction category state node, the update vector expression feature corresponding to the target category state node, and the vector expression feature corresponding to the target state attribute node, and obtaining the prediction category node in the updated target relation graph; if the category state confirmation result is a category state missing result, updating the target relation graph according to the update vector expression feature corresponding to the target category state node and the vector expression feature corresponding to the target state attribute node, and obtaining the prediction category node in the updated target relation graph.
11. The method of claim 1, wherein, The method further comprises: obtaining real category information, a real category state, and real state attributes presented by a sample object in the real category state corresponding to the sample object; taking the real category information as the category node, taking the real category state as the category state node, and taking the real state attributes as the state attribute node; constructing an association edge between the category node, the category state node, and the state attribute node according to an association relationship between the real category information, the real category state, and the real state attributes; constructing the relation graph according to the category node, the category state node, the state attribute node, and the association edge.
12. The method of claim 11, wherein, The method further comprises: inputting sample category text information indicating the real category information, sample state text information indicating the real category state, and sample attribute text information indicating the real state attributes into an encoder; outputting a vector expression feature corresponding to the real category information through the encoder and the sample category text information, and determining the vector expression feature corresponding to the real category information as the vector expression feature corresponding to the category node; Output, through the encoder and the sample state text information, a vector expression feature corresponding to the real category state, and determine the vector expression feature corresponding to the real category state as the vector expression feature corresponding to the category state node; Output, through the encoder and the sample attribute text information, a vector expression feature corresponding to the real state attribute, and determine the vector expression feature corresponding to the real state attribute as the vector expression feature corresponding to the state attribute node; Construct the relationship graph according to the association edge and the vector expression features corresponding to the category node, the category state node and the state attribute node respectively.
13. A computer device, comprising: Comprise: A processor, a memory and a network interface; The network interface is configured to provide network communication function, the memory is configured to store program code, and the processor is configured to call the program code to enable the computer device to execute the method in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method in any one of claims 1-12.
Citation Information
Patent Citations
Classification code determination method, device and equipment and storage medium
CN112599213A