Similarity-based medical and health care service demand classification method

By using a similarity-based classification method for medical, health, and elderly care service needs, and extracting semantic vectors using BERT and GSDMM models to construct a support vector machine, the problem of integrating medical, health, and elderly care service resources is solved, enabling accurate classification of elderly users' needs and personalized service provision.

CN116933164BActive Publication Date: 2026-01-06HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310918638.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2026-01-06
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

Traditional elderly care methods face difficulties in integrating cross-network and cross-domain service resources, and the medical, rehabilitation and elderly care systems are separated and disconnected, making it difficult to provide efficient service capabilities. Furthermore, the elderly care service ecosystem cannot develop sustainably and healthily, and it cannot meet the personalized and diversified needs of elderly users.

Method used

A similarity-based classification method for medical, health, and elderly care service needs is adopted. The global semantic vector is extracted by the BERT model, the topic semantic vector is extracted by the GSDMM model, and the nonlinear classification is performed by the support vector machine. A comprehensive semantic vector is constructed to calculate similarity and achieve accurate classification of user needs.

Benefits of technology

This improves the accuracy of the medical and health care service platform's understanding of user needs, enhances the accuracy of similarity calculation and classification, and helps to provide more targeted and personalized service solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116933164B_ABST
    Figure CN116933164B_ABST
Patent Text Reader

Abstract

The application discloses a medical health service demand classification method based on similarity, and comprises the following steps: step one, data preprocessing; step two, training a global semantic vector; step three, training a word vector; step four, calculating a function semantic weight FunSemWeight; step five, keyword extraction; step six, training a theme semantic vector; step seven, calculating similarity and selecting a kernel function; and step eight, constructing a support vector machine classifier. When the similarity is calculated, the understanding of user demand is improved through more accurate semantic vector representation, the theme semantic vector is combined on the basis of the global semantic vector, theme information is supplemented, the recognition ability for a specific field is improved, and the accuracy of similarity calculation is improved, so that classification is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information technology and relates to a service demand classification algorithm for the integration of medical care, rehabilitation and elderly care. Specifically, it relates to a method for classifying user service demands in order to achieve demand pattern reuse for a universally accessible integrated medical care, rehabilitation and elderly care service platform. Background Technology

[0002] Traditional elderly care methods struggle to provide efficient services due to difficulties in integrating cross-network and cross-domain service resources and the disconnect between medical, rehabilitation, and elderly care systems. Therefore, open medical, rehabilitation, and elderly care service resource aggregation platforms based on "Internet+" technology have emerged. These platforms leverage intelligent means, such as integrating resources from multiple parties, to meet the diverse, differentiated, and personalized needs of the elderly, helping to solve problems in the medical, rehabilitation, and elderly care field such as data silos, insufficient service delivery capabilities, and poor integration capabilities.

[0003] The "Requirements + Engineering" two-stage software service engineering paradigm (RE2SEP) is a new paradigm for solving the problem of service requirement classification based on big data and a large service ecosystem. It includes two new methods: Service-Oriented Requirements Engineering (SORE) and Domain-Oriented Service Engineering (DOSE). The SORE architecture extracts requirement patterns by analyzing personalized user requirement data, and matches personalized solutions with customer needs to achieve customer satisfaction and value creation.

[0004] One way to record user needs is through text information, and voice-based demand descriptions can also be easily converted into text information using existing technologies. Therefore, solving the user demand classification problem can be transformed into solving the problem of classifying short Chinese texts containing service characteristics. In text classification, natural language processing (NLP) plays a key role.

[0005] Jieba is an open-source Python-based Chinese word segmentation tool that can perform simple word segmentation, parallel word segmentation, keyword extraction, and part-of-speech tagging. Baidu Stop Word List is a relatively complete Chinese stop word list, containing common stop words in sentences that are irrelevant to the core meaning of the text. BERT is a Transformer model that encodes the entire input sequence and outputs context-dependent embeddings, including pre-training and fine-tuning stages. The pre-training stage includes two tasks: masked language modeling (MLM) and next sentence prediction (NSP). Treating text as a sequence of tokens, BertTokenizer slices Chinese characters, symbols, and numbers into individual tokens, concatenating them into a single sequence, and adding a marker symbol to each element. [CLS] represents a specific category token inserted at the beginning of each sequence, and [SEP] is inserted at the end to segment each sentence. Word2Vec is a word embedding technique that uses deep neural networks to train text. Text words are input into the model to obtain their corresponding word vectors, resulting in coordinate vectors containing semantic features.

