Unsupervised clustering method, device and system for mental illness professional terms
By unsupervised clustering of psychological disease professional terms on the server side, using the combination of semantics and word order matrix and IRM algorithm, the problem of inefficient clustering of terminology in the prior art is solved, and efficient database establishment and information extraction are achieved.
Patent Information
- Application Number
- CN202111633005.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-12
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-08-12
AI Technical Summary
The prior art is difficult to quickly and efficiently cluster and extract business-specific terms, especially in complex and diverse terms such as mental illness, which leads to inefficient database establishment.
Unsupervised clustering method is adopted to preprocess the text on the server side, establish the semantic matrix and word order matrix of word-words, pre-trained using the BERT model, and cluster and classification in combination with the IRM algorithm to extract the semantics and word order of words. Information, realize automatic extraction of word categories.
It realizes the rapid and efficient establishment of professional databases, improves the utilization rate of word relationship matrix, avoids the disadvantage of the K-means algorithm that requires the number of categories to be set in advance, and realizes automatic inference of the number of categories.
Smart Images

Figure CN114254084B_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese invention patent application with the application date of August 12, 2021, application number CN202110921653.3, and invention name “Special term unsupervised clustering method, device and system”. Technical Field
[0002] The present invention relates to the field of artificial intelligence technology, and is applied to the intelligent clustering of professional terminology texts, and in particular to an unsupervised clustering method, device and system for professional terminology for mental illnesses. Background Art
[0003] With the popularization of Internet technology, more and more applications have emerged, and various "Internet +" have emerged one after another. Artificial intelligence technology has also found many application scenarios along with Internet applications. There are many smart services based on mobile Internet technology, but the professionalism of these applications and the difficulty of various knowledge have also posed great challenges to the technology. For example, there are many professional terms such as various diseases, chemistry, medicine, jewelry, etc., and the categories are complicated. Some terms are even more difficult to identify, and these tasks are also the most complicated and time-consuming parts of the entire application field. Summary of the invention
[0004] In view of the above-mentioned defects, the technical problem to be solved by the present invention is how to cluster and extract business-specific terms with the help of artificial intelligence technology to quickly and efficiently establish a professional database.
[0005] In view of the above-mentioned defects, the purpose of the present invention is to provide an unsupervised clustering method for professional terms of mental illness, which is applied on the server side, pre-processes the text, establishes a business-specific terminology vocabulary set, and the set includes semantic information and word order information of the vocabulary. The vocabulary is composed of words, and a word-word semantic matrix is established. The semantic matrix is pre-trained to obtain a semantic relationship matrix, and the word-word word order relationship matrix is calculated. The semantic relationship matrix and the word order relationship matrix are clustered by an unsupervised clustering algorithm, and the semantic information and word order information of the word are extracted by means of a relationship matrix. The two relationship matrices are unsupervisedly classified using an IRM algorithm to complete the extraction of word categories.
[0006] Preferably, the above preprocessing includes word segmentation, deduplication, and deletion of stop words.
[0007] Preferably, the word-word semantic matrix S comprises a plurality of elements, word i and word j, and the value S of the element ij Indicates whether the two words i and j corresponding to the current element have semantic similarity, S ij The value is 0 or 1.
[0008] Preferably, the above-mentioned model pre-training adopts BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
[0009] Preferably, the above method traverses the two words i and j in the word set, calculates the cosine similarity of the current two words, and if the current similarity is greater than 90%, the matrix elements S corresponding to the two words are ij is 1 if the value is true, otherwise it is 0.
[0010] Preferably, the above method calculates the word-word order relationship matrix W, sets the window value to 5, and uses a sliding window of the window value for the entire input text. If two words i and j co-occur once or more in the same window, the matrix element W corresponding to the current two words is considered ij is 1, otherwise it is 0; when the above sliding window slides across the entire text, the word-word order relationship matrix W is obtained.
[0011] Preferably, the above method first fully extracts the semantic information and word order information of the word by means of a relationship matrix, and then performs unsupervised classification on the two relationship matrices by means of an IRM algorithm to complete the extraction of the word category.
[0012] The invention provides an unsupervised clustering method for professional terms of mental illness, which is applied to an Internet platform, obtains user authorization based on a terminal device, collects text information uploaded by the user and sends it to a data center processing system of a background server, pre-processes the text, establishes a business-specific terminology vocabulary set, the set includes semantic information and word order information of the vocabulary, the vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates a word-word word order relationship matrix, clusters the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, extracts the semantic information and word order information of the word through a relationship matrix, performs unsupervised classification on the two relationship matrices using an IRM algorithm, and completes the extraction of word categories.
[0013] Preferably, the word-word semantic matrix S comprises a plurality of elements, word i and word j, and the value S of the element ij Indicates whether the two words i and j corresponding to the current element have semantic similarity, S ij The value is 0 or 1.
[0014] Preferably, the above-mentioned model pre-training adopts BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
[0015] Preferably, the above method first fully extracts the semantic information and word order information of the word by means of a relationship matrix, and then performs unsupervised classification on the two relationship matrices by means of an IRM algorithm to complete the extraction of the word category.
[0016] Preferably, it also includes data fusion and secondary processing based on the extracted word categories, and synchronizing the information to a cloud database.
[0017] Preferably, the preprocessing of the above-mentioned Internet platform includes word segmentation, deduplication, and deletion of stop words.
[0018] The invention provides an unsupervised clustering system for professional terms of mental illness, comprising at least one terminal device, at least one Internet platform and at least one server, wherein the terminal device collects text information uploaded by a user, the Internet platform obtains user authorization based on the terminal device, collects the text information uploaded by the user and sends it to a data center processing system of a background server, the data center processing system pre-processes the text, establishes a vocabulary set of business-specific terms, wherein the set includes semantic information and word order information of the vocabulary, the vocabulary is composed of words, a word-word semantic matrix is established, a model pre-training is performed on the semantic matrix to obtain a semantic relationship matrix, a word-word word order relationship matrix is calculated, the semantic relationship matrix and the word order relationship matrix are clustered by an unsupervised clustering algorithm, the semantic information and the word order information of the word are extracted by means of a relationship matrix, an IRM algorithm is used to perform unsupervised classification on the two relationship matrices, and the extraction of word categories is completed.
[0019] Preferably, word segmentation of text information uploaded by users can be performed on an Internet platform server or on a data center processing system of a backend server.
[0020] Preferably, the above text information includes text output after OCR text recognition and image recognition.
[0021] The present invention provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the above method are implemented.
[0022] The present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0023] The present invention provides an electronic device, comprising:
[0024] Processor; and
[0025] A memory configured to store computer executable instructions which, when executed, cause the processor to:
[0026] The data center processing system obtains user authorization based on the terminal device, collects text information uploaded by the user and sends it to the background server, the data center processing system pre-processes the text, establishes a business-specific terminology vocabulary set, the set includes semantic information and word order information of the vocabulary, the vocabulary is composed of words, a word-word semantic matrix is established, a model pre-training is performed on the semantic matrix to obtain a semantic relationship matrix, a word-word word order relationship matrix is calculated, the semantic relationship matrix and the word order relationship matrix are clustered by an unsupervised clustering algorithm, the semantic information and word order information of the word are extracted by means of a relationship matrix, the two relationship matrices are unsupervisedly classified by using an IRM algorithm, and the word category extraction is completed.
[0027] The present invention uses semantic similarity to obtain a word-word semantic relationship matrix, thereby realizing the utilization of word semantic information. A word-word word order relationship matrix is obtained through a text traversal algorithm based on a sliding window, thereby realizing the utilization of word order information and improving the utilization rate of original information. Based on word relationship matrices of different dimensions, this solution uses the IRM algorithm, thereby avoiding the disadvantage that the Kmeans algorithm needs to set the number of categories K in advance. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 A schematic diagram of the process of an embodiment of an unsupervised clustering method for professional terms of mental illnesses according to the present invention is shown;
[0030] Figure 2 A schematic diagram of another embodiment of the process of the unsupervised clustering method of mental illness professional terms of the present invention is shown;
[0031] Figure 3 A schematic diagram of another embodiment of the process of the unsupervised clustering method of mental illness professional terms of the present invention is shown;
[0032] Figure 4 A schematic diagram of the structure of an embodiment of an unsupervised clustering system for professional terms of mental illnesses according to the present invention is shown. DETAILED DESCRIPTION
[0033] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0034] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0035] like Figure 1 As shown, an embodiment of the present specification provides an unsupervised clustering method for professional terms of mental illness, which is applied on the server side, pre-processes the text, establishes a business-specific terminology vocabulary set, and the set includes semantic information and word order information of the vocabulary. The vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates the word-word word order relationship matrix, clusters the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, extracts the semantic information and word order information of the word through the relationship matrix, uses the IRM algorithm to perform unsupervised classification on the two relationship matrices, and completes the extraction of word categories. The pre-processing includes word segmentation, deduplication, and deletion of stop words. The word-word semantic matrix S includes multiple elements, word i and word j, and the value S of the element ij Indicates whether the two words i and j corresponding to the current element have semantic similarity, S ij The value is 0 or 1.
[0036] The model pre-training uses the BERT model to obtain the semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
[0037] In a specific example, traverse the word set of two words i and j, calculate the cosine similarity of the current two words, if the current similarity is greater than 90%, then the matrix elements S corresponding to the two words ij is 1 if the value is true, otherwise it is 0.
[0038] In a specific example, the method calculates the word-word order relationship matrix W, sets the window value to 5, and uses a sliding window of the size of the window value for the entire input text. If two words i and j co-occur once or more in the same window, then the matrix element W corresponding to the current two words is considered ij is 1, otherwise it is 0; when the above sliding window slides across the entire text, the word-word order relationship matrix W is obtained.
[0039] In a specific example, the semantic information and word order information of a word are first fully extracted by means of a relationship matrix, and then the two relationship matrices are unsupervisedly classified by the IRM algorithm to complete the extraction of word categories.
[0040] like Figure 2 As shown, an embodiment of this specification provides an unsupervised clustering method for professional terms of mental illness, which is applied on the server side and includes:
[0041] S101, preprocessing the text to establish a business-specific terminology vocabulary set, the set including semantic information and word order information of the vocabulary, the vocabulary consisting of words;
[0042] S102, establishing a word-word semantic matrix, and performing model pre-training on the semantic matrix to obtain a semantic relationship matrix;
[0043] S103, calculating the word order relationship matrix of word-word;
[0044] S104, clustering the semantic relationship matrix and the word order relationship matrix by using an unsupervised clustering algorithm;
[0045] S105, extracting the semantic information and word order information of the word by means of a relation matrix;
[0046] S106, using the IRM algorithm to perform unsupervised classification on the two relationship matrices to complete the extraction of word categories.
[0047] In a specific example, data is fused based on semantic information and word order information. For example, heart palpitations, chest tightness, and heart palpitations are combined with hypertension, sleep disorders, and mental illnesses to form a corresponding database. From the extraction of word categories to the fusion application of data, the mapping and classification of diseases can be automatically achieved.
[0048] In a specific example, the text includes "faster heartbeat", "uncomfortable in the heart", "chest tightness", "shortness of breath", etc., which contains descriptive language, short sentences and long sentences, and is segmented, duplicated and deleted by some stop words.
[0049] In order to make full use of the semantic information and word order information of the vocabulary, the basic component of the vocabulary is the word, and a word-word relationship matrix is established. The first word-word relationship matrix S is a semantic matrix, and each element S ij The value of S is 0 or 1 as a logical judgment. ij Indicates whether the two words i and j corresponding to the current element have semantic similarity. The semantic relationship matrix is obtained through the BERT pre-training model, and the average value of the output latent vector of the penultimate layer of the BERT model is used as the encoding vector to encode each word in the word set. Then, the two words i and j in the word set are traversed, and the cosine similarity of the current two words is calculated. If the current similarity is greater than 90%, the matrix element W corresponding to the two words is ij is 1, otherwise it is 0; after the above operation, we can get the word-word semantic relationship matrix. Continue to calculate the word-word word order relationship matrix W. Set the window value to 5, and use a sliding window of the size of the window value for the entire input text. If two words i and j co-occur once or more in the same window, then the matrix element W corresponding to the current two words is considered ij is 1, otherwise it is 0; when the above sliding window slides over the entire text, the word-word order relationship matrix can be obtained.
[0050] In the embodiment, further, the model pre-training adopts BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
[0051] Two matrices are obtained, including a word semantic relationship matrix and a word order relationship matrix. These two matrices represent the semantic information of the word and the word order information of the word respectively.
[0052] Using the above two matrices for clustering, an unsupervised clustering algorithm that does not require the pre-set category data K is selected (Infinite Relational Model IRM algorithm, Infinite Relational Model)
[0053] The IRM algorithm is a clustering algorithm based on Bayesian statistical methods, based on the following assumptions:
[0054] z|Y~CRP(Y)
[0055] η(a, b)|β~Beta(β, β)
[0056] R(i,j)|z,η~Bernoulli(η(zi,zj))
[0057] It can be concluded from the above three formulas that in the overall framework, the IRM algorithm considers that the category distribution of each word is subject to CRP (Chinese Restaurant Process).
[0058] There is a certain relationship distribution between the categories, which obeys the Beta distribution (Beta) with parameter β.
[0059] Finally, the relationship matrix between words obeys the Bernoulli distribution with parameter η(zi, zj). There are two word-word relationships, so there are two η matrices and two R matrices for joint modeling. After that, the IRM algorithm uses Gibbs sampling to solve and completes the calculation of the category distribution z.
[0060] After the above process, the semantic information and word order information of the word are first fully extracted through the relationship matrix, and then the IRM algorithm is used to perform unsupervised classification on the two relationship matrices to complete the extraction of word categories.
[0061] An embodiment of the present specification provides an unsupervised clustering method for professional terms for mental illness, which is applied to an Internet platform. The method obtains user authorization based on a terminal device, collects text information uploaded by the user and sends it to a data center processing system of a background server. The data center processing system pre-processes the text and establishes a business-specific terminology vocabulary set, wherein the set includes semantic information and word order information of the vocabulary. The vocabulary is composed of words, and a word-word semantic matrix is established. The semantic matrix is pre-trained to obtain a semantic relationship matrix, and a word-word word order relationship matrix is calculated. The semantic relationship matrix and the word order relationship matrix are clustered by an unsupervised clustering algorithm, and the semantic information and word order information of the word are extracted by means of a relationship matrix. The two relationship matrices are unsupervisedly classified using an IRM algorithm to complete the extraction of word categories.
[0062] In some embodiments, the word-word semantic matrix S includes multiple elements, word i and word j, and the value S of the element ij Indicates whether the two words i and j corresponding to the current element have semantic similarity, S ij The value is 0 or 1.
[0063] In some embodiments, the model pre-training uses BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
[0064] In some embodiments, the semantic information and word order information of a word are first fully extracted by means of a relationship matrix, and then the two relationship matrices are unsupervisedly classified by an IRM algorithm to complete the extraction of word categories.
[0065] In some embodiments, it also includes data fusion and secondary processing based on the extracted word categories, and synchronizing the information to a cloud database.
[0066] In some embodiments, preprocessing of the Internet platform includes word segmentation, deduplication, and deletion of stop words.
[0067] like Figure 3 As shown, an embodiment of this specification provides an unsupervised clustering method for professional terms of mental illness, which is applied on the server side and includes:
[0068] S201, preprocessing the text to establish a business-specific terminology vocabulary set, the set including semantic information and word order information of the vocabulary, the vocabulary consisting of words;
[0069] S202, establishing a word-word semantic matrix, and performing model pre-training on the semantic matrix to obtain a semantic relationship matrix;
[0070] S203, calculating the word order relationship matrix of word-word;
[0071] S204, clustering the semantic relationship matrix and the word order relationship matrix by using an unsupervised clustering algorithm;
[0072] S205, extracting the semantic information and word order information of the word by means of a relation matrix;
[0073] S206, using the IRM algorithm to perform unsupervised classification on the two relationship matrices to complete the extraction of word categories;
[0074] S207: Perform data fusion and secondary processing based on the extracted word categories for information cross-validation.
[0075] like Figure 4As shown, an embodiment of the present specification provides an unsupervised clustering system for professional terms for mental illness, including at least one terminal device, at least one Internet platform and at least one server, wherein the terminal device collects text information uploaded by users, and the Internet platform obtains user authorization based on the terminal device, collects text information uploaded by users and sends it to a data center processing system of a background server, wherein the data center processing system pre-processes the text, establishes a vocabulary set of business-specific terms, wherein the set includes semantic information and word order information of the vocabulary, and the vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates a word-word word order relationship matrix, clusters the semantic relationship matrix and the word order relationship matrix by an unsupervised clustering algorithm, extracts the semantic information and word order information of the words by means of a relationship matrix, performs unsupervised classification on the two relationship matrices by using an IRM algorithm, and completes the extraction of word categories.
[0076] In some specific embodiments, word segmentation of text information uploaded by users can be performed on an Internet platform server or on a data center processing system of a backend server.
[0077] In some specific embodiments, the text information includes text output after OCR text recognition and image recognition.
[0078] In some specific examples, the system uses image detection and recognition technology to identify the specific time, medical hospital, patient name, doctor's name, and clinical diagnosis results on the picture, performs full-text recognition on the picture, further extracts the text content, forms a logical context through semantic recognition, and collects and classifies the text information.
[0079] An embodiment of the present specification provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the following method when executed by a processor: preprocessing text, establishing a business-specific terminology vocabulary set, the set including semantic information and word order information of the vocabulary, the vocabulary consisting of words, establishing a word-word semantic matrix, performing model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculating a word-word word order relationship matrix, clustering the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, extracting the semantic information and word order information of the word through a relationship matrix, performing unsupervised classification on the two relationship matrices using an IRM algorithm, and completing the extraction of word categories.
[0080] A computer program product provided by an embodiment of the present specification includes a computer program / instruction, which implements the following method when executed by a processor: preprocessing text, establishing a business-specific terminology vocabulary set, the set including semantic information and word order information of the vocabulary, the vocabulary consisting of words, establishing a word-word semantic matrix, performing model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculating a word-word word order relationship matrix, clustering the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, extracting the semantic information and word order information of the word through a relationship matrix, performing unsupervised classification on the two relationship matrices using an IRM algorithm, and completing the extraction of word categories.
[0081] An electronic device provided by an embodiment of the present specification includes:
[0082] Processor; and
[0083] A memory configured to store computer executable instructions which, when executed, cause the processor to:
[0084] The text is preprocessed to establish a business-specific terminology vocabulary set, the set includes semantic information and word order information of the vocabulary, the vocabulary is composed of words, a word-word semantic matrix is established, a model pre-training is performed on the semantic matrix to obtain a semantic relationship matrix, a word-word word order relationship matrix is calculated, the semantic relationship matrix and the word order relationship matrix are clustered by an unsupervised clustering algorithm, the semantic information and word order information of the word are extracted by means of a relationship matrix, the two relationship matrices are unsupervisedly classified using an IRM algorithm, and the word category extraction is completed.
[0085] The present invention obtains a word-word semantic relationship matrix using the semantic similarity calculated by the BERT algorithm, thereby realizing the utilization of word semantic information. A word-word word order relationship matrix is obtained by a text traversal algorithm based on a sliding window, thereby realizing the utilization of word word order information.
[0086] The present invention avoids the loss of text word order information caused by relying solely on BERT encoding, and improves the utilization rate of original information from multiple dimensions.
[0087] The present invention utilizes the IRM algorithm on the basis of a two-dimensional word relationship matrix, thereby avoiding the disadvantage of the Kmeans algorithm that the number of categories K needs to be set in advance, thereby realizing automatic inference of the number of categories.
[0088] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0089] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0090] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0094] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0095] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0096] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0097] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0098] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0099] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. An unsupervised clustering method for mental illness professional terms, applied on the server side, performs data fusion processing based on the semantic information and word order information of mental illness, establishes a database corresponding to palpitations, chest tightness, palpitations, and combines hypertension, sleep disorders, and mental illnesses, automatically realizes the mapping classification of diseases from the extraction of word categories to the fusion application of data, pre-processes the text, establishes a vocabulary set of mental illness terms, the set includes the semantic information and word order information of the vocabulary, the vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates the word-word word order relationship matrix, clusters the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, extracts the semantic information and word order information of the word through the relationship matrix, uses the IRM algorithm to perform unsupervised classification on the two relationship matrices, completes the extraction of word categories, the word-word semantic matrix S includes multiple elements, the value S of the element ij Indicates whether the two words i and j corresponding to the current element have semantic similarity, S ij Takes a value of 0 or 1, traverses the word set, and calculates the cosine similarity between the two words. If the current similarity is greater than 90%, the matrix element S corresponding to the two words ij is 1, otherwise it is 0; calculate the word-word order relationship matrix W, set the window value to 5, and use a sliding window of the window value for the entire text. If two words i and j co-occur once or more in the same window, then the matrix element W corresponding to the current two words is considered ij is 1, otherwise it is 0; when the above sliding window slides across the entire text, the word-word order relationship matrix W is obtained.
2. According to the unsupervised clustering method for professional terms of mental illnesses described in claim 1, the preprocessing includes word segmentation, deduplication, and deletion of stop words.
3. According to the unsupervised clustering method for professional terms for mental illnesses described in claim 1, the model pre-training adopts BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
4. An unsupervised clustering method for mental illness professional terms, applied to the Internet platform, obtains user authorization based on terminal devices, collects mental illness text information uploaded by users and sends it to the data center processing system of the background server, the data center processing system pre-processes the text, performs data fusion processing based on semantic information and word order information, establishes a database corresponding to panic, chest tightness, palpitations, hypertension, sleep disorders, and mental illness, automatically realizes the mapping classification of diseases from the extraction of word categories to the fusion application of data, pre-processes the text, establishes a mental illness terminology vocabulary set, the set includes the semantic information and word order information of the vocabulary, the vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates the word-word word order relationship matrix, clusters the semantic relationship matrix and the word order relationship matrix through an unsupervised clustering algorithm, and The semantic information and word order information of a word are extracted by means of a relationship matrix. The two relationship matrices are unsupervisedly classified using an IRM algorithm to complete the extraction of word categories. The word-word semantic matrix S includes multiple elements. The value Sij of the element indicates whether the two words i and j corresponding to the current element have semantic similarity. Sij takes a value of 0 or 1. The words i and j in the word set are traversed to calculate the cosine similarity of the current two words. If the current similarity is greater than 90%, the matrix element Sij corresponding to the two words is 1, otherwise it is 0; the word-word word order relationship matrix W is calculated, the window value is set to 5, and a sliding window with a size of the window value is used for the entire text. If the two words i and j co-occur once or more in the same window, the matrix element Wij corresponding to the current two words is considered to be 1, otherwise it is 0; when the above sliding window slides over the entire text, the word-word word order relationship matrix W is obtained.
5. According to the method described in claim 4, the model pre-training adopts BERT model training to obtain a semantic relationship matrix, and uses the average value of the output latent vector of the penultimate layer of the BERT model as the encoding vector to encode each word in the word set.
6. The method according to claim 4 or 5 further comprises performing data fusion and secondary processing based on the extracted word categories, and synchronizing the information to a cloud database.
7. According to the method of claim 6, the preprocessing includes word segmentation, deduplication, and deletion of stop words.
8. An unsupervised clustering system for mental illness professional terms, comprising at least one terminal device, at least one Internet platform and at least one server, wherein the terminal device collects mental illness text information uploaded by users, the Internet platform obtains user authorization based on the terminal device, collects text information uploaded by users and sends it to a data center processing system of a background server, the data center processing system pre-processes the text, performs data fusion processing based on semantic information and word order information, establishes a database corresponding to palpitations, chest tightness, palpitations, hypertension, sleep disorders, and mental illnesses, automatically realizes the mapping and classification of diseases from the extraction of word categories to the fusion application of data, pre-processes the text, establishes a mental illness terminology vocabulary set, the set includes semantic information and word order information of the vocabulary, the vocabulary is composed of words, establishes a word-word semantic matrix, performs model pre-training on the semantic matrix to obtain a semantic relationship matrix, calculates a word-word word order relationship matrix, and uses an unsupervised clustering algorithm to calculate the word-word word order relationship matrix. The method clusters the semantic relationship matrix and the word order relationship matrix, extracts the semantic information and word order information of the word by means of the relationship matrix, performs unsupervised classification on the two relationship matrices by using the IRM algorithm, and completes the extraction of the word category. The word-word semantic matrix S includes multiple elements, and the value Sij of the element indicates whether the two words i and j corresponding to the current element have semantic similarity. Sij takes the value of 0 or 1, traverses the words i and j in the word set, calculates the cosine similarity of the current two words, and if the current similarity is greater than 90%, the matrix element Sij corresponding to the two words is 1, otherwise it is 0; calculates the word-word word order relationship matrix W, sets the window value to 5, and adopts a sliding window of the size of the window value for the entire text. If the two words i and j co-occur once or more in the same window, it is considered that the matrix element Wij corresponding to the current two words is 1, otherwise it is 0; when the above sliding window slides over the entire text, the word-word word order relationship matrix W is obtained.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Key term extraction method, device and equipment and computer readable storage medium
CN109885831A