Method, apparatus, device and storage medium for generating a knowledge graph of physical and mental states
By obtaining multiple data sources for physical and mental state feature extraction and clustering analysis, and generating knowledge graphs, the problem of data analysis in the existing technology is solved, and more accurate physical and mental state analysis is achieved.
Patent Information
- Application Number
- CN202210577375.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2042-05-25
AI Technical Summary
When performing physical and mental state data analysis, the prior art usually performs feature analysis based on unilateral data, resulting in the analysis results being too one-sided, lacking comprehensive data analysis methods, making it difficult to reflect the relationship between the data, and the accuracy rate is low.
By obtaining the target user's physical and mental state questionnaire information, user portrait data and user life behavior data, physical and mental state features are extracted and clustered, a physical and mental state knowledge graph is generated, and a pre-trained entity extraction and knowledge relationship extraction model is used to identify entity relationships, and a multi-dimensional physical and mental state knowledge graph is constructed.
It improves the accuracy of physical and mental state data analysis, can more comprehensively reflect the user's physical and mental state, and enhances the ability to identify relationships between data.
Smart Images

Figure CN114970863B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge graphs, and in particular, to a method, apparatus, device, and storage medium for generating a physical and mental state knowledge graph. Background Art
[0002] With the development of Internet technology and the improvement of people's living standards, more and more physical and mental state data has been digitally processed and recorded. The richer these data are, the more accurate the analysis of people's physical and mental states will be.
[0003] When analyzing physical and mental state data in the prior art, feature analysis is usually performed based on one-sided data, such as users' questionnaires, user portrait data, etc. There are technical defects of being too one-sided, and there is a lack of a comprehensive data analysis method, resulting in difficulty in reflecting the relationships between data and low accuracy when analyzing physical and mental state data in the prior art. Summary of the Invention
[0004] The present invention provides a method, apparatus, device, and storage medium for generating a physical and mental state knowledge graph, which is used to improve the accuracy of physical and mental state data analysis.
[0005] In a first aspect of the present invention, a method for generating a physical and mental state knowledge graph is provided, including:
[0006] Obtaining the physical and mental state questionnaire information of the target user, and generating physical and mental state survey data according to the physical and mental state questionnaire information;
[0007] Obtaining user portrait data, and extracting physical and mental state features from the user portrait data to obtain physical and mental state feature data;
[0008] Obtaining user life behavior data, and performing clustering analysis on the user life behavior data to obtain living habit feature data;
[0009] Performing entity relationship recognition on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data, and generating the physical and mental state knowledge graph data of the target user.
[0010] Optionally, in the first implementation manner of the first aspect of the present invention, the obtaining the physical and mental state questionnaire information of the target user, and generating physical and mental state survey data according to the physical and mental state questionnaire information includes:
[0011] Obtaining the physical and mental state questionnaire information of the target user, where the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information;
[0012] Through preset standard options, non-standard selection associations of the question subjects are performed on the physical state questionnaire information, the mental state questionnaire information, the sleep state questionnaire information, the emotional state questionnaire information, the nutritional state questionnaire information, and the exercise state questionnaire information to obtain physical and mental state survey data, and the physical and mental state data is used to indicate the association relationship between the non-standard selections in the physical and mental state questionnaire information and the question subjects.
[0013] Optionally, in the second implementation manner of the first aspect of the present invention, the obtaining user portrait data and performing physical and mental state feature extraction on the user portrait data to obtain physical and mental state feature data includes:
[0014] Obtain user portrait data, and extract physical and mental state labels and user basic information labels in the user portrait data;
[0015] Perform physical and mental state entity recognition and feature fusion on the physical and mental state labels and the user basic information labels through a pre-trained physical and mental state feature recognition model, and obtain physical and mental state feature data, where the physical and mental state feature recognition model includes a multi-layer perceptron.
[0016] Optionally, in the third implementation manner of the first aspect of the present invention, the obtaining user life behavior data and performing clustering analysis on the user life behavior data to obtain life habit feature data includes:
[0017] Obtain user life behavior data collected by a life behavior recording tool, where the user life behavior data includes at least one behavior record data within a preset period, and the behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data;
[0018] Perform data clustering on each behavior record data respectively through a preset clustering algorithm to obtain life habit clustering results corresponding to each behavior record data;
[0019] Perform entity recognition on each behavior record data to obtain behavior entity information, and generate life habit feature data through the behavior entity information and the life habit clustering results corresponding to each behavior record data, where the life habit feature data is used to indicate the relationship between the behavior entity information and the life habit clustering results.
[0020] Optionally, in the fourth implementation manner of the first aspect of the present invention, the performing data clustering on each behavior record data respectively through a preset clustering algorithm to obtain life habit clustering results corresponding to each behavior record data includes:
[0021] Determine the clustering sliding window radius corresponding to each behavior record data through a preset clustering algorithm, and collect dense regions for each behavior record data through the clustering sliding window radius to obtain a dense data set corresponding to each behavior record data, where the clustering algorithm is used to indicate the mean shift clustering algorithm;
[0022] Calculate the mean value of the dense data set corresponding to each behavior record data to obtain the living habit clustering result corresponding to each behavior record data.
[0023] Optionally, in the fifth implementation manner of the first aspect of the present invention, the entity relationship recognition of the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data, and the generation of the physical and mental state knowledge graph data of the target user include:
[0024] Perform entity extraction on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the knowledge base in the pre-trained entity extraction model to obtain target entity information;
[0025] Based on the target entity information, perform entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information;
[0026] Construct a knowledge graph for the target entity information, the target entity relationship information, and the target fact relationship information to obtain the physical and mental state knowledge graph data of the target user.
[0027] Optionally, in the sixth implementation manner of the first aspect of the present invention, the knowledge relationship extraction model includes a word embedding network, a single-sequence long short-term memory recurrent neural network, and a dependency-based long short-term memory recurrent neural network. Based on the target entity information, perform entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information, including:
[0028] Perform embedding word conversion on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the word embedding network to obtain target embedding word information;
[0029] Based on the target entity information, through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network, perform joint relationship feature extraction on the target embedding word information based on the target entity information to obtain target entity relationship information and target fact relationship information.
[0030] In the second aspect of the present invention, a device for generating a physical and mental state knowledge graph is provided, including:
[0031] An acquisition module, configured to acquire the physical and mental state questionnaire information of a target user, and generate physical and mental state survey data according to the physical and mental state questionnaire information;
[0032] An extraction module, configured to acquire user portrait data, and perform physical and mental state feature extraction on the user portrait data to obtain physical and mental state feature data;
[0033] A clustering module, configured to acquire user life behavior data, and perform clustering analysis on the user life behavior data to obtain life habit feature data;
[0034] A generation module, configured to perform entity relationship recognition on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data, and generate the physical and mental state knowledge graph data of the target user.
[0035] Optionally, in the first implementation manner of the second aspect of the present invention, the acquisition module is specifically configured to:
[0036] Acquire the physical and mental state questionnaire information of a target user, where the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information;
[0037] Through preset standard options, perform non-standard selection association of question subjects on the physical state questionnaire information, the mental state questionnaire information, the sleep state questionnaire information, the emotional state questionnaire information, the nutritional state questionnaire information, and the exercise state questionnaire information, to obtain physical and mental state survey data, where the physical and mental state data is used to indicate the association relationship between the non-standard selection and the question subject in the physical and mental state questionnaire information.
[0038] Optionally, in the second implementation manner of the second aspect of the present invention, the extraction module is specifically configured to:
[0039] Acquire user portrait data, and extract the physical and mental state labels and user basic information labels in the user portrait data;
[0040] Through a pre-trained physical and mental state feature recognition model, perform physical and mental state entity recognition and feature fusion on the physical and mental state labels and the user basic information labels to obtain physical and mental state feature data, where the physical and mental state feature recognition model includes a multi-layer perceptron.
[0041] Optionally, in the third implementation manner of the second aspect of the present invention, the clustering module includes:
[0042] An acquisition unit, configured to acquire user life behavior data collected by a life behavior recording tool, where the user life behavior data includes at least one behavior record data within a preset period, and the behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data;
[0043] A clustering unit, configured to perform data clustering on each item of behavior record data respectively through a preset clustering algorithm to obtain a life habit clustering result corresponding to each item of behavior record data;
[0044] An identification unit, configured to perform entity identification on each item of behavior record data to obtain behavior entity information, and generate life habit feature data through the behavior entity information and the life habit clustering result corresponding to each item of behavior record data, where the life habit feature data is used to indicate the relationship between the behavior entity information and the life habit clustering result.
[0045] Optionally, in the fourth implementation manner of the second aspect of the present invention, the clustering unit is specifically configured to:
[0046] Determine a clustering sliding window radius corresponding to each item of behavior record data through a preset clustering algorithm, and perform dense area acquisition on each item of behavior record data through the clustering sliding window radius to obtain a dense data set corresponding to each item of behavior record data, where the clustering algorithm is used to indicate a mean shift clustering algorithm;
[0047] Perform mean calculation on the dense data set corresponding to each item of behavior record data to obtain a life habit clustering result corresponding to each item of behavior record data.
[0048] Optionally, in the fifth implementation manner of the second aspect of the present invention, the generation module includes:
[0049] An extraction unit, configured to perform entity extraction on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data through a knowledge base in a pre-trained entity extraction model to obtain target entity information;
[0050] A generation unit, configured to perform entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data based on the target entity information through a pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information;
[0051] A construction unit for constructing a knowledge graph from the target entity information, the target entity relationship information, and the target fact relationship information to obtain the physical and mental state knowledge graph data of the target user.
[0052] Optionally, in the sixth implementation manner of the second aspect of the present invention, the knowledge relationship extraction model includes a word embedding network, a single-sequence long short-term memory recurrent neural network, and a dependency-based long short-term memory recurrent neural network. The generating unit is specifically configured to:
[0053] Perform an embedded word conversion on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the word embedding network to obtain target embedded word information;
[0054] Based on the target entity information, through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network, jointly extract relationship features from the target embedded word information based on the target entity information to obtain target entity relationship information and target fact relationship information.
[0055] The third aspect of the present invention provides a generating device for a physical and mental state knowledge graph, including: a memory and at least one processor, where a computer program is stored in the memory; the at least one processor calls the computer program in the memory so that the generating device for the physical and mental state knowledge graph executes the above-mentioned generating method for the physical and mental state knowledge graph.
[0056] The fourth aspect of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when it runs on a computer, it causes the computer to execute the above-mentioned generating method for the physical and mental state knowledge graph.
[0057] In the technical solution provided by the present invention, questionnaire information on the physical and mental state of the target user is obtained, and physical and mental state survey data is generated according to the questionnaire information on the physical and mental state; user portrait data is obtained, and physical and mental state feature extraction is performed on the user portrait data to obtain physical and mental state feature data; user life behavior data is obtained, and clustering analysis is performed on the user life behavior data to obtain life habit feature data; entity relationship recognition is performed on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data, and physical and mental state knowledge graph data of the target user is generated. In the embodiments of the present invention, in order to analyze the physical and mental state of the user in multiple dimensions, questionnaire information on the physical and mental state of the target user, user portrait data, and user life behavior data are obtained for physical and mental state feature recognition, physical and mental state survey data, physical and mental state feature data, and life habit feature data are obtained, and finally entity relationship recognition is performed on these data to obtain physical and mental state knowledge graph data of the target user. The present invention can improve the accuracy of physical and mental state data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a schematic diagram of an embodiment of a method for generating a physical and mental state knowledge graph in an embodiment of the present invention;
[0059] Figure 2 It is a schematic diagram of another embodiment of a method for generating a physical and mental state knowledge graph in an embodiment of the present invention;
[0060] Figure 3 It is a schematic diagram of an embodiment of an apparatus for generating a physical and mental state knowledge graph in an embodiment of the present invention;
[0061] Figure 4 It is a schematic diagram of another embodiment of an apparatus for generating a physical and mental state knowledge graph in an embodiment of the present invention;
[0062] Figure 5 It is a schematic diagram of an embodiment of a device for generating a physical and mental state knowledge graph in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0063] Embodiments of the present invention provide a method, apparatus, device, and storage medium for generating a physical and mental state knowledge graph, which are used to improve the accuracy of physical and mental state data analysis.
[0064] In the description and claims of the present invention and the above-mentioned drawings, the terms "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0065] It can be understood that the execution entity of the present invention can be a device for generating a knowledge graph of physical and mental states, or a terminal or a server. Specifically, it is not limited here. In the embodiments of the present invention, the server is taken as an example of the execution entity for illustration.
[0066] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to Figure 1 , an embodiment of the method for generating a knowledge graph of physical and mental states in the embodiments of the present invention includes:
[0067] 101. Obtain the physical and mental state questionnaire information of the target user, and generate physical and mental state survey data according to the physical and mental state questionnaire information;
[0068] It should be noted that the target user is used to indicate the user to be analyzed. In order to comprehensively analyze the physical and mental state information of a single user, the server obtains the physical and mental state questionnaire information of the target user. The physical and mental state questionnaire information includes multiple questions related to physical and mental states and the user options corresponding to each question. For example, a question related to physical and mental states in the physical and mental state questionnaire information is: "How long do you sleep every day?" The user options corresponding to this question can be "less than 5 hours", "5-7 hours", "7-9 hours", "more than 9 hours", etc. Specifically, it is not limited here.
[0069] In one embodiment, the server constructs an association relationship between keyword information and corresponding user options based on the keyword information corresponding to each question in the physical and mental state questionnaire information, and obtains physical and mental state survey data. For example, a question related to physical and mental state in the physical and mental state questionnaire information is: "What is the frequency of your weekly exercise?" Suppose the keyword information corresponding to this question is "exercise frequency", and the user option is "less than 1 time", then the association relationship between the keyword information and the corresponding user option can be "exercise frequency" - "<1 time / week", and the obtained physical and mental state survey data includes this association relationship, and the specific details are not limited here. This embodiment can accurately extract key information in the questionnaire, thereby improving the accuracy of physical and mental state data analysis.
[0070] 102. Obtain user portrait data, and extract physical and mental state features from the user portrait data to obtain physical and mental state feature data;
[0071] It should be noted that since the user portrait data can also reflect the physical and mental state of the user to a certain extent, therefore, by increasing the dimension of physical and mental state data analysis, the accuracy of physical and mental state data analysis can be improved. For example, if the user portrait data of the target user indicates that the target user is currently unemployed and has a mortgage pressure, or indicates that the target user is a high-income group and has no loan pressure, then the physical and mental state feature data of being unemployed and having a mortgage pressure may be "anxiety", indicating that the target user may be in an emotionally anxious mental state, while the physical and mental state feature data of a high-income group and having no loan pressure may be "non-anxiety", indicating that the target user is not in an anxious mental state, and the specific details are not limited here.
[0072] In one implementation, after the server obtains the user portrait data, based on a plurality of preset physical and mental state classification labels, it extracts the physical and mental state data corresponding to each physical and mental state classification label in the user portrait data, and classifies the physical and mental state data corresponding to each physical and mental state classification label to obtain physical and mental state feature data, which is used to indicate the physical and mental state classification result. For example, one physical and mental state classification label is "whether there is anxiety", then, by classifying the physical and mental state data corresponding to this physical and mental state classification label, the obtained physical and mental state feature data can be "no anxiety" or "anxiety". Further, classifying the physical and mental state data corresponding to each physical and mental state classification label to obtain physical and mental state feature data includes: scoring the physical and mental state data corresponding to each physical and mental state classification label to obtain a physical and mental state score, and determining the physical and mental state classification result through the physical and mental state score, and the physical and mental state classification result is used to indicate the physical and mental state feature data. For example, assume that one physical and mental state classification label is "whether there is anxiety" and the physical and mental state score is 88 points. Then, this physical and mental state score can indicate that the probability of the target user having specific anxiety is 88%. Then, the physical and mental state classification result determined by this physical and mental state score can be having the physical and mental state corresponding to this physical and mental state classification label, that is, having anxiety. Specifically, it is not limited here.
[0073] 103. Obtain the user's life behavior data, and perform clustering analysis on the user's life behavior data to obtain life habit feature data;
[0074] It should be noted that the user's life behavior data is used to indicate the life behavior trajectory of the target user within a preset time period. For example, getting up at 08:00 on March 1, 2022, running from 09:00 to 10:00, taking a lunch break from 13:00 to 14:00, going to bed at 22:00, etc. Specifically, it is not limited here. With the development and popularization of life behavior recording tools (such as sports bracelets, diet recording software, accounting software, food delivery software, etc.), the user's life behavior data can be obtained through these life behavior recording tools for user life habit analysis.
[0075] In one implementation, the server performs data clustering on the user's life behavior data through a density-based clustering algorithm to obtain multiple data clusters, calculates the mode of each data cluster, obtains the mode corresponding to each data cluster, and finally determines the life habit feature data through the mode corresponding to each data cluster. For example, one of the data clusters of the user's life behavior data is the "bedtime data cluster". By calculating the mode of the "bedtime data cluster", the mode of the target user's bedtime can be "22:00". Then, the obtained life habit feature data contains data such as "bedtime = 22:00". Specifically, it is not limited here.
[0076] 104. Identify entity relationships in the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data, and generate the physical and mental state knowledge graph data of the target user.
[0077] It should be noted that, in order to more intuitively reflect the physical and mental state of the target user, the physical and mental state knowledge graph data of the target user is constructed through the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data. The physical and mental state knowledge graph data describes physical and mental state entities, facts, and relationships in a structured form. For example, the relationship between the fact of exercising every day and the physical state, and the relationship between the fact of going to bed after 12 o'clock every night and the emotional state, etc. Specific details are not limited here.
[0078] In one implementation, the server performs entity recognition, fact recognition, and entity relationship recognition on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through a pre-trained knowledge graph construction model to obtain the physical and mental state knowledge graph data of the target user. This implementation can accurately construct the knowledge graph, thereby improving the accuracy of physical and mental state data analysis.
[0079] In one implementation, after generating the physical and mental state knowledge graph data of the target user, the server draws the physical and mental state knowledge graph of the target user through the physical and mental state knowledge graph data to intuitively reflect the physical and mental state of the target user.
[0080] Furthermore, the server stores the physical and mental state knowledge graph data in the blockchain database. Specific details are not limited here.
[0081] In the embodiments of the present invention, in order to analyze the physical and mental state of the user in multiple dimensions, the physical and mental state questionnaire information, user portrait data, and user life behavior data of the target user are obtained for physical and mental state characteristic recognition to obtain the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data. Finally, entity relationship recognition is performed on these data to obtain the physical and mental state knowledge graph data of the target user. The present invention can improve the accuracy of physical and mental state data analysis.
[0082] Please refer to Figure 2 , another embodiment of the method for generating the physical and mental state knowledge graph in the embodiments of the present invention includes:
[0083] 201. Obtain the physical and mental state questionnaire information of the target user, and generate physical and mental state survey data according to the physical and mental state questionnaire information;
[0084] Specifically, step 201 includes: obtaining the physical and mental state questionnaire information of the target user, where the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information; through preset standard options, non-standard selection associations of the question subjects are performed on the physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information to obtain physical and mental state survey data, and the physical and mental state data is used to indicate the association relationship between the non-standard selections and the question subjects in the physical and mental state questionnaire information.
[0085] In this embodiment, in order to improve the accuracy of the physical and mental state survey, a multi-dimensional questionnaire survey is included in the physical and mental state questionnaire when formulating the physical and mental state questionnaire, including the physical state dimension, mental state dimension, sleep state dimension, emotional state dimension, nutritional state dimension, and exercise state dimension, so as to obtain the physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information in the physical and mental state questionnaire information. For example, the question about the physical state temperature can be "Do you have any underlying diseases?", the question about the mental state dimension can be "Do you feel very tired when you think of facing a day of work or study in the morning?", the question about the sleep state dimension can be "Do you often dream?", the question about the emotional state dimension can be "Do you often feel depressed or unhappy?", the question about the nutritional state dimension can be "Do you have a preference for a certain food?", and the question about the exercise state dimension can be "Do you have difficulty walking 3 kilometers?", and specific details are not limited here.
[0086] In this embodiment, each question in the physical and mental state questionnaire information corresponds to a question subject and standard options. The server extracts the non-standard selections in the physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information, and associates the non-standard selections with the question subjects to obtain the physical and mental state survey data. For example, the question "Do you have any underlying diseases?" corresponds to the question subject "underlying diseases", and the standard option is "no". If the user's selection in the physical and mental state questionnaire information is "yes", then this user's selection is a non-standard selection. Associating "underlying diseases" with "yes" obtains the physical and mental state survey data of "having underlying diseases", and specific details are not limited here.
[0087] 202. Obtain the user portrait data, and perform physical and mental state feature extraction on the user portrait data to obtain the physical and mental state feature data;
[0088] Specifically, step 202 includes: obtaining user portrait data, and extracting physical and mental state tags and user basic information tags from the user portrait data; performing physical and mental state entity recognition and feature fusion on the physical and mental state tags and user basic information tags through a pre-trained physical and mental state feature recognition model, and obtaining physical and mental state feature data. The physical and mental state feature recognition model includes a multi-layer perceptron. In this embodiment, in order to improve the accuracy of extracting physical and mental state features based on user portrait data, first, physical and mental state tags and user basic information tags related to the user's physical and mental state are extracted from the user portrait data, and then the physical and mental state entity recognition and feature fusion are performed on the physical and mental state tags and user basic information tags through the multi-layer perceptron (MLP) in the pre-trained physical and mental state feature recognition model to obtain physical and mental state feature data. Among them, the multi-layer perceptron is also called an artificial neural network (ANN), which is a forward-structured artificial neural network composed of multiple node layers. Each layer is fully connected to the next layer. Except for the input nodes, each node is a neuron with a non-linear activation function. The multi-layer perceptron can overcome the weakness that the single-layer perceptron cannot recognize linearly inseparable data, thereby improving the accuracy of physical and mental state feature recognition.
[0089] 203. Obtain the user's life behavior data collected by the life behavior recording tool. The user's life behavior data includes at least one behavior record data within a preset period. The behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data.
[0090] In this embodiment, in order to improve the accuracy of obtaining the user's life habit feature data through life behavior data analysis, the server reads the user's life behavior data collected by the life behavior recording tool. The user's life behavior data includes at least one behavior record data within a certain period, that is, the user's life behavior data includes at least one of diet record data, exercise record data, sleep record data, body posture record data, and body fat record data, for subsequent life habit analysis.
[0091] 204. Perform data clustering on each behavior record data through a preset clustering algorithm to obtain the life habit clustering result corresponding to each behavior record data.
[0092] Specifically, step 204 includes: determining the clustering sliding window radius corresponding to each piece of behavior record data through a preset clustering algorithm, and collecting dense regions for each piece of behavior record data through the clustering sliding window radius to obtain a dense data set corresponding to each piece of behavior record data, where the clustering algorithm is used to indicate the mean shift clustering algorithm; calculating the mean value of the dense data set corresponding to each piece of behavior record data to obtain the living habit clustering result corresponding to each piece of behavior record data.
[0093] In this embodiment, the server performs data clustering on each piece of behavior record data through the mean shift clustering algorithm in the clustering algorithm to obtain a dense data set corresponding to each piece of behavior record data. Specifically, first, calculate the clustering sliding window radius corresponding to each piece of behavior record data through the mean shift clustering algorithm, then determine the clustering sliding window corresponding to each piece of behavior record data with the clustering sliding window radius corresponding to each piece of behavior record data, and collect dense regions for each piece of behavior record data based on the clustering sliding window corresponding to each piece of behavior record data to obtain a dense data set corresponding to each piece of behavior record data. The dense data set is used to indicate the data set with the largest data density in the behavior record data. Finally, the server calculates the mean value of the dense data set corresponding to each piece of behavior record data to obtain the behavior record mean value corresponding to each piece of behavior record data, and generates a living habit clustering result through the behavior record mean value corresponding to each piece of behavior record data. For example, if a piece of behavior record data reflects the bedtime of the target user, then the dense data set corresponding to the bedtime contains the data set of the bedtime with the largest data density. By calculating the mean value of this dense data set, the obtained behavior record mean value can be 23:00, indicating that the target user goes to bed around 23:00 almost every day. Then, the living habit clustering result corresponding to this bedtime behavior record data is "23:00".
[0094] 205. Perform entity recognition on each piece of behavior record data to obtain behavior entity information, and generate living habit feature data through the behavior entity information and the living habit clustering result corresponding to each piece of behavior record data. The living habit feature data is used to indicate the relationship between the behavior entity information and the living habit clustering result.
[0095] In this embodiment, in order to determine the behavior entity recorded by each piece of behavior record data, the server performs entity recognition on each piece of behavior record data to obtain behavior entity information. For example, the behavior entity information corresponding to the exercise behavior record data can be "running", "rope skipping", etc. The server then associates the behavior entity information with the corresponding living habit clustering result to obtain living habit feature data. For example, the living habit clustering result of a certain sleep behavior is "23:00", and the behavior entity corresponding to this sleep behavior is "bedtime". Then, this living habit feature data is "bedtime - 23:00".
[0096] 206. Identify entity relationships for the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data, and generate the physical and mental state knowledge graph data of the target user.
[0097] Specifically, step 206 includes: performing entity extraction on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the knowledge base in the pre-trained entity extraction model to obtain target entity information; based on the target entity information, performing entity relationship extraction and fact relationship extraction on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information; constructing a knowledge graph for the target entity information, target entity relationship information, and target fact relationship information to obtain the physical and mental state knowledge graph data of the target user. In this embodiment, in order to accurately extract the entity information in the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data, the server performs entity extraction on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the knowledge base in the pre-trained entity extraction model to obtain target entity information. Among them, the entity extraction model includes a conditional random fields (CRF) and a long short-term memory (LSTM) network, which can accurately extract the target entity information, thereby improving the accuracy of the construction of the physical and mental state knowledge graph. Based on the target entity information, the server performs entity relationship extraction and fact relationship extraction on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information, and constructs a knowledge graph for the target entity information, target entity relationship information, and target fact relationship information to obtain the physical and mental state knowledge graph data of the target user.
[0098] Furthermore, the knowledge relationship extraction model includes a word embedding network, a single-sequence long short-term memory recurrent neural network, and a dependency-based long short-term memory recurrent neural network. Based on the target entity information, performing entity relationship extraction and fact relationship extraction on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information includes: performing embedded word conversion on the physical and mental state survey data, physical and mental state characteristic data, and lifestyle characteristic data through the word embedding network to obtain target embedded word information; based on the target entity information, performing joint relationship feature extraction on the target embedded word information through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network to obtain target entity relationship information and target fact relationship information.
[0099] In this embodiment, the knowledge relation extraction model includes a word embedding network, a single-sequence long short-term memory and recurrent neural network (LSTM-RNN), and a dependency-based long short-term memory recurrent neural network. It is a joint relation extraction model based on deep learning. First, the server performs embedded word conversion on the physical and mental state survey data, physical and mental state feature data, and living habit feature data through the word embedding network to obtain target embedded word information. Then, based on the target entity information, through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network, joint relation feature extraction is performed on the target embedded word information based on the target entity information to obtain target entity relation information and target fact relation information. Finally, a knowledge graph corresponding to the target entity information, target entity relation information, and target fact relation information is constructed to obtain the physical and mental state knowledge graph data of the target user. This embodiment can accurately perform relation extraction through a deep learning model, thereby improving the accuracy of constructing the physical and mental state knowledge graph.
[0100] In the embodiment of the present invention, in order to analyze the physical and mental state of the user in multiple dimensions, the physical and mental state questionnaire information, user portrait data, and user life behavior data of the target user are obtained for physical and mental state feature recognition, and the physical and mental state survey data, physical and mental state feature data, and living habit feature data are obtained. Among them, the living habit feature data is obtained by performing clustering analysis on the user life behavior data through a clustering algorithm. Finally, entity relation recognition is performed on these data to obtain the physical and mental state knowledge graph data of the target user. The present invention can improve the accuracy of physical and mental state data analysis.
[0101] The method for generating the physical and mental state knowledge graph in the embodiment of the present invention is described above. Next, the device for generating the physical and mental state knowledge graph in the embodiment of the present invention will be described. Please refer to Figure 3 , an embodiment of the device for generating the physical and mental state knowledge graph in the embodiment of the present invention includes:
[0102] An acquisition module 301, configured to acquire the physical and mental state questionnaire information of the target user, and generate physical and mental state survey data according to the physical and mental state questionnaire information;
[0103] An extraction module 302, configured to acquire user portrait data, and perform physical and mental state feature extraction on the user portrait data to obtain physical and mental state feature data;
[0104] The clustering module 303 is configured to obtain user life behavior data and perform clustering analysis on the user life behavior data to obtain life habit feature data;
[0105] The generation module 304 is configured to perform entity relationship recognition on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data, and generate the physical and mental state knowledge graph data of the target user. Further, the physical and mental state knowledge graph data is stored in a blockchain database, and the specific method is not limited here.
[0106] In the embodiment of the present invention, in order to analyze the physical and mental state of the user from multiple dimensions, the physical and mental state questionnaire information, user portrait data, and user life behavior data of the target user are obtained for physical and mental state feature recognition, so as to obtain physical and mental state survey data, physical and mental state feature data, and life habit feature data. Finally, entity relationship recognition is performed on these data to obtain the physical and mental state knowledge graph data of the target user, and the present invention can improve the accuracy of physical and mental state data analysis.
[0107] Please refer to Figure 4 , another embodiment of the physical and mental state knowledge graph generation device in the embodiment of the present invention includes:
[0108] The acquisition module 301 is configured to obtain the physical and mental state questionnaire information of the target user and generate physical and mental state survey data according to the physical and mental state questionnaire information;
[0109] The extraction module 302 is configured to obtain user portrait data and perform physical and mental state feature extraction on the user portrait data to obtain physical and mental state feature data;
[0110] The clustering module 303 is configured to obtain user life behavior data and perform clustering analysis on the user life behavior data to obtain life habit feature data;
[0111] The generation module 304 is configured to perform entity relationship recognition on the physical and mental state survey data, the physical and mental state feature data, and the life habit feature data, and generate the physical and mental state knowledge graph data of the target user.
[0112] Optionally, the acquisition module 301 is specifically configured to:
[0113] Obtain the physical and mental state questionnaire information of the target user, where the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information;
[0114] Through preset standard options, non-standard selection associations of the question subjects are performed on the physical state questionnaire information, the mental state questionnaire information, the sleep state questionnaire information, the emotional state questionnaire information, the nutritional state questionnaire information, and the exercise state questionnaire information to obtain physical and mental state survey data, and the physical and mental state data is used to indicate the association relationship between the non-standard selections and the question subjects in the physical and mental state questionnaire information.
[0115] Optionally, the extraction module 302 is specifically configured to:
[0116] Obtain user portrait data, and extract the physical and mental state tags and user basic information tags in the user portrait data;
[0117] Perform physical and mental state entity recognition and feature fusion on the physical and mental state tags and the user basic information tags through a pre-trained physical and mental state feature recognition model, and obtain physical and mental state feature data. The physical and mental state feature recognition model includes a multi-layer perceptron.
[0118] Optionally, the clustering module 303 includes:
[0119] An acquisition unit 3031, configured to acquire user life behavior data collected by a life behavior recording tool. The user life behavior data includes at least one behavior record data within a preset period, and the behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data;
[0120] A clustering unit 3032, configured to perform data clustering on each behavior record data respectively through a preset clustering algorithm to obtain a life habit clustering result corresponding to each behavior record data;
[0121] An identification unit 3033, configured to perform entity recognition on each behavior record data to obtain behavior entity information, and generate life habit feature data through the behavior entity information and the life habit clustering result corresponding to each behavior record data. The life habit feature data is used to indicate the relationship between the behavior entity information and the life habit clustering result.
[0122] Optionally, the clustering unit 3032 is specifically configured to:
[0123] Determine the clustering sliding window radius corresponding to each behavior record data through a preset clustering algorithm, and perform dense area acquisition on each behavior record data through the clustering sliding window radius to obtain a dense data set corresponding to each behavior record data. The clustering algorithm is used to indicate the mean shift clustering algorithm;
[0124] Calculate the mean value of the dense data set corresponding to each behavior record data to obtain a life habit clustering result corresponding to each behavior record data.
[0125] Optionally, the generating module 304 includes:
[0126] An extraction unit 3041, configured to perform entity extraction on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through a knowledge base in a pre-trained entity extraction model to obtain target entity information;
[0127] A generating unit 3042, configured to perform entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data based on the target entity information through a pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information;
[0128] A construction unit 3043, configured to construct a knowledge graph for the target entity information, the target entity relationship information, and the target fact relationship information to obtain physical and mental state knowledge graph data of a target user.
[0129] Optionally, the knowledge relationship extraction model includes a word embedding network, a single-sequence long short-term memory recurrent neural network, and a dependency-based long short-term memory recurrent neural network. The generating unit 3042 is specifically configured to:
[0130] Perform embedded word conversion on the physical and mental state survey data, the physical and mental state feature data, and the living habit feature data through the word embedding network to obtain target embedded word information;
[0131] Based on the target entity information, through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network, perform joint relationship feature extraction on the target embedded word information based on the target entity information to obtain target entity relationship information and target fact relationship information.
[0132] In an embodiment of the present invention, in order to analyze the physical and mental state of a user in multiple dimensions, obtain the physical and mental state questionnaire information, user portrait data, and user life behavior data of a target user for physical and mental state feature recognition, obtain physical and mental state survey data, physical and mental state feature data, and living habit feature data, wherein the living habit feature data is obtained by performing clustering analysis on the user life behavior data through a clustering algorithm. Finally, entity relationship recognition is performed on these data to obtain physical and mental state knowledge graph data of a target user. The present invention can improve the accuracy of physical and mental state data analysis.
[0133] above Figure 3 and Figure 4The generating device of the physical and mental state knowledge graph in the embodiments of the present invention is described in detail from the perspective of modular functional entities. Next, the generating device of the physical and mental state knowledge graph in the embodiments of the present invention is described in detail from the perspective of hardware processing.
[0134] Figure 5 FIG. 4 is a schematic structural diagram of a generating device of a physical and mental state knowledge graph provided by an embodiment of the present invention. The generating device 500 of the physical and mental state knowledge graph may vary greatly due to different configurations or performances, and may include one or more processors (central processing units, CPUs) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 for storing application programs 533 or data 532 (for example, one or more mass storage devices). Among them, the memory 520 and the storage media 530 may be transient storage or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the figure), and each module may include a series of computer program operations in the generating device 500 of the physical and mental state knowledge graph. Further, the processor 510 may be configured to communicate with the storage media 530 and execute a series of computer program operations in the storage media 530 on the generating device 500 of the physical and mental state knowledge graph.
[0135] The generating device 500 of the physical and mental state knowledge graph may further include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that Figure 5 the shown structural diagram of the generating device of the physical and mental state knowledge graph does not constitute a limitation on the generating device of the physical and mental state knowledge graph, and may include more or fewer components than shown, or combine some components, or have different component arrangements.
[0136] The present invention further provides a computer device, which includes a memory and a processor. A computer-readable computer program is stored in the memory. When the computer-readable computer program is executed by the processor, the processor executes the steps of the generating method of the physical and mental state knowledge graph in the above embodiments.
[0137] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer is caused to execute the steps of the method for generating the physical and mental state knowledge graph.
[0138] Further, the computer-readable storage medium may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0139] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, etc.
[0140] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several computer programs for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0142] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a knowledge graph of physical and mental states, characterized in that, The method for generating the physical and mental state evaluation data includes: Obtaining the physical and mental state questionnaire information of the target user, and generating physical and mental state survey data according to the physical and mental state questionnaire information; Obtaining user portrait data, and extracting physical and mental state characteristics from the user portrait data to obtain physical and mental state characteristic data; Obtaining user life behavior data, and performing cluster analysis on the user life behavior data to obtain lifestyle characteristic data; Performing entity relationship recognition on the physical and mental state survey data, the physical and mental state characteristic data, and the lifestyle characteristic data, and generating the physical and mental state knowledge graph data of the target user; Generating the physical and mental state survey data according to the physical and mental state questionnaire information, including: the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information; through preset standard options, non-standard selection associations of question subjects are performed on the physical state questionnaire information, the mental state questionnaire information, the sleep state questionnaire information, the emotional state questionnaire information, the nutritional state questionnaire information, and the exercise state questionnaire information to obtain physical and mental state survey data, and the physical and mental state data is used to indicate the association relationship between the non-standard selection and the question subject in the physical and mental state questionnaire information; Extracting physical and mental state characteristics from the user portrait data to obtain physical and mental state characteristic data, including: extracting the physical and mental state labels and user basic information labels in the user portrait data; performing physical and mental state entity recognition and feature fusion on the physical and mental state labels and the user basic information labels through a pre-trained physical and mental state feature recognition model, and obtaining physical and mental state characteristic data, and the physical and mental state feature recognition model includes a multi-layer perceptron; Performing cluster analysis on the user life behavior data to obtain lifestyle characteristic data, including: the user life behavior data includes at least one behavior record data within a preset period, and the behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data; respectively performing data clustering on each behavior record data through a preset clustering algorithm to obtain the lifestyle clustering results corresponding to each behavior record data; performing entity recognition on each behavior record data to obtain behavior entity information, and generating lifestyle characteristic data through the behavior entity information and the lifestyle clustering results corresponding to each behavior record data, and the lifestyle characteristic data is used to indicate the relationship between the behavior entity information and the lifestyle clustering results; Perform entity relationship recognition on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data, and generate the physical and mental state knowledge graph data of the target user, including: extracting target entity information from the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through the knowledge base in the pre-trained entity extraction model; based on the target entity information, performing entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information; constructing a knowledge graph for the target entity information, the target entity relationship information, and the target fact relationship information to obtain the physical and mental state knowledge graph data of the target user.
2. The method for generating a knowledge graph of physical and mental states according to claim 1, characterized in that, The data clustering of each behavior record data is respectively performed through a preset clustering algorithm to obtain the living habit clustering result corresponding to each behavior record data, including: Determining the clustering sliding window radius corresponding to each behavior record data through a preset clustering algorithm, and collecting dense regions of each behavior record data through the clustering sliding window radius to obtain a dense data set corresponding to each behavior record data, where the clustering algorithm is used to indicate the mean shift clustering algorithm; Calculating the mean value of the dense data set corresponding to each behavior record data to obtain the living habit clustering result corresponding to each behavior record data.
3. The method for generating a knowledge graph of physical and mental states according to claim 1, characterized in that, The knowledge relationship extraction model includes a word embedding network, a single-sequence long short-term memory recurrent neural network, and a dependency-based long short-term memory recurrent neural network. Based on the target entity information, performing entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through the pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information, including: Performing embedded word conversion on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through the word embedding network to obtain target embedded word information; Performing joint relationship feature extraction on the target embedded word information based on the target entity information through the single-sequence long short-term memory recurrent neural network and the dependency-based long short-term memory recurrent neural network to obtain target entity relationship information and target fact relationship information.
4. A device for generating a knowledge graph of physical and mental states, characterized in that, The generating device of the physical and mental state knowledge graph includes: An acquisition module, configured to acquire the physical and mental state questionnaire information of the target user, and generate physical and mental state survey data according to the physical and mental state questionnaire information; An extraction module, configured to acquire user portrait data, and perform physical and mental state feature extraction on the user portrait data to obtain physical and mental state characteristic data; A clustering module, configured to acquire user life behavior data, and perform clustering analysis on the user life behavior data to obtain living habit characteristic data; A generation module for performing entity relationship recognition on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data, and generating the physical and mental state knowledge graph data of the target user; Generate physical and mental state survey data according to the physical and mental state questionnaire information, including: the physical and mental state questionnaire information includes physical state questionnaire information, mental state questionnaire information, sleep state questionnaire information, emotional state questionnaire information, nutritional state questionnaire information, and exercise state questionnaire information; through preset standard options, perform non-standard selection association of question subjects on the physical state questionnaire information, the mental state questionnaire information, the sleep state questionnaire information, the emotional state questionnaire information, the nutritional state questionnaire information, and the exercise state questionnaire information to obtain physical and mental state survey data, and the physical and mental state data is used to indicate the association relationship between non-standard selections and question subjects in the physical and mental state questionnaire information; Extract physical and mental state characteristics from the user portrait data to obtain physical and mental state characteristic data, including: extract the physical and mental state labels and user basic information labels in the user portrait data; through a pre-trained physical and mental state characteristic recognition model, perform physical and mental state entity recognition and feature fusion on the physical and mental state labels and the user basic information labels to obtain physical and mental state characteristic data, and the physical and mental state characteristic recognition model includes a multi-layer perceptron; Perform clustering analysis on the user's life behavior data to obtain living habit characteristic data, including: the user's life behavior data includes at least one behavior record data within a preset period, and the behavior record data is diet record data, exercise record data, sleep record data, body posture record data, and body fat record data; respectively perform data clustering on each behavior record data through a preset clustering algorithm to obtain the living habit clustering results corresponding to each behavior record data; perform entity recognition on each behavior record data to obtain behavior entity information, and generate living habit characteristic data through the behavior entity information and the living habit clustering results corresponding to each behavior record data, and the living habit characteristic data is used to indicate the relationship between the behavior entity information and the living habit clustering results; Perform entity relationship recognition on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data, and generate the physical and mental state knowledge graph data of the target user, including: perform entity extraction on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through the knowledge base in a pre-trained entity extraction model to obtain target entity information; based on the target entity information, perform entity relationship extraction and fact relationship extraction on the physical and mental state survey data, the physical and mental state characteristic data, and the living habit characteristic data through a pre-trained knowledge relationship extraction model to obtain target entity relationship information and target fact relationship information; perform knowledge graph construction on the target entity information, the target entity relationship information, and the target fact relationship information to obtain the physical and mental state knowledge graph data of the target user.
5. A device for generating a knowledge graph of physical and mental states, characterized in that, The generating device of the physical and mental state knowledge graph includes: a memory and at least one processor, and a computer program is stored in the memory; The at least one processor calls the computer program in the memory, so that the generating device of the physical and mental state knowledge graph executes the generating method of the physical and mental state knowledge graph according to any one of claims 1-3.
6. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, it implements the generating method of the physical and mental state knowledge graph according to any one of claims 1-3.
Citation Information
Patent Citations
Physical and mental state judgment method and system based on multi-dimensional psychological behavior indexes
CN112652380A
Physical and psychological health intelligent management method and system
CN113421630A