[0006] When extracting keywords, the frequency of words in text is often considered. Therefore, Term Frequency-Inverse Document Frequency (TF-IDF) can assess the importance of a word to a text in a corpus. TF represents the frequency of a word in the text, and IDF represents the prevalence of the word. Topic models use statistical and inference methods to mine potential topics from text. A commonly used method is GSDMM—an unsupervised text clustering model that can discover potential topics and cluster structures, extracting topic information from text without labeled data.

[0007] Similarity is also widely used in text classification. Its principle is to determine the degree of similarity between two or more objects by comparing their features. Text similarity measures the similarity between texts as similarity values ​​between text feature vectors. Therefore, this method first represents text as numerical vectors and calculates similarity indices between texts, thus classifying the texts by labeling the similarity of the text data.

[0008] Support Vector Machines (SVMs) are a text classification model technique that uses a classifier to map a piece of text to one or more categories. A major advantage of SVMs as classifiers is the introduction of kernel functions to solve nonlinear classification problems, mapping a linearly inseparable space to a high-dimensional linearly separable space. Commonly used kernel functions include linear kernel functions, polynomial kernel functions, and radial basis function kernel functions; the choice of kernel function depends on the specific situation. Furthermore, SVMs can obtain a globally optimal solution and avoid getting trapped in local optima.

[0009] Because the medical and healthcare field demands high semantic accuracy, a clear understanding of user needs is crucial for demand classification and the implementation of personalized diagnostic policies. Therefore, improving the semantic accuracy of text classification is a key aspect of enhancing the platform's integration and overall effectiveness. Designing a semantic expression method that integrates global and thematic features can improve the ability to identify specific domains and enhance the accuracy of similarity calculations. Summary of the Invention

[0010] In response to the increasingly diverse and personalized service needs of the elderly, and the resulting inability of the elderly care service ecosystem to develop sustainably, there is an urgent need for an inclusive integrated medical, health, and elderly care ecosystem. To address how to provide personalized, high-quality services to elderly users, this invention proposes a similarity-based classification method for medical, health, and elderly care service needs. This method categorizes service needs based on the textual expressions of elderly users' requirements. Using textual data collected from an online integrated medical, health, and elderly care service platform as a foundation, this method analyzes user data characteristics to accurately locate user needs, calculates the similarity between needs, and then classifies them into different categories. By improving the accuracy of semantic recognition of needs, this method facilitates more accurate similarity calculation and category classification.

[0011] The objective of this invention is achieved through the following technical solution:

[0012] A method for classifying medical, health, and elderly care service needs based on similarity includes the following steps:

[0013] Step 1: Data Preprocessing

[0014] The data on the needs of the elderly user service platform is cleaned and filtered. The cleaning operation mainly removes duplicates and data with non-Simplified Chinese text descriptions. The filtering operation includes noise filtering, removing descriptive data that does not belong to the chronic diseases of elderly users, and obtaining data documents.

[0015] Step 2: Train the global semantic vector:

[0016] The descriptive text set in data document d is {t1, t2, ..., t...} i , ..., t N There are N samples in total, t i Let represent the i-th sample. For each sample, convert it into a word embedding form as model input. Use the BERT model to extract global semantic features to obtain a global semantic vector. The set of global semantic vectors is {vec}. a,1 vec a,2 , ..., vec a,i , ..., vec a,N}, vec a,i Corresponding to the i-th sample t iThe semantic vectors are N vectors in total. The specific steps are as follows:

[0017] Step Two: 1. Use a descriptive text t i As a sample, the sample is treated as a token sequence. Each Chinese character, symbol, and number in the Chinese text is sliced ​​into a token. [CLS] and [SEP] tokens are added at the beginning and end of the sentence, respectively. The entire input token sequence is encoded to obtain a context-dependent embedding representation.

