Nursing scheme generation method and system based on knowledge graph, and storage medium
By using a knowledge graph-based nursing plan generation method, which utilizes historical knowledge graphs and classification models, accurate nursing plans are generated, solving the problem of insufficient accuracy in existing technologies, reducing the cost of manual generation, and improving scientific rigor.
Patent Information
- Application Number
- CN202511128327.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies for generating care plans lack precision, manual generation is labor-intensive and its scientific rigor needs improvement, and existing technologies cannot generate solutions that cannot be solved.
Based on the field of knowledge graph technology, innovative technologies are generated by acquiring historical knowledge graph data, and nursing plans are generated, including preparation modules, analysis modules, and storage media, to produce accurate nursing plans.
It improved the accuracy of nursing plans, reduced the cost of manual generation, and enhanced the scientific rigor of the generated plans.
Smart Images

Figure CN120974277A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of knowledge graph, in particular to a nursing scheme generation method and system based on knowledge graph and a storage medium. BACKGROUND
[0002] At present, the method of generating a nursing scheme by artificial not only consumes human cost, but also the scientificity of the generated nursing scheme needs to be considered, so the method of automatically generating a nursing scheme is born.
[0003] The prior art has a Chinese patent application with the publication number CN115309955A, which discloses a pet nursing scheme generation method, device, computer equipment and storage medium. The method includes: obtaining a whole body image of a pet to be nursed, obtaining body feature information and noseprint feature information of the pet to be nursed according to the whole body image; obtaining a candidate nursing scheme matched with the body feature information and the noseprint feature information through a pre-constructed scheme generation model; calculating the correlation degree of the body feature information and each candidate nursing scheme; and screening each candidate nursing scheme according to the correlation degree to obtain a target nursing scheme of the pet to be nursed. However, the patent application only roughly matches the body feature information with each candidate nursing scheme, and the accuracy of the generated nursing scheme needs to be improved. SUMMARY
[0004] The present application generates practice data based on historical knowledge graph, which is used to practice generating a classification model, and extracts different word groups from special files, merges the word groups for specific word groups, combines the word groups after the merging processing, inputs the combination of the word groups into the classification model, establishes a knowledge graph based on the classification results output by the classification model, and generates a nursing scheme from the knowledge graph. The present application aims to improve the accuracy of the generated nursing scheme.
[0005] The present application provides a nursing scheme generation method based on knowledge graph, including the following steps: S1, a preparation module obtains historical knowledge graph, extracts a plurality of entity combinations and a plurality of contacts corresponding to the entity combinations from the historical knowledge graph, generates different practice data using each entity combination and the contact corresponding to each entity combination, and a practice module uses all the practice data to practice generating a classification model; S2, an analysis module obtains a special file, determines different words in the special file, uses different words to form a plurality of word groups, for each word group, two words in the word group are respectively divided to calculate a plurality of first same degrees corresponding to the two words, a second same degree corresponding to the two words is calculated based on the file environment in which the two words in the word group respectively exist, and a third same degree corresponding to the two words is calculated based on a plurality of words contained in the two words in the word group; S3, the analysis module generates a record table, respectively judges whether two sentences in a plurality of sentence groups are equivalent, respectively carries out merging processing on the plurality of sentence groups, respectively combines the merged sentence groups, sequentially inputs the combinations of different sentence groups into a classification model, establishes a knowledge graph according to a plurality of classification results output by the classification model, and generates a nursing scheme from the knowledge graph.
[0006] As a preferred technical solution of the present application, the analysis module stores a corresponding table in advance, the corresponding table includes a plurality of data records, and the data records contain two equivalent sentences.
[0007] As a preferred technical solution of the present application, the analysis module respectively carries out division processing on two sentences in a sentence group to calculate a plurality of first same degrees corresponding to the two sentences, including the following steps: S211, for each sentence in the corresponding table, the analysis module divides the sentence into a plurality of semantic units, and the analysis module sorts all semantic units corresponding to the corresponding table in order from more to less according to the number of occurrences, and selects a plurality of semantic units at the top of the order; S212, the analysis module respectively divides the two sentences in the sentence group into different semantic units according to the selected plurality of semantic units, and combines all semantic units corresponding to the sentence group in pairs; S213, for each semantic unit group corresponding to the sentence group, first calculate the first number of occurrences of two semantic units in the semantic unit group in the corresponding table, and the second number and the third number of occurrences of two semantic units in the semantic unit group in the corresponding table, and then use the first number divided by the product of the second number and the third number to obtain the first same degree.
[0008] As a preferred technical solution of the present application, the analysis module calculates a second same degree corresponding to two sentences in a sentence group based on the file environment in which the two sentences are respectively located, including the following steps: S221, the analysis module respectively obtains each word and the number of occurrences of each word around the two sentences in the sentence group in a special file, deletes duplicate words among all words corresponding to the two sentences, and generates representative quantities corresponding to the two sentences respectively; S222, for the representative quantity corresponding to each sentence, the analysis module respectively multiplies different representative values in the representative quantity by corresponding weight values, and the analysis module calculates the cosine similarity between the representative quantities corresponding to the two sentences respectively as the second same degree corresponding to the two sentences.
[0009] As a preferred technical solution of the present application, the analysis module calculates a third same degree corresponding to two sentences in a sentence group based on a plurality of words contained in the two sentences, including the following steps: S231, for each sentence in the sentence group, the analysis module divides the sentence into several words, and the analysis module counts the number of same words appearing in the two sentences at the same time; S232, for each sentence in the sentence group, the analysis module calculates the ratio of the number of same words to the total number of words in the sentence, and the analysis module calculates the comprehensive value of the ratio of the two sentences respectively using the weighted method as the third same degree corresponding to the two sentences.
[0010] As a preferred technical solution of the present application, the analysis module generates a record table to determine whether two sentences in several sentence groups are equivalent, including the following steps: S311, for each sentence group obtained from the specialized file, the analysis module records the two sentences in the sentence group, the several first same degrees corresponding to the two sentences, the second same degrees corresponding to the two sentences, and the third same degrees corresponding to the two sentences in a data record of the record table in turn; S312, for each data record of the record table, the analysis module checks whether the two sentences in the data record appear at the same time in the corresponding table, and if so, sets the identification data corresponding to the data record as equivalent, and if not, continues to check whether the two sentences in the data record appear in the corresponding table respectively, and if so, sets the identification data corresponding to the data record as not equivalent, and if not, sets the identification data corresponding to the data record as uncertain.
[0011] As a preferred technical solution of the present application, the analysis module generates a record table to determine whether two sentences in several sentence groups are equivalent, and further includes the following steps: S321, the analysis module extracts the same number of data records with corresponding identification data as equivalent and corresponding identification data as not equivalent from the record table; S322, for each data record extracted, the analysis module generates practice data using the several first same degrees, the second same degrees, the third same degrees in the data record, and the identification data corresponding to the data record, and the analysis module uses all the practice data to practice generating an analysis model; S323, for each data record of the record table with corresponding identification data as uncertain, input the several first same degrees, the second same degrees, the third same degrees in the data record into the analysis model, and adjust the identification data corresponding to the data record based on the output result of the analysis model.
[0012] The present application also provides a nursing scheme generation system based on a knowledge graph, including the following modules: The preparation module is configured to obtain a historical knowledge graph, extract a plurality of entity combinations from the historical knowledge graph, and extract a plurality of relations corresponding to the plurality of entity combinations, and generate different practice data by using each entity combination and the relation corresponding to each entity combination; The practice module is configured to use all the practice data to generate a classification model; The analysis module is configured to obtain a special file, determine different sentences in the special file, use the different sentences to form a plurality of sentence groups, for each sentence group, perform division processing on two sentences in the sentence group to calculate a plurality of first same degrees corresponding to the two sentences, calculate a second same degree corresponding to the two sentences based on a file environment in which the two sentences are respectively located, calculate a third same degree corresponding to the two sentences based on a plurality of words included in the two sentences, and generate a record table, respectively judge whether the two sentences in the plurality of sentence groups are identical, perform merging processing on the plurality of sentence groups, perform pairwise combination on all the sentence groups after the merging processing, sequentially input combinations of different sentence groups into the classification model, establish a knowledge graph according to a plurality of classification results output by the classification model, and generate a nursing scheme from the knowledge graph.
[0013] The application further provides a storage medium storing program instructions, wherein the program instructions control a device in which the storage medium is located to perform the method described in any one of the preceding embodiments when the program instructions are executed.
[0014] Compared with the prior art, the application has at least the following beneficial effects: In the technical scheme provided in the application, firstly, the preparation module obtains a historical knowledge graph, extracts a plurality of entity combinations and a plurality of contacts corresponding to the plurality of entity combinations from the historical knowledge graph, generates different practice data using the plurality of entity combinations and the plurality of contacts corresponding to the plurality of entity combinations, and the practice module uses all the practice data to generate a classification model. Secondly, the analysis module obtains a special file, determines different sentences in the special file, uses the different sentences to form a plurality of sentence groups, for each sentence group, respectively processes two sentences in the sentence group to calculate a plurality of first same degrees corresponding to the two sentences, calculates a second same degree corresponding to the two sentences based on the file environment in which the two sentences respectively exist, and calculates a third same degree corresponding to the two sentences based on a plurality of words included in the two sentences. Finally, the analysis module generates a record table, respectively judges whether two sentences in the plurality of sentence groups are identical, respectively processes the plurality of sentence groups, combines the processed sentence groups two by two, inputs different combinations of the sentence groups into the classification model in turn, and establishes a knowledge graph according to a plurality of classification results output by the classification model, and generates a nursing scheme from the knowledge graph. Through the application, an accurate knowledge graph can be generated, the knowledge graph includes complex contacts related to nursing measures, so that a nursing scheme can be accurately generated by querying the knowledge graph. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical scheme of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor based on these drawings.
[0016] Figure 1 The flow chart of the nursing scheme generation method based on the knowledge graph in the embodiment of the application; Figure 2 The schematic diagram of the nursing scheme generation system based on the knowledge graph in the embodiment of the application. DETAILED DESCRIPTION
[0017] The embodiments of the present application provide a knowledge graph-based nursing scheme generation method and system and a storage medium. The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used 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 terms "include" or "have" 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 have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] For ease of understanding, the specific process of the embodiments of the present application is described below. Please refer to Figure 1 The knowledge graph-based nursing scheme generation method in the embodiments of the present application includes the following main steps: S1, the preparation module obtains a historical knowledge graph, extracts a plurality of entity combinations and a plurality of contacts corresponding to the entity combinations from the historical knowledge graph, generates different practice data using each entity combination and the contact corresponding to each entity combination, and the practice module uses all the practice data to practice and generate a classification model; S2, the analysis module obtains a special file, determines different sentences in the special file, uses different sentences to form a plurality of sentence groups, for each sentence group, respectively processes two sentences in the sentence group to calculate a plurality of first same degrees corresponding to the two sentences, calculates a second same degree corresponding to the two sentences based on the file environment in which the two sentences in the sentence group are respectively located, and calculates a third same degree corresponding to the two sentences based on a plurality of words contained in the two sentences in the sentence group; S3, the analysis module generates a record table, respectively judges whether the two sentences in the plurality of sentence groups are identical, respectively processes the plurality of sentence groups, combines the processed sentence groups two by two, sequentially inputs the combinations of different sentence groups into the classification model, and establishes a knowledge graph according to a plurality of classification results output by the classification model, and generates a nursing scheme from the knowledge graph.
[0019] Specifically, in certain cases, it is necessary to construct a new knowledge graph for generating a nursing plan, for example, in the case that new knowledge that can provide better guidance for the nursing plan appears, in order to improve the accuracy of the generated nursing plan, in S1, the preparation module obtains a historical knowledge graph, extracts a plurality of entity combinations from the historical knowledge graph, and a plurality of entity combinations correspond to a contact, in order to facilitate understanding, for example, there is an entity combination composed of a certain disease and a certain nursing measure, and the contact corresponding to this entity combination is applicable, that is, the disease is applicable to the nursing measure, for each entity combination, using the entity combination and the contact corresponding to the entity combination to generate practice data, wherein the entity combination corresponds to a data part in the practice data, and the data part can be two entity embedding vectors corresponding to each other, and the contact corresponding to the entity combination corresponds to a label part in the practice data, then the practice module uses all the practice data to practice a classification model, which can be a neural network model in the prior art. In S2, the analysis module obtains a special file, which refers to a file that can be used to generate a knowledge graph, and determines different sentences in the special file, such as a certain disease, a certain symptom, or a certain nursing measure, etc., using different sentences to form a plurality of sentence groups, it should be noted that the two sentences forming the sentence group can be two identical sentences, for two sentences that are not identical, it is not necessary to generate a sentence group, for each sentence group, the two sentences in the sentence group are respectively divided and processed, a plurality of first same degrees corresponding to the two sentences are calculated, based on the file environment in which the two sentences in the sentence group are respectively located, a second same degree corresponding to the two sentences is calculated, and based on a plurality of words contained in the two sentences in the sentence group, a third same degree corresponding to the two sentences is calculated. In S3, the analysis module generates a record table, and respectively judges whether the two sentences in the plurality of sentence groups are identical, wherein the plurality of sentence groups refer to all the sentence groups generated based on the special file, the plurality of sentence groups are respectively processed by merging, in order to facilitate understanding, for example, the sentences "feeling stuffy" and "feeling stuffy" in a sentence group are identical, then the sentences "feeling stuffy" and "feeling stuffy" can be merged into "nasal ventilation disorder", and "nasal ventilation disorder" is the merged sentence group, the two-by-two combination of all the merged sentence groups is performed, and the combination of different sentence groups is sequentially input into the classification model, and a knowledge graph is established according to a plurality of classification results output by the classification model, in order to facilitate understanding, for example, the combination of "nasal ventilation disorder" and "cold" respectively corresponds to two embedding vectors input into the classification model, and the classification result output by the classification model is caused, that is, "cold" causes "nasal ventilation disorder", and then a nursing plan can be generated from the knowledge graph, for example, a disease is found according to a symptom, and a suitable nursing measure is found according to the disease.
[0020] Further, the analysis module stores in advance a corresponding table, the corresponding table includes a plurality of data records, and each data record includes two identical phrases.
[0021] Specifically, the corresponding table stored in advance by the analysis module is introduced, the corresponding table includes a plurality of data records, and each data record includes two identical phrases, for example, the phrase “feeling stuffy” and the phrase “feeling blocked nose”, and the corresponding table is mainly used to determine whether two phrases are identical.
[0022] Further, the analysis module respectively divides two phrases in the phrase group to calculate a plurality of first identical degrees corresponding to the two phrases, including the following steps: S211, for each phrase in the corresponding table, the analysis module divides the phrase into a plurality of semantic units, and the analysis module sorts all semantic units corresponding to the corresponding table in descending order of occurrence frequency, and selects a plurality of semantic units with high frequency; S212, the analysis module divides two phrases in the phrase group into different semantic units according to the selected plurality of semantic units, and all semantic units corresponding to the phrase group are combined two by two; S213, for each semantic unit group corresponding to the phrase group, the first number of times that two semantic units in the semantic unit group appear simultaneously in the corresponding table is calculated, and the second number of times and the third number of times that two semantic units in the semantic unit group appear in the corresponding table are calculated, and then the first number of times is divided by the product of the second number of times and the third number of times to obtain the first identical degree.
[0023] Specifically, the analysis module divides the two sentences in the sentence group respectively to calculate the first same degree corresponding to the two sentences. In S211, for each sentence in the corresponding table, the analysis module divides the sentence into a plurality of semantic units, which are morphemes, i.e., the smallest meaningful unit in language. The analysis module sorts all semantic units corresponding to the corresponding table in descending order of occurrence frequency, selects a plurality of semantic units with a small order value, and specifically selects those semantic units with an order value less than a preset order value threshold. The order value threshold is set according to the actual application scenario. In S212, the analysis module divides the two sentences in the sentence group into different semantic units according to the selected plurality of semantic units. The sentence group is a sentence group for which the first same degree is to be calculated. All semantic units corresponding to the sentence group are combined in pairs. For ease of understanding, for example, the selected plurality of semantic units include “A”, “B”, “C”, and “D”, and a sentence group includes the sentence “AC” and the sentence “BD”. The sentence “AC” can be divided into “A” and “C”, and the sentence “BD” can be divided into “B” and “D”. All semantic units are combined in pairs to obtain the combination of “A” and “B”, the combination of “A” and “D”, the combination of “C” and “B”, and the combination of “C” and “D”. In S213, for each semantic unit group corresponding to the sentence group, the first number of times that the two semantic units in the semantic unit group appear simultaneously in the corresponding table is calculated. The two semantic units appearing simultaneously in the corresponding table means that the two sentences corresponding to the two semantic units appear simultaneously in a data record of the corresponding table. The sentence corresponding to the semantic unit means the sentence including the semantic unit. The second number of times and the third number of times that the two semantic units in the semantic unit group appear in the corresponding table are calculated. The appearance in the corresponding table means that the sentence corresponding to the semantic unit appears in a data record of the corresponding table. The first same degree is obtained by dividing the first number of times by the product of the second number of times and the third number of times.
[0024] Further, the analysis module calculates the second same degree corresponding to the two sentences in the sentence group based on the file environment in which the two sentences are located, including the following steps: S221, the analysis module acquires each word and the occurrence frequency of each word around the two sentences in the sentence group in the special file, deletes the repeated words in all words corresponding to the two sentences, and generates the representative quantity corresponding to the two sentences, respectively; S222, for the representative quantity corresponding to each sentence, the analysis module multiplies the different representative values in the representative quantity by the corresponding weight value, respectively, and the analysis module calculates the cosine similarity between the representative quantities corresponding to the two sentences, respectively, as the second same degree corresponding to the two sentences.
[0025] Specifically, the process that the analysis module calculates the second identical degree corresponding to the two phrases in the phrase group based on the file environment where the two phrases are respectively located is introduced. In S221, the analysis module acquires the respective words around the two phrases in the phrase group and the occurrence times of the respective words in the special file. For the convenience of understanding, an example is given. For a phrase, the two nearest words "E, F" are acquired from the preceding text and the two nearest words "G, H" are acquired from the following text, so the respective words around the phrase are "E", "F", "G", and "H", and the occurrence times of the respective words are all 1. For another phrase, the two nearest words "F, I" are acquired from the preceding text and the two nearest words "J, G" are acquired from the following text, so the respective words around the phrase are "F", "I", "J", and "G", and the occurrence times of the respective words are all 1. The repeated words are deleted from all the words corresponding to the two phrases, and then the above example can obtain "E", "F", "G", "H", "I", and "J". The representative quantity corresponding to the two phrases is generated. Then the above example can obtain that the representative quantity corresponding to one phrase is [1, 1, 1, 1, 0, 0] and the representative quantity corresponding to another phrase is [0, 1, 1, 0, 1, 1]. In S222, the analysis module multiplies the different representative values in the representative quantity corresponding to each phrase by the corresponding weight value. Then the above example can obtain that if "F" is a general word, the occurrence time of "F" is multiplied by a weight value less than 1, and if "H" is a special word, such as a medical word, the occurrence time of "H" is multiplied by a weight value greater than 1. The analysis module calculates the cosine similarity between the representative quantities corresponding to the two phrases, and further obtains the second identical degree corresponding to the two phrases.
[0026] Further, the analysis module calculates the third identical degree corresponding to the two phrases in the phrase group based on the number of words contained in the two phrases, including the following steps: S231, for each phrase in the phrase group, the analysis module divides the phrase into a plurality of words, and the analysis module counts the number of same words appearing in the two phrases simultaneously; S232, for each phrase in the phrase group, the analysis module calculates the ratio of the number of same words to the total number of words in the phrase, and the analysis module uses a weighted method to calculate the comprehensive value of the ratio corresponding to the two phrases as the third identical degree corresponding to the two phrases.
[0027] Specifically, the process that the analysis module calculates the third identical degree corresponding to the two word phrases based on several words contained in the two word phrases in the word phrase group is introduced. In S231, for each word phrase in the word phrase group, the analysis module divides the word phrase into several words, and the analysis module counts the number of identical words included in the two word phrases. In S232, for each word phrase in the word phrase group, the analysis module calculates the ratio of the number of identical words to the total number of words in the word phrase, and the analysis module calculates the comprehensive value of the ratio corresponding to the two word phrases using a weighting method. Specifically, the formula is used to calculate the comprehensive value, where is the comprehensive value, , the ratios corresponding to the two word phrases are respectively, , the corresponding weights are respectively, and the third identical degree corresponding to the two word phrases is the comprehensive value. The weight corresponding to the word phrase with a longer length is greater than the weight corresponding to the word phrase with a shorter length.
[0028] Further, the analysis module generates a record table to determine whether the two word phrases in the several word phrase groups are identical, including the following steps: S311, for each word phrase group obtained from the specialized file, the analysis module records the two word phrases in the word phrase group, the several first identical degrees corresponding to the two word phrases, the second identical degrees corresponding to the two word phrases, and the third identical degrees corresponding to the two word phrases in a data record of the record table in sequence; S312, for each data record of the record table, the analysis module checks whether the two word phrases in the data record appear in the corresponding table at the same time. If yes, the identification data corresponding to the data record is set as identical. If no, the analysis module continues to check whether the two word phrases in the data record appear in the corresponding table respectively. If yes, the identification data corresponding to the data record is set as not identical. If no, the identification data corresponding to the data record is set as uncertain.
[0029] Specifically, the analysis module generates a record table to determine whether two words in a plurality of word groups are identical, in S311, for each word group obtained from the specialized file, the analysis module records two words in the word group, a plurality of first same degrees corresponding to the two words, a second same degree corresponding to the two words, and a third same degree corresponding to the two words into a data record of the record table in turn, it is to be noted that the data record corresponds to an identification data, and an initial value of the identification data is empty. In S312, for each data record of the record table, the analysis module checks whether the two words in the data record appear in the corresponding table at the same time, the two words appearing in the corresponding table at the same time means that the two words appear in a data record of the corresponding table at the same time, if yes, the identification data corresponding to the data record is set as identical, if no, the analysis module continues to check whether the two words in the data record appear in the corresponding table respectively, the two words appearing in the corresponding table respectively means that the two words appear in two different data records of the corresponding table, if no, that is, at least one word does not appear in any data record of the corresponding table, the identification data corresponding to the data record is set as uncertain.
[0030] Further, the analysis module generates a record table to determine whether two words in a plurality of word groups are identical, and further includes the following steps: S321, the analysis module extracts a same number of data records with identical corresponding identification data and data records with non-identical corresponding identification data from the record table; S322, for each data record extracted, the analysis module generates practice data using a plurality of first same degrees, a second same degree, a third same degree in the data record, and the identification data corresponding to the data record, and the analysis module uses all the practice data to practice generating an analysis model; S323, for each data record of the record table with uncertain corresponding identification data, the analysis module inputs a plurality of first same degrees, a second same degree, a third same degree in the data record into the analysis model, and adjusts the identification data corresponding to the data record based on an output result of the analysis model.
[0031] Specifically, the analysis module generates a record table and determines whether two words or phrases in several word groups are equivalent. In S321, the analysis module extracts the same number of data records whose corresponding label data is equivalent and data records whose corresponding label data is not equivalent from the record table. In S322, for each extracted data record, the analysis module uses several first similarity scores, one second similarity score, and one third similarity score from the data record, along with the corresponding label data, to generate practice data. The first similarity scores, one second similarity score, and one third similarity score correspond to the data portion of the practice data, and the label data corresponding to the data record corresponds to the label portion of the practice data. Thus, the analysis module can use all the practice data to train and generate an analysis model, which can be a k-NN model. In S323, the corresponding identifier data for the record table is uncertain for each data record. Several first similarity, one second similarity, and one third similarity in the data record are input into the analysis model. The identifier data corresponding to the data record is adjusted based on the output result of the analysis model. If the output result of the analysis model is equal, then the identifier data is set to equal; if the output result of the analysis model is not equal, then the identifier data is set to not equal.
[0032] According to another aspect of the embodiments of this application, reference is made to... Figure 2 As shown, this application also provides a knowledge graph-based nursing plan generation system, including a preparation module, a practice module, and an analysis module, to implement the knowledge graph-based nursing plan generation method described above. The functions of each module are as follows: The preparation module is used to acquire historical knowledge graphs, extract several entity combinations from the historical knowledge graphs, as well as the relationships corresponding to the several entity combinations, and use each entity combination and its corresponding relationship to generate different practice data. The practice module is used to practice generating a classification model using all the practice data; The analysis module is configured to acquire a special file, determine different word phrases in the special file, use the different word phrases to form a plurality of word phrase groups, for each word phrase group, perform division processing on two word phrases in the word phrase group to calculate a plurality of first same degrees corresponding to the two word phrases, calculate a second same degree corresponding to the two word phrases based on file environments in which the two word phrases are respectively located, calculate a third same degree corresponding to the two word phrases based on a plurality of words included in the two word phrases, and generate a record table, respectively judge whether two word phrases in the plurality of word phrase groups are identical, perform merging processing on the plurality of word phrase groups, perform pairwise combination on all word phrase groups after the merging processing, sequentially input combinations of different word phrase groups into a classification model, establish a knowledge graph according to a plurality of classification results output by the classification model, and generate a nursing scheme from the knowledge graph.
[0033] According to another aspect of the embodiments of the present application, a storage medium is also provided, which stores program instructions, wherein the program instructions, when executed, control a device in which the storage medium is located to perform any one of the methods described above.
[0034] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, the system and the unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0035] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0036] The above-described embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the technical solutions thereof; even though the foregoing embodiments of the present application have been described in detail, those skilled in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to 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 application.
Claims
1. A knowledge graph-based nursing plan generation method, characterized in that, The method includes the following steps: S1. The preparation module obtains the historical knowledge graph, extracts several entity combinations and their corresponding relationships from the historical knowledge graph, uses each entity combination and its corresponding relationship to generate different practice data, and the practice module uses all the practice data to practice and generate a classification model. S2. The analysis module obtains a special file, identifies different words and phrases in the special file, and uses the different words and phrases to form several word and phrase groups. For each word and phrase group, the two words and phrases in the word and phrase group are divided and processed to calculate several first similarity scores corresponding to the two words and phrases. The second similarity scores corresponding to the two words and phrases are calculated based on the file environment in which the two words and phrases in the word and phrase group are located. The third similarity scores corresponding to the two words and phrases are calculated based on several words contained in the two words and phrases in the word and phrase group. S3. The analysis module generates a record table, determines whether two words in several word groups are equivalent, merges several word groups, combines all the merged word groups in pairs, inputs the different word group combinations into the classification model, establishes a knowledge graph based on several classification results output by the classification model, and generates a nursing plan from the knowledge graph.
2. The method of claim 1, wherein, The analysis module stores a corresponding table in advance, which includes several data records, each containing two equivalent phrases.
3. The method of claim 2, wherein, The analysis module divides the two phrases in the phrase group separately to calculate several first similarity scores for the two phrases, including the following steps: S211. For each word or phrase in the corresponding table, the analysis module divides the word or phrase into several semantic units, and the analysis module sorts all the semantic units in the corresponding table according to the order of the frequency of occurrence from most to least, and selects several semantic units with the highest order. S212. The analysis module divides the two words in the word and sentence group into different semantic units according to the selected semantic units, and combines them in pairs for all the semantic units corresponding to the word and sentence group. S213. For each semantic unit group corresponding to the word and sentence group, first calculate the first number of times the two semantic units in the semantic unit group appear simultaneously in the corresponding table, and the second and third times the two semantic units in the semantic unit group appear in the corresponding table respectively. Then, divide the first number by the product of the second and third numbers to obtain the first similarity.
4. The method of claim 3, wherein, The analysis module calculates the second similarity between two phrases based on the file environments in which they reside, including the following steps: S221. The analysis module obtains the occurrence count of each word around the two phrases in the phrase group in a special file, deletes duplicate words in all words corresponding to the two phrases, and generates representative quantities corresponding to the two phrases respectively. S222. Regarding the representative quantity corresponding to each word / phrase, the analysis module multiplies the different representative values in the representative quantity by their respective weights, and the analysis module calculates the cosine similarity between the representative quantities corresponding to the two words / phrases as the second similarity between the two words / phrases.
5. The method of claim 4, wherein, The analysis module calculates third identical degrees corresponding to the two phrases in the phrase group based on a number of words contained in the two phrases respectively, including the following steps: S231, for each phrase in the phrase group, the analysis module divides the phrase into a number of words, and the analysis module counts the number of identical words appearing in the two phrases simultaneously; S232, for each phrase in the phrase group, the analysis module calculates the ratio of the number of identical words to the total number of words in the phrase, and the analysis module calculates the comprehensive value of the ratio corresponding to the two phrases respectively using a weighting method as the third identical degrees corresponding to the two phrases.
6. The method of claim 5, wherein, The analysis module generates a record table to determine whether two phrases in a number of phrase groups are identical respectively, including the following steps: S311, for each phrase group obtained from the specialized file, the analysis module records the two phrases in the phrase group, the first identical degrees corresponding to the two phrases, the second identical degrees corresponding to the two phrases, and the third identical degrees corresponding to the two phrases into a data record of the record table in turn; S312, for each data record of the record table, the analysis module checks whether the two phrases in the data record appear in the corresponding table simultaneously, in the case of yes, sets the identification data corresponding to the data record as identical, in the case of no, continues to check whether the two phrases in the data record appear in the corresponding table respectively, in the case of yes, sets the identification data corresponding to the data record as not identical, in the case of no, sets the identification data corresponding to the data record as uncertain.
7. The method of claim 6, wherein, The analysis module generates a record table to determine whether two phrases in a number of phrase groups are identical respectively, and further includes the following steps: S321, the analysis module extracts the data records with the same number of corresponding identification data as identical and the data records with corresponding identification data as not identical from the record table; S322, for each data record extracted, the analysis module generates practice data using the first identical degrees, the second identical degrees, the third identical degrees in the data record, and the identification data corresponding to the data record, and the analysis module practices generating an analysis model using all the practice data; S323, for each data record of the record table with corresponding identification data as uncertain, input the first identical degrees, the second identical degrees, and the third identical degrees in the data record into the analysis model, and adjust the identification data corresponding to the data record based on the output result of the analysis model.
8. A knowledge graph-based care plan generation system for implementing the method of any one of claims 1 to 7, characterized in that, It includes the following modules: A preparation module is configured to obtain a historical knowledge graph, extract a number of entity combinations and a number of contacts corresponding to the entity combinations from the historical knowledge graph, and generate different practice data using each entity combination and the contact corresponding to each entity combination; A practice module is configured to practice generating a classification model using all the practice data; An analysis module is configured to acquire a special file, determine different word phrases in the special file, use the different word phrases to form a plurality of word phrase groups, for each word phrase group, perform division processing on two word phrases in the word phrase group to calculate a plurality of first same degrees corresponding to the two word phrases, calculate a second same degree corresponding to the two word phrases based on file environments in which the two word phrases are respectively located, calculate a third same degree corresponding to the two word phrases based on a plurality of words contained in the two word phrases respectively, generate a record table, respectively judge whether two word phrases in the plurality of word phrase groups are identical, perform merging processing on the plurality of word phrase groups, perform pairwise combination on all word phrase groups after the merging processing, sequentially input combinations of different word phrase groups into a classification model, establish a knowledge graph according to a plurality of classification results output by the classification model, and generate a nursing scheme from the knowledge graph.
9. A storage medium, characterized by The storage medium stores program instructions, wherein the program instructions control a device in which the storage medium is located to perform the method in any one of claims 1 to 7 when the program instructions are executed.
Citation Information
Patent Citations
Pet nursing scheme generation method and device, computer equipment and storage medium
CN115309955A