Parent-child relationship evaluation method and device
Through text processing and natural language model analysis of parent-child relationship evaluation method, emotional polarity and theme distribution are calculated, the subjectivity and inaccuracy of parent-child relationship evaluation in the existing technology are solved, and more objective and accurate evaluation results are achieved , and provide guidance for improving parent-child relationships.
Patent Information
- Application Number
- CN202411078712.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-13
AI Technical Summary
The existing parent-child relationship evaluation methods have subjective deviations, inaccuracies and high time costs, and traditional methods are difficult to provide objective and accurate evaluation results.
By obtaining the story text between the target object and the family, cleaning, word segmentation processing and natural language model annotation, calculating emotional polarity and theme distribution, determining the focus of parent-child relationships, and using word vectors and Dirichlet distribution to calculate the subject words. Provide parent-child relationship evaluation methods and devices.
It improves the objectivity and accuracy of parent-child relationship evaluation, reduces the social expectation effect of traditional methods, and provides directional guidance for improving parent-child relationships.
Smart Images

Figure CN119128145A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of parent-child relationship evaluation, and in particular to a parent-child relationship evaluation method and device. Background Art
[0002] Parent-child relationship is one of the key factors in adolescent development. A good parent-child relationship has a key impact on the healthy development of adolescents in terms of physical and mental health, social adaptation and academic achievement. Therefore, accurately evaluating the quality of parent-child relationship is crucial for better understanding adolescent development and more effective guidance intervention. However, the existing parent-child relationship evaluation methods are mainly traditional methods such as scales, observations and interviews, which have certain limitations, such as the subjective memory bias of respondents, the subjective judgment of evaluators and the limitation of time cost, and the evaluation results are not accurate enough. Summary of the invention
[0003] In view of this, the present invention provides a parent-child relationship evaluation method and device to solve the problem that traditional parent-child relationship evaluation has certain limitations and is not accurate enough.
[0004] According to a first aspect, an embodiment of the present disclosure provides a parent-child relationship evaluation method, the method comprising:
[0005] Obtain multiple target texts of the target object, all of which record the stories between the target object and his family;
[0006] Each target text is cleaned and segmented in turn to obtain the target words;
[0007] Using a natural language model to perform part-of-speech tagging on the target words, multiple opinion words based on the target text are obtained, and the multiple opinion words include adjectives, adverbs, and verbs;
[0008] Get the word vector corresponding to each opinion word;
[0009] Based on the word vector corresponding to each opinion word, calculate the sentiment polarity of each target text;
[0010] Calculate the topic distribution results and topic word distribution results of each target text;
[0011] According to the topic distribution results and the topic word distribution results of each target text, the topic words of each target text are determined to obtain the focus of the parent-child relationship between the target object and the family.
[0012] In an optional implementation, each target text is cleaned and segmented in turn to obtain target words, including:
[0013] Delete invalid words that are not relevant to the evaluation of parent-child relationship in each target text;
[0014] Each target text after the deletion process is segmented and stop words are filtered out.
[0015] In an optional implementation, obtaining a word vector corresponding to each opinion word includes:
[0016] The word vector corresponding to each opinion word is queried through the standard dictionary.
[0017] In an optional implementation, based on the word vector corresponding to each opinion word, the sentiment polarity of each target text is calculated by the following formula:
[0018] S=softmax(Wv+b),
[0019] Among them, W is the weight matrix, b is the bias, the sentiment polarity value is S = {positive, neutral, negative}, and v is the word vector corresponding to each opinion word.
[0020] In an optional implementation, the topic distribution and topic word distribution of each target text are calculated using the following formula:
[0021]
[0022]
[0023] in, is the topic distribution result for each target text, G i is the i-th target text, T k is the number of k-th topic, α is the text G i The distribution parameter of the Dirichlet function is β, which is the subject T k The distribution parameters of the Dirichlet function are obeyed, n is the target text quantity, is the topic word distribution result for each target text, D j is the jth topic word, N i is the number of words.
[0024] According to a second aspect, an embodiment of the present disclosure provides a parent-child relationship evaluation device, the device comprising:
[0025] A text acquisition module is used to acquire multiple target texts of a target object, and the multiple target texts all record stories between the target object and his family members;
[0026] The word determination module is used to clean and segment each target text in turn to obtain the target word;
[0027] A word tagging module is used to perform part-of-speech tagging on target words using a natural language model to obtain multiple opinion words based on the target text, wherein the multiple opinion words include adjectives, adverbs, and verbs;
[0028] A word vector acquisition module is used to obtain the word vector corresponding to each opinion word;
[0029] A sentiment polarity determination module is used to calculate the sentiment polarity of each target text based on the word vector corresponding to each opinion word;
[0030] A topic distribution calculation module is used to calculate the topic distribution results and topic word distribution results of each target text;
[0031] The parent-child relationship evaluation module is used to determine the subject words of each target text according to the subject distribution results and subject word distribution results of each target text, so as to obtain the focus of the parent-child relationship between the target object and the family.
[0032] In an optional implementation, the word determination module includes:
[0033] The word deletion submodule is used to delete invalid words that are not related to the evaluation of parent-child relationship in each target text;
[0034] The word filtering submodule is used to perform word segmentation on each target text after the deletion process and filter out stop words.
[0035] According to a third aspect, an embodiment of the present disclosure provides a computer device, including:
[0036] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parent-child relationship evaluation method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0037] According to a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the parent-child relationship evaluation method of the first aspect or any corresponding embodiment thereof.
[0038] According to a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the parent-child relationship evaluation method of the first aspect or any corresponding embodiment thereof.
[0039] The present invention has the following advantages:
[0040] The present invention discloses a parent-child relationship evaluation method and device, wherein the method uses a target text of a target object as a basis for evaluating the parent-child relationship, cleans and segmentes each target text in turn to obtain a target word; uses a natural language model to perform part-of-speech tagging on the target word to obtain multiple opinion words based on the target text, and the multiple opinion words include adjectives, adverbs and verbs; obtains a word vector corresponding to each opinion word; based on the word vector corresponding to each opinion word, calculates the sentiment polarity of each target text (including the three-category evaluation of "positive, neutral, and negative" in the parent-child relationship), calculates the topic distribution result and the topic word distribution result of each target text; according to the topic distribution result and the topic word distribution result of each target text, determines the topic word of each target text to obtain the focus of the parent-child relationship between the target object and the family, thereby reducing the social expectation effect of traditional parent-child relationship evaluation methods such as questionnaires and interviews, and improving the objectivity and accuracy of parent-child relationship evaluation. At the same time, the present invention can also provide directional guidance for improving parent-child relationships. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 is a flow chart of a parent-child relationship evaluation method according to an embodiment of the present invention;
[0043] Figure 2 is a structural block diagram of a parent-child relationship evaluation device according to an embodiment of the present invention;
[0044] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0046] According to an embodiment of the present invention, an embodiment of a parent-child relationship evaluation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] In this embodiment, a parent-child relationship evaluation method is provided, which can be used in mobile terminals, such as mobile phones, tablet computers, etc. Figure 1 is a flow chart of a parent-child relationship evaluation method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0048] Step S101, obtaining multiple target texts of the target object, wherein the multiple target texts all record the stories between the target object and his family.
[0049] Specifically, the target object may be a student, and the multiple target texts may be multiple compositions of the student, which record daily stories between the student and his family members (father, mother, grandfather, grandmother, brothers and sisters). The disclosed embodiment mainly determines the parent-child relationship between the target object and the family members through multiple target texts.
[0050] Step S102, cleaning and word segmentation processing are performed on each target text in turn to obtain target words.
[0051] In an optional implementation, each target text is cleaned and segmented in turn to obtain target words, including:
[0052] Step a1, delete invalid words in each target text that are not related to the evaluation of parent-child relationship.
[0053] Step a2, performing word segmentation processing on each target text after the deletion processing, and filtering out stop words.
[0054] Specifically, each collected target text is cleaned to delete irrelevant content and other invalid answer data. At the same time, the document is segmented to remove stop words.
[0055] By executing this implementation, it is helpful to accurately calculate the sentiment polarity of each target text.
[0056] Step S103, using a natural language model to perform part-of-speech tagging on the target words, to obtain a plurality of opinion words based on the target text, the plurality of opinion words including adjectives, adverbs and verbs.
[0057] Specifically, opinion words refer to words that affect sentiment polarity, such as adjectives, adverbs, and verbs that appear in the composition. The natural language model BERT in natural language processing is used to perform part-of-speech tagging on the words in the composition, and adjectives, adverbs, and verbs are extracted from them to form an opinion word set O = {o1, o2, …, o n}.
[0058] Step S104, obtaining the word vector corresponding to each opinion word.
[0059] In a specific example, the word vector corresponding to each opinion word can be queried through a standard dictionary.
[0060] Specifically, the GloVe word vector is stored as a standard dictionary, the key of the standard dictionary is the word, and the value is the m-dimensional word vector corresponding to the word. i , find the corresponding vector in the GloVe word vector dictionary e i It can be expressed as ei=(ei1,ei2,…,eim).
[0061] Step S105, based on the word vector corresponding to each opinion word, the sentiment pole of each target text is calculated.
[0062] In a specific example, based on the word vector corresponding to each opinion word, the sentiment polarity of each target text is calculated using the following formula:
[0063] S=softmax(Wv+b),
[0064] Among them, W is the weight matrix, b is the bias, the sentiment polarity value is S = {positive, neutral, negative}, and v is the word vector corresponding to each opinion word.
[0065] Therefore, by calculating the word vector corresponding to each opinion word in this way, it can be known whether the sentiment polarity of each target text is positive, neutral or negative, which is beneficial to improve the objectivity and scientificity of parent-child relationship evaluation.
[0066] Step S106, calculating the topic distribution result and topic word distribution result of each target text.
[0067] Specifically, we obtain M target texts, denoted as G1, G2, …, G M , where each document G i The word (i=1,…,M) is recorded as D ij (j=1,…,N i ), N i is the number of words; the topics are recorded as T1, T2, …, T K , K is the number of topics.
[0068] In an optional implementation, the topic distribution and topic word distribution of each target text are calculated using the following formula:
[0069]
[0070]
[0071] in, is the topic distribution result for each target text, G i is the i-th target text, T k is the number of k-th topic, α is the text G i The distribution parameter of the Dirichlet function obeys, indicating the sparsity of the text and topic distribution, and β is the topic T k The distribution parameter of the Dirichlet function is the distribution parameter of the topic and word distribution, n is the number of target texts, is the topic word distribution result for each target text, D j is the jth topic word, N i is the number of words.
[0072] Step S107, determining the subject words of each target text according to the subject distribution results and subject word distribution results of each target text, so as to obtain the focus of the parent-child relationship between the target object and the family members.
[0073] Specifically, according to the topic distribution results and topic word distribution results of each target text, the probability of words in the topic of each target text can be ranked to find possible keywords for each topic. On this basis, the top ranked words under each topic are selected and the union is taken as the topic words in multiple target texts of the target object to reflect the students' concerns about parent-child relationships.
[0074] The parent-child relationship evaluation method provided by the embodiment of the present disclosure uses the target text of the target object as the basis for evaluating the parent-child relationship, cleans and segmentes each target text in turn to obtain the target words; uses the natural language model to perform part-of-speech tagging on the target words to obtain multiple opinion words based on the target text, and the multiple opinion words include adjectives, adverbs and verbs; obtains the word vector corresponding to each opinion word; based on the word vector corresponding to each opinion word, calculates the sentiment polarity of each target text (including the three-category evaluation of "positive, neutral, and negative" in the parent-child relationship); calculates the topic distribution results and the topic word distribution results of each target text; according to the topic distribution results and the topic word distribution results of each target text, determines the topic words of each target text to obtain the focus of the parent-child relationship between the target object and the family, thereby reducing the social expectation effect of traditional parent-child relationship evaluation methods such as questionnaires and interviews, and improving the objectivity and accuracy of parent-child relationship evaluation. At the same time, the present invention can also provide directional guidance for improving parent-child relationships.
[0075] In this embodiment, a parent-child relationship evaluation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0076] This embodiment provides a parent-child relationship evaluation device. Figure 2 As shown, including:
[0077] A text acquisition module 21 is used to acquire multiple target texts of the target object, and the multiple target texts all record the stories between the target object and his family;
[0078] The word determination module 22 is used to perform cleaning and word segmentation processing on each target text in turn to obtain the target word;
[0079] A word tagging module 23 is used to perform part-of-speech tagging on the target word using a natural language model to obtain a plurality of opinion words based on the target text, wherein the plurality of opinion words include adjectives, adverbs and verbs;
[0080] A word vector acquisition module 24 is used to obtain the word vector corresponding to each opinion word;
[0081] A sentiment polarity determination module 25, for calculating the sentiment polarity of each target text based on the word vector corresponding to each opinion word;
[0082] A topic distribution calculation module 26, used to calculate the topic distribution result and the topic word distribution result of each target text;
[0083] The parent-child relationship evaluation module 27 is used to determine the subject words of each target text according to the subject distribution results and subject word distribution results of each target text, so as to obtain the focus of the parent-child relationship between the target object and the family members.
[0084] In an optional implementation, the word determination module 22 includes:
[0085] The deletion submodule is used to delete invalid words that are not related to the evaluation of parent-child relationship in each target text; the filtering submodule is used to perform word segmentation processing on each target text after the deletion processing and filter stop words.
[0086] In an optional implementation, the word vector acquisition module 24 includes:
[0087] Get the submodule for querying the word vector corresponding to each opinion word through the standard dictionary.
[0088] In an optional implementation, the sentiment polarity determination module 25 calculates the sentiment polarity of each target text based on the word vector corresponding to each opinion word, using the following formula:
[0089] S=softmax(Wv+b),
[0090] Among them, W is the weight matrix, b is the bias, the sentiment polarity value is S = {positive, neutral, negative}, and v is the word vector corresponding to each opinion word.
[0091] In an optional implementation, the word tagging module 23 calculates the topic distribution and topic word distribution of each target text by the following formula:
[0092]
[0093]
[0094] in, is the topic distribution result for each target text, G i is the i-th target text, T k is the number of k-th topic, α is the text G i The distribution parameter of the Dirichlet function obeys, indicating the sparsity of the document-topic distribution, and β is the topic T k The distribution parameter of the Dirichlet function is denoted by the sparsity of the topic-word distribution, n is the number of target texts, is the topic word distribution result for each target text, D j is the jth topic word, N i is the number of words.
[0095] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0096] The parent-child relationship evaluation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0097] An embodiment of the present invention further provides a computer device having the above-mentioned parent-child relationship evaluation device.
[0098] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.
[0099] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0100] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0101] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0103] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0104] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0105] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A parent-child relationship evaluation method, characterized in that: The method comprises: Acquire multiple target texts of the target object, wherein the multiple target texts all record stories between the target object and his family members; Each target text is cleaned and segmented in turn to obtain the target words; Using a natural language model to perform part-of-speech tagging on the target words to obtain a plurality of opinion words based on the target text, wherein the plurality of opinion words include adjectives, adverbs, and verbs; Get the word vector corresponding to each opinion word; Based on the word vector corresponding to each opinion word, calculate the sentiment polarity of each target text; Calculate the topic distribution results and topic word distribution results of each target text; According to the topic distribution results and the topic word distribution results of each target text, the topic words of each target text are determined to obtain the focus of the parent-child relationship between the target object and the family members.
2. The method according to claim 1, characterized in that The cleaning and word segmentation processing is performed on each target text in turn to obtain target words, including: Delete invalid words that are not relevant to the evaluation of parent-child relationship in each target text; Each target text after the deletion process is segmented and stop words are filtered out.
3. The method according to claim 1, characterized in that The step of obtaining the word vector corresponding to each opinion word includes: The word vector corresponding to each opinion word is queried through the standard dictionary.
4. The method according to claim 1, characterized in that: Based on the word vector corresponding to each opinion word, the sentiment polarity of each target text is calculated by the following formula: S=softmax(Wv+b), Among them, W is the weight matrix, b is the bias, the sentiment polarity value is S = {positive, neutral, negative}, and v is the word vector corresponding to each opinion word.
5. The method according to claim 1, characterized in that The topic distribution and topic word distribution of each target text are calculated by the following formula: in, is the topic distribution result for each target text, G i is the i-th target text, T k is the number of k-th topic, α is the text G i The distribution parameter of the Dirichlet function is β, which is the subject T k The distribution parameter of the Dirichlet function is obeyed, n is the number of target texts, is the topic word distribution result for each target text, D j is the jth topic word, N i is the number of words.
6. A parent-child relationship evaluation device, characterized in that: The device comprises: A text acquisition module, used to acquire multiple target texts of a target object, wherein the multiple target texts all record stories between the target object and his family members; The word determination module is used to clean and segment each target text in turn to obtain the target word; A word tagging module, used to perform part-of-speech tagging on the target word using a natural language model to obtain a plurality of opinion words based on the target text, wherein the plurality of opinion words include adjectives, adverbs and verbs; A word vector acquisition module is used to obtain the word vector corresponding to each opinion word; A sentiment polarity determination module is used to calculate the sentiment polarity of each target text based on the word vector corresponding to each opinion word; A topic distribution calculation module is used to calculate the topic distribution results and topic word distribution results of each target text; The parent-child relationship evaluation module is used to determine the subject words of each target text according to the subject distribution results and subject word distribution results of each target text, so as to obtain the focus of the parent-child relationship between the target object and the family members.
7. The device according to claim 6, characterized in that The word determination module comprises: The word deletion submodule is used to delete invalid words that are not related to the evaluation of parent-child relationship in each target text; The word filtering submodule is used to perform word segmentation on each target text after the deletion process and filter out stop words.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parent-child relationship evaluation method according to any one of claims 1 to 5 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the parent-child relationship evaluation method according to any one of claims 1 to 5.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the parent-child relationship evaluation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Sentiment analysis method oriented to micro-blog short text
CN102663046A
Comment aspect viewpoint-level mining method based on dictionary improved LDA model
CN110837740A
News classification method for extracting text features by fusing topic information and word vectors
CN114036938A
Text fine-grained sentiment analysis method and system, medium and computing equipment
CN115906824A
Method and device for determining emotion information in comment information
CN115935979A