[0018] Step 22: Input the word embedding representation into the MLM pre-training task for training. After training, use the output of the last layer of the [CLS] character representation to generate the semantic vector vec. a,i ;

[0019] Steps 2 and 3: Repeat steps 2 and 2 to obtain the global semantic vector set {vec} for the entire document. a,1 vec a,2 , ..., vec a,i , ..., vec a,N};

[0020] Step 3: Train word vectors:

[0021] The description text t in data document d i As samples, the samples are sequentially processed through word segmentation, stop word removal, part-of-speech tagging, and word vector training before calculating the functional semantic weight value of each word. The specific steps are as follows:

[0022] Step 3.1: Process the preprocessed description text t i Using the jieba tool, word segmentation was performed to obtain a word set {w1, w2, ..., w...} m , ..., w p}, where w m It is the m-th word, and p is t. i The number of words included; the word set was reduced by comparing it with the Baidu stop word list, and redundant word information was removed to obtain a new word set {w1, w2, ..., w...}. n , ..., w q}, where q is the number of words retained after removing stop words, the part-of-speech tagging set corresponding to the new word set is {Flag1, Flag2, ..., Flag}. n , ..., Flag q}, that is, w n The corresponding part-of-speech tag is Flag. n ;

[0023] Step 3.2: Perform the same steps as in Step 3.1 on all text in data document d to obtain the word set {w1, w2, ..., w...} after removing stop words. z The corresponding part-of-speech tag set is {Flag1, Flag2, ..., Flag}. z}, where z represents the number of all unique words included in the processed document;

[0024] Step 3: To facilitate similarity calculation by vectorizing text information, each word corresponds to a vector point in the space. All words in the document are one-hot encoded and used as input to the Word2Vec model. After training the language model, the set of word vectors corresponding to all words is obtained as {WordVec1, WordVec2, ..., WordVec...} z};

[0025] Step 4: Calculate the functional semantic weight (FunSemWeight):

[0026] Take a descriptive text t from data document d i As a sample, context weight, part-of-speech weight, and word frequency weight were considered when calculating the functional semantic weight. The specific steps are as follows:

[0027] Step 4.1 Semantic Similarity SemSim(w n w l The context weight SimWeight is represented by the cosine similarity between the word vectors of two words. n , t i t is the sum of the cosine similarities between a given word and all other words in the text. i For sample text, w n w l Indicates t i The nth and lth words in the text;

[0028] Step 4.2: Focus on parts of speech – nouns, verbs, and adjectives. The parts of speech have already been tagged during word segmentation. For the word w... n Select appropriate weights to assign to FalgWeight n ;

[0029] Step 4.3, Word w n FreWeight n Represented by the calculated TF-IDF value;

[0030] Step Four: Words and Phrases n Functional semantic weight (FunSemWeight) nSimWeight (w) is determined by context weight. n , t i Part-of-speech weight (FlagWeight) n FreWeight n Multiplying them together yields the result.

[0031] Step 5: Keyword Extraction

[0032] For the description text t i All words are sorted according to their functional semantic weight values, and the k words with the highest weights are selected as the keywords of the text. The specific steps are as follows:

[0033] Step 51: Analyze the description text t i After step three, the complete words {w1, w2, ..., w} are processed by word segmentation. n , ..., w q Repeat steps four through four to obtain the functional semantic weight set corresponding to the word set: {FunSemWeight1, FunSemWeight2, ..., FunSemWeight} n , ..., FunSemWeight q};

[0034] Step 5.2: Sort the weight values ​​in the functional semantic weight set and select the k words with the largest weights. The value of k is determined by multiplying the number of words in the text by the keyword retention ratio. (Text t) i The extracted keyword set is {w1, w2, ..., w k};

[0035] Step 6: Train topic semantic vectors:

[0036] From step five, we obtain the keywords for all text in data document d. Then, we use the GSDMM topic model to analyze the descriptive text t. i The keywords are used to perform topic semantic summarization, resulting in the topic semantic vector vec corresponding to the text. b,i The set of topic semantic vectors is {vec b,1 vec b,2 , ..., vec b,i , ..., vec b,N There are N vectors in total;

[0037] Step 7: Calculate similarity and select kernel function:

[0038] The global semantic vector set {vec} obtained in step two a,1 vec a,2 , ..., vec a,N} and the set of topic semantic vectors obtained in step six {vec b,1 vec b,2 , ..., vec b,N} concatenate the corresponding vectors to obtain the comprehensive semantic vector set {vec a,1 vec b,1 vec a,2 vec b,2 ,......,vec a,N vec b,N In a support vector machine (SVM), a vector corresponds to a point in the sample space. Points that are close to each other represent semantic similarity. Similarity is measured by the Euclidean distance between two samples; the closer the distance, the greater the similarity. The Euclidean distance formula is d(x1, x2) = ||x1 - x2||, where x1 and x2 represent two vector samples. The radial basis function (RBF) is used in SVM to select features and construct samples to solve nonlinear classification problems. The formula for the radial basis function is... ||x1-x2|| is the Euclidean distance between the two samples, and γ is a parameter;

[0039] Step 8: Construct a Support Vector Machine classifier:

[0040] Using radial basis functions as kernel functions, samples are nonlinearly mapped in the feature space. Through multiple training iterations, the model parameters are adjusted to obtain the optimal support vector machine for classifying user service needs.

[0041] Compared with the prior art, the present invention has the following advantages:

[0042] 1. This invention proposes a service demand classification method based on similarity, based on the characteristics of data in online medical and elderly care service platforms. This method utilizes natural language processing technology to process user demand descriptions, categorizing personalized and diverse user service needs into groups with similar user groups within the same category. This service demand classification method not only categorizes users but also lays the foundation for subsequent model definition and personalized recommendations, enabling elderly care service platforms to provide more targeted solutions to users.

[0043] 2. When performing similarity calculation, this invention improves the understanding of user needs by using more accurate semantic vector representation. By combining topic semantic vectors with global semantic vectors to supplement topic information, it is beneficial to improve the recognition ability of specific fields, thereby improving the accuracy of similarity calculation and thus more accurate classification. Attached Figure Description

[0044] Figure 1 This demonstrates the application scenarios of a similarity-based classification method for medical, health, and elderly care service needs.

[0045] Figure 2 This provides a solution for a similarity-based classification method for medical, health, and elderly care service needs.

[0046] Figure 3 This is part of the global semantic vector in the example;

[0047] Figure 4 This is part of the topic semantic vector in the example;

[0048] Figure 5 To provide a visual representation of the classification results. Detailed Implementation

[0049] The technical solution of the present invention will be further described below with reference to the accompanying drawings, but it is not limited thereto. Any modifications or equivalent substitutions to the technical solution of the present invention that do not depart from the spirit and scope of the technical solution of the present invention should be covered within the protection scope of the present invention.

[0050] To more clearly illustrate the specific implementation method of this invention, some related concepts and calculation formulas are first described:

[0051] The global semantic vector is a representation vector obtained by extracting the global semantic features of the text. The topic semantic vector is a representation vector obtained by extracting the topic information features of the text. The comprehensive semantic vector is a representation vector obtained by fusing global semantic and topic features.

[0052] The integrated medical, health, and elderly care service platform contains a large amount of user information data, including users' verbal descriptions of the services they require (Text). The collection of all users' descriptive texts constitutes a document (Doc).

[0053] Text is composed of words. The set of words in a single text after stop word removal is {Word1, Word2, ..., Word...}. i Word n Word i This represents the i-th word in the text, and the word vector set is {v1, v2, ..., v...} i , ..., v n}, v i Let i represent the word vector corresponding to the i-th word. The semantic similarity between two words is represented by the cosine similarity between their word vectors, and the similarity function is: w i and w j These are two words in the text. and This is the corresponding word vector. (Word w) i The contextual similarity function in the text is

[0054] FreWeight (w) i Text and Doc are represented by TF-IDF values, TF i,j Indicates the frequency of word occurrence. n i,j The word w i In the text j The frequency of occurrence of a word; IDF represents the prevalence of a word. |D| represents the total number of texts, |j:w i ∈Text j | Indicates the word w i The number of texts, TF-IDF is obtained by multiplying the TF and IDF values.

[0055] Part-of-speech weight FlagWeight(w i (Text) Consider assigning different weights to different parts of speech according to specific actual needs, and summing all weights to get 1.

[0056] When extracting keywords from text, the functional semantic weight values ​​are ranked. In the text `Text`, for the word `w`... i The functional semantic weight is FunSemWeight(w i Text) = Sim(w i Text)*FreWeight(w i ,Text,Doc)*FlagWeight(w i (Text).

[0057] The final set of vectors representing all service requirements is {x1, x2, ..., x...} j , ..., x m}, x j Let represent the vector corresponding to the j-th sample text. There are m texts as samples for the requirement description. When constructing the support vector machine, the radial basis function is chosen as the kernel function. The formula for the radial basis function is: ||x1-x2|| represents the Euclidean distance between the two samples, and γ is a parameter.

[0058] This invention addresses the chronic disease service needs of elderly users by primarily considering seven departments—dermatology, cardiology, gastroenterology, respiratory medicine, endocrinology, neurology, and ophthalmology / otolaryngology—as classification labels. These are numbered sequentially from 1 to 7, and after processing by a classifier, category labels are obtained, corresponding categories are derived, and classification is completed.

[0059] This invention provides a service demand classification method based on similarity. It takes the integrated medical, healthcare, and elderly care service ecosystem as its background and uses various user demand descriptions recorded on online service platforms as its foundation. The method accurately expresses the users' textual descriptions using semantic vectors. Starting with global features, a global semantic vector is obtained by training a BERT model. Starting with topic features, keywords are extracted from the text, and a topic semantic vector is obtained by training a GSDMM model. The global and topic semantic vectors are combined to obtain a comprehensive semantic vector. Similarity calculations are performed based on these vector values, and the result is input into a classifier to classify service demands. The specific implementation steps are as follows:

[0060] (1) Data preprocessing. The event data stored in the online service platform is cleaned, filtered, and labeled with category tags to obtain a set of descriptive texts. The cleaning operation mainly removes the data that does not match the situation of the elderly, as this part is irrelevant to the application scenario of the method; the filtering operation includes filtering out overly verbose data to avoid affecting the efficiency of the method; the categories are labeled with numbers 1-7 according to the seven department names, and all the descriptive texts in the platform form a requirements document.

[0061] (2) Training the global semantic vector. Using a single text element (Text) from the data document (Doc) as a sample, treat the sample as a token sequence. For each Chinese character, symbol, and number in the text, it is sliced ​​into a token. [CLS] and [SEP] tokens are added at the beginning and end of the sentence, respectively. The entire input token sequence is encoded to obtain a context-dependent embedding representation. This word embedding representation is then used in the masked language modeling pre-training task for training, extracting global semantic features. After training, the semantic vector vec is represented by the output of the last layer of the [CLS] character. a,i For the entire document, we obtain a global semantic vector set {vec}. a,1 vec a,2 , ..., vec a,N}, where N is the number of sample texts.

[0062] (3) Train word vectors. Each individual text text (Text) in the data document Doc is used as a sample, and word segmentation is performed using the jieba tool to obtain a word set {Word1, Word2, ..., Word...}. p}, where p is the number of words in the text Text. The word set is then modified by referring to Baidu's stop word list, removing redundant word information to obtain a new word set {Word1, Word2, ..., Word...}. q}, where q is the number of words retained after removing stop words, Word iThe corresponding part-of-speech tag is Flag. i Perform the above operations on all text in the document to obtain a word set {Word1, Word2, ..., Word...} after removing stop words. z The corresponding part-of-speech tag set is {Flag1, Flag2, ..., Flag}. z}, where z represents the number of all unique words included in the processed document. To facilitate similarity calculation by vectorizing text information, each word corresponds to a vector point in the space. All words in the document are one-hot encoded and used as input to the Word2Vec model. After training the language model, the set of word vectors corresponding to all words is obtained {v1, v2, ..., v}. z}

[0063] (4) Calculate the functional semantic weight FunSemWeight. Using a text element (Text) from the document (Doc) as a sample, calculate the semantic similarity (w) of the text element (Text). i w j The context weight SimWeight is represented by the cosine similarity between the word vectors of two words. i (Text) is the sum of the semantic similarities between a given word and other words in the text, where Text is the sample text, and w i w j This represents the words i and j in the Text; the part-of-speech tagging focuses on nouns, verbs, and adjectives, which have already been completed during word segmentation. An appropriate weight is then assigned to FalgWeight(w). i (Text, Doc) i FreWeight i The TF-IDF value obtained from the calculation represents the functional semantic weight of each word; the formula for calculating the functional semantic weight of each word is FunSemWeight(w i Text) = Sim(w i Text)*FreWeight(w i ,Text,Doc)*FlagWeight(w i (Text).

[0064] (5) Keyword Extraction. For each text in the document, the obtained weight values ​​are sorted, and the k words with the highest weights are selected, k = l * word_percent, where l represents the length of words contained in the text, and word_percent represents the keyword extraction ratio. The set of words retained after keyword extraction from the text is {Word1, Word2, ..., Word...}. k}

[0065] (6) Training topic semantic vectors. For each text (Text), the set of words extracted is used to perform topic semantic summarization on the keywords of each text using the GSDMM topic model, resulting in the topic semantic vector (vec) corresponding to the text. b,i For the entire text, we obtain the set of topic semantic vectors {vec b,1 vec b,2 , ......, vec b,N There are N samples in total.

[0066] (7) Select a kernel function based on similarity. The global semantic vector set {vec} a,1 vec a,2 , ..., vec a,N} and topic semantic vector set {vec b,1 vec b,2 , ..., vec b,N} concatenate the corresponding vectors to obtain the comprehensive semantic vector set {vec a,1 vec b,1 vec a,2 vec b,2 , ......, vec a,N vec b,N In a support vector machine (SVM), a vector corresponds to a point in the sample space. Points that are close to each other represent semantic similarity. Similarity is measured by the Euclidean distance between two samples; the closer the distance, the greater the similarity. The Euclidean distance formula is d(x1, x2) = ||x1 - x2||, where x1 and x2 represent two vector samples. The radial basis function (RBF) is used in SVM to select features and construct samples to solve nonlinear classification problems.

[0067] (8) Construct a support vector machine classifier. Using the radial basis function as the kernel function, perform nonlinear mapping on the samples in the feature space, and adjust the model parameters through multiple training iterations to obtain the optimal classifier to classify user service needs.

[0068] In the above steps, (2) and (3), (4), (5), and (6) are executed in parallel.

[0069] The specific algorithm description of the entire method's execution process is shown in Table 1:

[0070] Table 1

[0071]

[0072]

[0073] Example:

[0074] This embodiment uses user demand description text data from an online platform integrating medical care, rehabilitation, and elderly care services as a sample. Since the platform stores tens of millions of data points, data preprocessing is not the focus of this invention. The main approach is to use a set of text data describing an elderly user's needs regarding chronic diseases as an example to verify the subsequent steps of this invention. The data sample is shown in Table 2:

[0075] Table 2

[0076]

[0077]

[0078]

[0079] When analyzing the needs of elderly users, it is necessary to consider the characteristics of their needs. Verbal records or expressions are a direct description of their needs. The needs of elderly users can be classified by transforming them into text classifications related to the needs of the elderly.

[0080] Users in the same category have strong similarities in chronic disease care. For example, the result of the classifier outputting a category label of 2 indicates that these users belong to the cardiology department, and this user group may all have cardiovascular and cerebrovascular diseases.

[0081] The detailed steps are as follows:

[0082] Step 1: Clean, filter, and label the raw data to obtain a text collection.

[0083] Step 2: Train the global semantic vector. The text (Text) from the data document (Doc) is encoded as a sequence of tokens to obtain a context-dependent embedding representation. This word embedding is then used in the MLM pre-training task for training. After training, the final layer output using the [CLS] notation represents the global semantic vector (vec). a,i For the entire document, we obtain a global semantic vector set {vec}. a,1 vec a,2 , ..., vec a,N The resulting global semantic vector is as follows: Figure 3 As shown.

[0084] Step 3: Train word vectors. Each individual text element (Text) in the data document (Doc) is used as a sample. Jieba is used for word segmentation and part-of-speech tagging. Stop words are removed by referring to the Baidu stop word list. The set of all words contained in the document is {Word1, Word2, ..., Word...}. zTo facilitate similarity calculation by vectorizing text information, all words in the document are one-hot encoded and used as input to the Word2Vec model. After training the language model, a set of word vectors {v1, v2, ..., v} corresponding to all words is obtained. z}

[0085] Step 4: Calculate the functional semantic weight (FunSemWeight). The functional semantic weight of a word in a single text within a document is obtained by multiplying the contextual similarity, word frequency weight, and part-of-speech weight.

[0086] Step 5: Keyword Extraction. For each text in the document, sort the obtained weight values ​​and select the k words with the highest weights. The set of words retained after extracting keywords from the text is {Word1, Word2, ..., Word...} k}

[0087] Step 6: Train topic semantic vectors. For each text (Text), the set of words extracted is used to train a topic semantic vector (vec) using the GSDMM topic model. b,i For the entire text, we obtain the set of topic semantic vectors {vec b,1 vecb ,2 , ......, vec b,N The resulting topic semantic vector is as follows: Figure 4 As shown.

[0088] Step 7: Calculate similarity and select kernel function. Based on the global semantic vector and topic semantic vector obtained in Steps 2 and 6, the two vectors are concatenated to obtain the comprehensive semantic vector. The Euclidean distance is used to measure the similarity between the vectors, and the radial basis function is selected as the kernel function of the classifier.

[0089] Step 8: Construct a Support Vector Machine (SVM) classifier. Perform a non-linear mapping of the samples in the feature space, train the SVM to classify user service requests, and obtain the classification results as follows: Figure 5 As shown.

Claims

1.A medical health and wellness service demand classification method based on similarity, characterized in that The method comprises the following steps: Step one, data preprocessing: The demand data of the old user service platform is cleaned and filtered; Step two, training global semantic vector: The collection of description texts in the data document d is {t1, t2, …, t i , …, t N}, and there are N samples, t i represents the i-th sample, and each sample is converted into a word embedding form as a model input. A global semantic feature is extracted by using a Bert model to obtain a global semantic vector. The collection of global semantic vectors is {vec a,1 , vec a,2 , …, vec a,i , …, vec a,N}, and vec a,i corresponds to the semantic vector of the i-th sample t i , and there are N vectors. Step three, training word vector: The description text t in the data document d is segmented into a plurality of words w i As a sample, the function semantic weight value of each word is calculated after the sample is sequentially processed by word segmentation, stop word removal, part-of-speech tagging, and word vector training. Step four, calculating function semantic weight FunSemWeight: extracting a description text t from a data document d i As a sample, the context weight, the part-of-speech weight and the word frequency weight are considered when calculating the functional semantic weight. Step five, keyword extraction: All words in the description text t i are sorted in order of the functional semantic weight value size, and the k words with the largest weight values are selected as the keywords of the text. Step six, training topic semantic vector: Get the keywords of all texts in data document d from step five, and use GSDMM topic model to make topic semantic summarization on the keywords of text t i , and get the topic semantic vector vec b,i corresponding to the text, and the set of topic semantic vectors is {vec b,1 ,vec b,2 ,…,vec b,i ,…,vec b,N}, with a total of N vectors; Step seven, calculating similarity and selecting kernel function: The global semantic vector set {vec a,1 ,vec a,2 ,…,vec a,N} obtained in step two and the subject semantic vector set {vec b,1 ,vec b,2 ,…,vec b,N} obtained in step six are subjected to corresponding vector splicing to obtain a comprehensive semantic vector set {vec a,1 :vec b,1 ,vec a,2 :vec b,2 ,……,vec a,N :vec b,N}, one vector corresponding to one point in the sample space, and points close to each other represent the similarity of semantics, and the similarity is measured by the Euclidean distance between two samples; a radial basis kernel function is used in the support vector machine to select features and construct samples to solve the nonlinear classification problem; Step eight, building support vector machine classifier: With radial basis function as kernel function, the sample is nonlinearly mapped in feature space, the model parameters are adjusted for multiple times, and the optimal support vector machine is obtained to classify the user service demand. 2.The medical and health service demand classification method based on similarity according to claim 1, characterized in that In step one, the cleaning operation removes duplicates and removes data expressed in non-simplified Chinese text; the filtering operation includes noise filtering, removing data describing chronic diseases of old users, and obtaining data documents. 3.The medical and health service demand classification method based on similarity according to claim 1, characterized in that The specific steps of step two are as follows: Step two one, with a description of the text t i As a sample, the sample is taken as a token sequence. For Chinese text, each Chinese character, symbol, and number is sliced into a token. [CLS] and [SEP] tokens are added at the beginning and end of the sentence, respectively. The entire input token sequence is encoded to obtain context-related embedding representation. Step two, the word embedding representation is input into the MLM pre-training task for training, and after the training is completed, the output representation of the last layer of the [CLS] character is used to represent the semantic vector vec a,i ; Steps 2 and 3: Repeat steps 2 and 2 to obtain the global semantic vector set {vec} for the entire document. a,1 ,vec a,2 ,…,vec a,i ,…,vec a,N } 4.The medical and health service demand classification method based on similarity according to claim 1, characterized in that The specific steps of step three are as follows: Step 3.1: Process the preprocessed description text t i Using the jieba tool, word segmentation was performed to obtain a word set {w1, w2, ..., w m ,…,w p }, where w m It is the m-th word, and p is t. i The number of words contained; By comparing the word set with Baidu's stop word list and removing redundant word information, a new word set {w1, w2, ..., w} is obtained. n ,…,w q }, where q is the number of words retained after removing stop words, the part-of-speech tag set corresponding to the new word set is {Flag1, Flag2, ..., Flag}. n ,…,Flag q }, that is, w n The corresponding part-of-speech tag is Flag. n ; Step three two, all the text in the data document d is operated according to step three one, and the word set {w1, w2, …, w z} after removing stop words is obtained, and the corresponding part-of-speech annotation set is {Flag1, Flag2, …, Flag z}, z represents the number of all non-repeated words included after processing the document; Step three, in order to make the text information vectorization easy to calculate similarity, make each word correspond to a vector point in space, all the words in the document are one-hot coded as the input of the Word2Vec model, and after the training of the language model, the word vector set corresponding to all the words is obtained as {WordVec1, WordVec2, …, WordVec z}. 5.The medical and health service demand classification method based on similarity according to claim 1, characterized in that The specific steps of step four are as follows: Step 4.1 Semantic Similarity SemSim(w n ,w l The context weight SimWeight is represented by the cosine similarity between the word vectors of two words. n ,t i t is the sum of the cosine similarities between a given word and all other words in the text. i For sample text, w n ,w l Indicates t i The nth and lth words in the text; Step four two, word class focus on nouns, verbs, adjectives, the word has been completed in the word segmentation of word class annotation, the word w n Select the appropriate weight assignment FalgWeight n ; Step four three, the word w n the term frequency weight FreWeight n represented by the calculated TF-IDF value; Step four four, word w n The functional semantic weight FunSemWeight n of the word w n is obtained by multiplying the context weight SimWeight(w i ), the part-of-speech weight FlagWeight n , and the frequency weight FreWeight n . 6.The medical and health service demand classification method based on similarity according to claim 1, characterized in that The specific steps of step five are as follows: Step five, obtaining the function semantic weight set of the description text t i All words {w1, w2, …, w n ,…,w q} after the word segmentation processing Repeat step four to obtain the function semantic weight set corresponding to the word set: { FunSemWeight 1, FunSemWeight 2,..., FunSemWeight n} q} ; Step five two, sort the weight values in the function semantic weight set, select the k words with the largest weight values, and the text t i The extracted keyword set is {w1, w2, …, w k}.

Citation Information

Patent Citations

  • Service clustering method based on demand semantics

    CN105404693A

  • Question and answering (QA) system realization method based on deep learning and topic model

    CN108763284A