A detection method, device, apparatus and computer readable storage medium

By using well-trained feature extraction and classification sub-models, the problem of electrode detachment in polysomnography devices was solved, achieving efficient and accurate anomaly detection, improving detection accuracy and real-time performance, and reducing detection costs.

CN117194943BActive Publication Date: 2026-01-16CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210588866.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2026-01-16
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

Existing polysomnography devices are prone to electrode detachment when subjects get up at night or turn over, affecting the quality and efficiency of data acquisition, and lack efficient and accurate methods for anomaly detection.

Method used

By employing pre-trained feature extraction and classification sub-models, the feature extraction sub-model is trained using positive sample data, and the classification sub-model is trained using a small amount of negative sample data. This determines the feature vector of the signal to be detected and performs prediction processing, thereby improving detection accuracy and real-time performance.

Benefits of technology

It improves the accuracy and real-time performance of polysomnography, reduces detection costs, and minimizes the impact of human intervention on sleep.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194943B_ABST
    Figure CN117194943B_ABST
Patent Text Reader

Abstract

The application discloses a detection method and device, equipment and a computer readable storage medium, comprising: obtaining a to-be-detected signal, a set of positive feature vectors and a trained detection model, wherein the trained detection model comprises a trained classification sub-model, the trained classification sub-model is obtained by training a pre-trained classification sub-model using negative sample data, and the number of the negative sample data is less than the number of positive sample data; determining a first target positive feature vector; performing feature extraction on the to-be-detected signal to obtain a to-be-detected feature vector; determining a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector; and performing prediction processing on the first similar feature vector using the trained classification sub-model to obtain a detection result. In this way, the trained classification sub-model can be trained using less negative sample data, and then the trained detection model is obtained, so that the detection accuracy is improved and the detection process is simplified.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of signal processing, and relates to but is not limited to a detection method, device, equipment and computer readable storage medium. BACKGROUND

[0002] With the continuous development of science and technology, the types of monitoring devices in the medical field are more and more various, and the functions are more and more powerful. Taking polysomnography (PSG) as an example, PSG is an effective means to check sleep diseases, mainly through continuous monitoring of indicators such as respiration, blood oxygen saturation, electroencephalogram, electrocardiogram, heart rate and the like at night, recording and evaluating the sleep structure and process of the subject, and is the internationally recognized gold standard for sleep monitoring. Through PSG monitoring and data interpretation by professional doctors, the cause of sleep problems can be located.

[0003] When actually monitoring sleep through PSG, monitoring electrodes need to be attached to multiple parts of the subject's body, including electroencephalogram, electrocardiogram, electromyogram, blood oxygen sensor, etc. Each sensor is connected to at least one lead wire, and a total of dozens of lead wires are used. Due to the large number of electrodes and lead wires worn, if the subject has the behavior of getting up at night, turning over, etc., the lead wire is easy to be pulled and the electrode is off, thereby causing data acquisition failure, and ultimately affecting the quality and efficiency of sleep monitoring.

[0004] In related technologies, the wearing state of the electrodes or lead wires is checked through artificial ward rounds, or the wearing state of the electrodes or lead wires is monitored through a camera. In this way, artificial ward rounds will affect the normal sleep of the subject, thereby affecting the detection result; and when monitoring through a camera, the capture accuracy is low, and it is time-consuming and laborious.

[0005] In addition, considering the case that the abnormality occurs less, an accurate and efficient abnormality detection method is urgently needed for less abnormal data. SUMMARY

[0006] Therefore, the embodiments of the present application provide a detection method, device, equipment and computer readable storage medium.

[0007] The technical scheme of the embodiments of the present application is implemented as follows:

[0008] The embodiments of the present application provide a detection method, which comprises:

[0009] obtain a to-be-detected signal, a positive feature vector set, and a trained detection model, wherein the trained detection model comprises a trained feature extraction sub-model and a trained classification sub-model, the positive feature vector set is obtained by performing feature extraction on positive sample data by using the trained feature extraction sub-model, and the trained classification sub-model is obtained by training a pre-trained classification sub-model by using negative sample data, and the number of the negative sample data is less than the number of the positive sample data;

[0010] determine a first target positive feature vector corresponding to the to-be-detected signal from the positive feature vector set;

[0011] perform feature extraction on the to-be-detected signal by using the trained feature extraction sub-model to obtain a to-be-detected feature vector;

[0012] determine a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector;

[0013] perform prediction processing on the first similar feature vector by using the trained classification sub-model to obtain a detection result.

[0014] An embodiment of the present application provides a detection device, and the detection device comprises:

[0015] a first obtaining module, configured to obtain a to-be-detected signal, a positive feature vector set, and a trained detection model, wherein the trained detection model comprises a trained feature extraction sub-model and a trained classification sub-model, the positive feature vector set is obtained by performing feature extraction on positive sample data by using the trained feature extraction sub-model, and the trained classification sub-model is obtained by training a pre-trained classification sub-model by using negative sample data, and the number of the negative sample data is less than the number of the positive sample data;

[0016] a first determining module, configured to determine a first target positive feature vector corresponding to the to-be-detected signal from the positive feature vector set;

[0017] a first feature extraction module, configured to perform feature extraction on the to-be-detected signal by using the trained feature extraction sub-model to obtain a to-be-detected feature vector;

[0018] a second determining module, configured to determine a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector;

[0019] a first prediction module, configured to perform prediction processing on the first similar feature vector by using the trained classification sub-model to obtain a detection result.

[0020] An embodiment of the present application provides a detection device, and the detection device comprises:

[0021] a processor; and

[0022] a memory for storing a computer program executable on the processor;

[0023] wherein the computer program, when executed by the processor, implements the above detection method.

[0024] Embodiments of the present application provide a computer readable storage medium, the computer readable storage medium stores computer executable instructions, the computer executable instructions are configured to execute the above detection method.

[0025] Embodiments of the present application provide a detection method, device and equipment and a computer readable storage medium, the detection method comprises: obtaining a to-be-detected signal, a set of positive feature vectors and a trained detection model, wherein the trained detection model comprises a trained feature extraction sub-model for feature extraction and a trained classification sub-model for prediction and classification, the set of positive feature vectors is obtained by using the trained feature extraction sub-model to extract features of positive sample data, and the trained classification sub-model is obtained by training a pre-trained classification sub-model using negative sample data, and the number of negative samples is less than the number of positive sample data; then, a first target positive feature vector corresponding to the to-be-detected signal is determined from the positive sample data set; then, the trained feature extraction sub-model is used to extract features of the to-be-detected signal to obtain a to-be-detected feature vector; then, a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector is determined; finally, the trained classification sub-model is used to perform prediction processing on the first similar feature vector to obtain a detection result. In this way, the trained feature extraction sub-model is used to extract features of the positive sample data and the to-be-detected signal respectively to obtain the positive sample data set and the to-be-detected feature vector, ensuring that the two feature vectors are consistent in type; then, the pre-trained classification sub-model is trained based on the small number of negative sample data to obtain the trained classification sub-model which can accurately identify abnormal situations, wherein the pre-trained classification sub-model is a classification sub-model with a determined model structure; finally, the first similar feature vector between the first target positive feature vector corresponding to the to-be-detected signal and the to-be-detected feature vector is determined, and the trained classification sub-model is used to perform prediction processing on the first similar feature vector to obtain a detection result reflecting the to-be-detected signal, thereby improving the accuracy and real-time performance of the detection and reducing the detection cost. BRIEF DESCRIPTION OF DRAWINGS

[0026] In the drawings (which are not necessarily drawn to scale), like reference numerals can describe similar components throughout the several views. The drawings illustrate generally, by way of example, various embodiments discussed in the present document.

[0027] Figure 1 An implementation flowchart of the detection method provided by the embodiment of the present application is shown in FIG. 1.

[0028] Figure 2 An implementation flowchart of the training detection model method provided by the embodiment of the present application is shown in FIG. 2.

[0029] Figure 3 An implementation flowchart of the feature extraction method provided by the embodiment of the present application is shown in FIG. 3.

[0030] Figure 4 An implementation flowchart of the training method provided by the embodiment of the present application is shown in FIG. 4.

[0031] Figure 5 Another implementation flowchart of the training method provided by the embodiment of the present application is shown in FIG. 5.

[0032] Figure 6 An implementation flowchart of the back propagation training method provided by the embodiment of the present application is shown in FIG. 6.

[0033] Figure 7 Another implementation flowchart of the detection method provided by the embodiment of the present application is shown in FIG. 7.

[0034] Figure 8 A structure schematic diagram of an anomaly detection system framework provided by the embodiment of the present application is shown in FIG. 8.

[0035] Figure 9 A structure schematic diagram of an anomaly detection process provided by the embodiment of the present application is shown in FIG. 9.

[0036] Figure 10 A structure schematic diagram of a feature extraction process provided by the embodiment of the present application is shown in FIG. 10.

[0037] Figure 11 A structure schematic diagram of a model training process provided by the embodiment of the present application is shown in FIG. 11.

[0038] Figure 12 A structure schematic diagram of a training anomaly detection classifier provided by the embodiment of the present application is shown in FIG. 12.

[0039] Figure 13 Another implementation flowchart of the detection method provided by the embodiment of the present application is shown in FIG. 13.

[0040] Figure 14 A component structure schematic diagram of a detection device provided by the embodiment of the present application is shown in FIG. 14.

[0041] Figure 15 A component structure schematic diagram of a detection device provided by the embodiment of the present application is shown in FIG. 15. DETAILED DESCRIPTION

[0042] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limitations to the present application. All other embodiments obtained by those of ordinary skill in the art without creative effort fall within the scope of the present application.

[0043] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0044] In the following description, the terms "first\second\third" are only to distinguish similar objects, and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0046] About one-third of a person's life is spent in sleep, just like eating and drinking, sleep is one of the basic life activities indispensable to human beings. Good sleep is a sign of health, while sleep disorders seriously affect the quality of life and reduce work efficiency. With the acceleration of modern life rhythm and the change of life style, various sleep disorders have become a prominent medical and public health problem and attracted people's attention. PSG is an effective means to check sleep disorders, but there is no effective method to realize abnormal detection of PSG. Based on this, the present application provides an abnormal detection scheme in the field of PSG sleep monitoring. The existing abnormal detection method is mainly for the detection of abnormal points or outliers. The commonly used methods include rule-based, statistical and traditional machine learning detection methods. The rule-based detection method mainly extracts signal features manually or automatically, and then identifies whether it is an abnormal signal. It has strong interpretability and can accurately find out the abnormality. However, its use is limited by expert knowledge, and the rule base also needs to be updated frequently, otherwise it cannot identify the abnormality that has never appeared. The statistical method is a model-based method, which uses statistical methods to establish a model, and then considers how likely the object conforms to the model. However, prior knowledge about the underlying distribution is needed to model the distribution model in the parameter model. Auxiliary statistical techniques are needed to process multi-dimensional data and high-dimensional data. The model complexity is high, and it is not suitable for abnormal detection of PSG devices. Traditional machine learning methods for detecting outliers include unsupervised, semi-supervised and supervised learning methods such as knowledge vector machine, multilayer perception, decision tree, random forest, etc. However, due to the large number of signal types in sleep monitoring, the use of such methods is more complicated in signal processing and model arrangement, and the generalization ability is not strong.

[0047] Based on the problems in the related art, the present application provides a detection method. The method provided by the present application can be implemented by a computer program. When the computer program is executed, the detection method provided by the present application is completed. In some embodiments, the computer program can be executed in a processor in a detection device. Figure 1 An implementation process of the detection method provided by the present application is shown in Figure 1 The detection method includes the following steps.

[0048] In step S101, a to-be-detected signal, a set of positive feature vectors and a trained detection model are obtained.

[0049] Here, the to-be-detected signal is a signal collected by the acquisition unit. The to-be-detected signal can be a current signal, a voltage signal, etc. In addition, the to-be-detected signal is generally a physiological signal, for example, an electroencephalogram signal, an eye movement muscle signal, a lower jaw muscle signal, an electrocardiogram signal, etc. The to-be-detected signal can come from a health detection device, such as a PSG device, an electrocardiogram monitor, an electroencephalogram monitor, an ultrasonic device, etc.

[0050] In the embodiments of the present application, the trained detection model includes a trained feature extraction sub-model and a trained classification sub-model, the set of positive feature vectors is obtained by using the trained feature extraction sub-model to extract features from the positive sample data, and the trained classification sub-model is obtained by training a pre-trained classification sub-model using negative sample data. The number of negative sample data is less than the number of positive sample data. The trained feature extraction sub-model is trained by using positive sample data. The trained feature extraction sub-model is used to extract features from the collected signal to obtain the corresponding feature vector. The pre-trained classification sub-model is trained by using positive sample data. Then, a small amount of negative sample data is used to train the pre-trained classification sub-model to obtain the trained classification sub-model. The trained classification sub-model can be used to predict the detection signal based on the detection feature vector corresponding to the detection signal to obtain the detection result corresponding to the detection signal.

[0051] In actual anomaly detection, after obtaining the detection feature vector corresponding to the detection signal and the first target positive feature vector corresponding to the detection signal, a first similarity vector between the two feature vectors is determined. Then, the first similarity vector is input into the trained classification sub-model to predict the first similarity vector by using the trained classification sub-model, and finally obtain the detection result.

[0052] In some embodiments, if the first similar feature vector represents that the similarity between the detection feature vector and the first target positive feature vector is high, it is determined that the detection result is normal; and if the first similar feature vector represents that the similarity between the detection feature vector and the first target positive feature vector is low, it is determined that the detection result is abnormal.

[0053] Step S102, determining the first target positive feature vector corresponding to the detection signal from the set of positive feature vectors.

[0054] Here, the set of positive feature vectors includes a plurality of positive feature vectors, wherein the number of positive feature vectors is the same as the number of types of collected signals, that is, different types of collected signals correspond to different feature vectors.

[0055] In the embodiment of the present application, the type information corresponding to the to-be-detected signal is carried in the to-be-detected signal, and the to-be-detected type corresponding to the to-be-detected signal can be obtained by analyzing the to-be-detected signal; then, the positive feature vector same as the to-be-detected type is determined from the set of positive feature vectors; finally, the positive feature vector same as the to-be-detected type is determined as the first target positive feature vector. That is, the first target positive feature vector is the same as the type of the to-be-detected signal, for example, when the to-be-detected signal is the collected electroencephalogram signal, the first target positive feature vector is the feature vector corresponding to the normal electroencephalogram signal.

[0056] In step S103, the trained feature extraction sub-model is used to perform feature extraction on the to-be-detected signal to obtain a to-be-detected feature vector.

[0057] Here, the trained feature extraction sub-model includes a time domain feature extraction part and a frequency domain feature extraction part, and the to-be-detected signal can be processed by the time domain feature extraction part and the frequency domain feature extraction part to obtain a time domain feature vector and a frequency domain feature vector; finally, the time domain feature vector and the frequency domain feature vector are fused in a splicable manner to obtain the final to-be-detected feature vector.

[0058] In some embodiments, the number of time domain feature extraction parts is at least one, and can also be multiple, for example, 2 or 3. Taking the number of time domain feature extraction parts as 2 as an example, two time domain feature vectors can be obtained through the two time domain feature extraction parts. Similarly, the number of frequency domain feature extraction parts is at least one, and can also be multiple, for example, 2 or 3. Taking the number of frequency domain feature extraction parts as 2 as an example, two frequency domain feature vectors can be obtained through the two frequency domain feature extraction parts.

[0059] In step S104, a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector is determined.

[0060] Here, the first similar feature vector between the first target positive feature vector and the to-be-detected feature vector can be determined by a similarity determination method.

[0061] In actual determination of the first similar feature vector, the cosine similarity method, the Manhattan distance method, the Chebyshev distance method, etc. can be used to determine the first similar feature vector between the two feature vectors.

[0062] In the embodiment of the present application, the first similar feature vector can reflect the similarity between the first target positive feature vector and the to-be-detected feature vector.

[0063] In step S105, the trained classification sub-model is used to perform prediction processing on the first similar feature vector to obtain a detection result.

[0064] Here, the trained classification sub-model can be composed of a fully connected layer and an activation function, where the fully connected layer is capable of mapping the distributed feature representation to a sample label space, and the activation function is capable of outputting the probability of the to-be-detected signal being a normal signal.

[0065] In the embodiments of the present application, since the trained classification sub-model is obtained by training a pre-trained classification sub-model based on negative sample data, and the pre-trained classification sub-model is trained by positive sample data, for any to-be-detected signal, the trained classification sub-model can accurately predict the detection result corresponding to the to-be-detected signal, regardless of whether the to-be-detected signal has an anomaly.

[0066] The embodiments of the present application provide a detection method, device, equipment and computer readable storage medium. The detection method comprises: obtaining a to-be-detected signal, a set of positive feature vectors and a trained detection model, wherein the trained detection model comprises a trained feature extraction sub-model for feature extraction and a trained classification sub-model for prediction and classification, the set of positive feature vectors is obtained by performing feature extraction on positive sample data by using the trained feature extraction sub-model, and the trained classification sub-model is obtained by training a pre-trained classification sub-model by using negative sample data, and the number of negative samples is less than the number of positive sample data; then, a first target positive feature vector corresponding to the to-be-detected signal is determined from the set of positive sample data; then, the to-be-detected signal is subjected to feature extraction by using the trained feature extraction sub-model to obtain a to-be-detected feature vector; then, a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector is determined; finally, the first similar feature vector is subjected to prediction processing by using the trained classification sub-model to obtain a detection result. In this way, the trained feature extraction sub-model is used to perform feature extraction on the positive sample data and the to-be-detected signal respectively to obtain the set of positive sample data and the to-be-detected feature vector, so as to ensure that the two feature vectors are of the same type; the pre-trained classification sub-model is trained based on the small number of negative sample data to obtain the trained classification sub-model capable of accurately identifying abnormal conditions, wherein the pre-trained classification sub-model is a classification sub-model with a determined model structure; finally, the first similar feature vector between the first target positive feature vector corresponding to the to-be-detected signal and the to-be-detected feature vector is determined, and the first similar feature vector is subjected to prediction processing by using the trained classification sub-model to obtain a detection result finally reflecting the to-be-detected signal, so as to improve the accuracy and real-time performance of detection and reduce the detection cost.

[0067] In some embodiments, before obtaining the trained detection model, the trained detection model needs to be obtained by training, as shown in FIG. 1. Figure 2 As shown in FIG. 1, the trained detection model can be determined by the following steps S001 to S004:

[0068] Step S001: Obtain the pre-trained detection model obtained by training with positive sample data.

[0069] Here, a preset detection model can be established first. This detection model can be an artificial intelligence model with anomaly detection function, such as a neural network model, a Bayesian network model, etc.

[0070] In this embodiment, positive sample data represents the collected signals as normal signals. Generally, positive sample data can be collected when the device under test is working normally. At the same time, the type information corresponding to each positive sample data can also be obtained. The label information of these positive sample data is all normal. Finally, a preset detection model can be trained through methods such as perceptron learning rules, incremental rules, and backpropagation training to obtain a pre-trained detection model. The pre-trained detection model includes a trained feature extraction sub-model and a pre-trained classification sub-model.

[0071] In some embodiments, the preset detection model includes a preset feature extraction sub-model for feature extraction and a preset classification sub-model for classification. The trained feature extraction sub-model can be directly trained using positive sample data so that it can be used to extract features from any signal to be detected. Furthermore, since the preset classification sub-model is trained only using positive sample data and not using negative sample data, a sub-classification model capable of distinguishing between normal and abnormal data cannot be obtained through step S001. Therefore, the classification sub-module trained using positive sample data is determined as the pre-trained classification sub-model.

[0072] Step S002: Obtain negative sample information and use the trained feature extraction sub-model to extract features from the negative sample information to obtain negative feature vectors.

[0073] Here, negative sample information includes negative sample data, the type of the negative sample data, and sample label information, wherein the sample label information indicates anomaly. In this embodiment, previously collected negative sample data can be obtained through a negative sample acquisition command.

[0074] In actual implementation, such as Figure 3 As shown, the step S002 above, "using the trained feature extraction sub-model to extract features from negative sample information and obtain negative feature vectors," can be achieved through the following steps S0021 to S0024:

[0075] Step S0021: The negative sample data is upsampled and segmented sequentially to obtain time-domain data.

[0076] Here, the negative sample data can be processed based on a linear interpolation filter-based up-sampling technique. Since the negative sample data contains multiple types of data with different sampling frequencies, the up-sampling is performed at the maximum sampling frequency in this step.

[0077] In the embodiments of the present application, in order to improve the time resolution and frequency resolution of the data in the global range, the up-sampled data is also segmented according to a sliding window, that is, the up-sampled data is cut to obtain time domain data.

[0078] For example, when segmented according to a sliding window, the data can be cut according to a 1-minute window with a 15-second sliding window.

[0079] In step S0022, the time domain data is subjected to feature extraction processing to obtain a time domain feature vector.

[0080] Here, the feature extraction for the time domain can include multi-layer convolution processing, for example, 3 one-dimensional convolution processing. The time domain feature vector can be obtained through convolution processing.

[0081] In step S0023, the time domain data is subjected to time-frequency analysis to obtain frequency domain data, and the frequency domain data is subjected to feature extraction processing to obtain a frequency domain feature vector.

[0082] In the embodiments of the present application, the time domain data can be subjected to time-frequency analysis by various methods to obtain multiple frequency domain data. For example, the time domain data can be subjected to time-frequency analysis by two methods. On the one hand, the time domain data can be subjected to time-frequency analysis by short-time Fourier transform. On the other hand, the event-related spectrum of the time domain data can be determined to obtain two frequency domain data.

[0083] Then, the frequency domain data is subjected to feature extraction. In actual implementation, a residual network can be used to extract the features of the frequency domain data to obtain a frequency domain feature vector.

[0084] In step S0024, the time domain feature vector and the frequency domain feature vector are fused to obtain a negative feature vector.

[0085] Here, the time domain feature vector and the frequency domain feature vector can be fused by splicing to obtain a negative feature vector that can represent the negative sample data.

[0086] Through the above steps S0021 to S0024, the negative sample data is first subjected to up-sampling and cutting processing to obtain time domain data. Then, the time domain data is subjected to time domain feature extraction and frequency domain feature extraction to obtain a time domain feature vector and a frequency domain feature vector. Finally, the time domain feature vector and the frequency domain feature vector are fused to obtain a negative feature vector that can represent the negative sample data.

[0087] Step S003, training the pre-trained classification sub-model using the negative feature vectors to obtain a trained classification sub-model.

[0088] In actual implementation, as shown in Figure 4 The implementation can be achieved through the following steps S0031 to S0035:

[0089] Step S0031, initializing the parameters of the pre-trained classification sub-model.

[0090] Here, the parameters of the pre-trained classification sub-model can be initialized as default values, or the parameters of the pre-trained classification sub-model can be initialized as set values.

[0091] Step S0032, obtaining positive sample information corresponding to the negative sample information, and determining the negative sample information and the positive sample information as a training set.

[0092] Here, the positive sample information corresponding to the negative sample information refers to sample information that is the same in type as the negative sample information but has normal label information and is the same in quantity as the negative sample information.

[0093] In the embodiments of the present application, the negative sample information and the positive sample information corresponding to the negative sample information are collectively used as a training set to train the pre-trained classification sub-model.

[0094] Step S0033, performing feature extraction on the positive sample data using the trained feature extraction sub-model to obtain a positive feature vector set.

[0095] Here, the feature extraction on the positive sample data is performed through the trained feature extraction sub-model, and the feature extraction process can refer to the above steps S0021 to S0024, thereby obtaining the positive feature vector set.

[0096] Step S0034, performing feature extraction on the training sample data of the training sample information in the training set in sequence using the trained feature extraction sub-model to obtain a plurality of training feature vectors.

[0097] Here, the training sample information includes the above-mentioned negative sample information and the positive sample information corresponding to the negative sample information, and the implementation process of step S0034 can refer to the above steps S0021 to S0024, thereby obtaining a plurality of training feature vectors. Among the plurality of training feature vectors, there are both positive feature vectors and negative feature vectors.

[0098] Step S0035, training the parameters of the pre-trained classification sub-model based on the plurality of training feature vectors and the positive feature vector set to obtain a trained classification sub-model.

[0099] Here, each training feature vector can be sequentially determined as the feature vector to be trained, and then the second target positive feature vector corresponding to the feature vector to be trained can be determined. Finally, backpropagation training is performed using the feature vector to be trained and the second target positive feature vector to obtain the trained sub-model.

[0100] Through steps S0031 to S0035 above, the parameters of the pre-trained classification sub-model are first initialized, and then the negative sample information and the corresponding positive sample information are determined as the training set. Next, features are extracted from the positive sample data and the training data in the training set to obtain a set of positive feature vectors and multiple feature vectors to be trained. Finally, backpropagation training is performed using the feature vectors to be trained and the second target positive feature vectors corresponding to the feature vectors to be trained to obtain the trained classification sub-model.

[0101] Step S004: Based on the trained feature extraction sub-model and the trained classification sub-model, determine the trained detection model.

[0102] Here, the trained feature extraction sub-model and the trained classification sub-model can be jointly defined as the trained detection model. On the one hand, features are extracted through the trained feature extraction sub-model to obtain the corresponding feature vectors; on the other hand, the trained classification sub-model is used to predict or classify the feature vectors to obtain the detection results and achieve the purpose of detection.

[0103] In this embodiment, through steps S001 to S004, a trained feature extraction sub-model and a pre-trained classification sub-model are obtained by training positive sample data. Then, a small amount of negative sample information is acquired, and features are extracted from the negative sample information using the trained feature extraction sub-model to obtain a small number of negative feature vectors. Next, the pre-trained classification sub-model is trained using these negative feature vectors to obtain a trained classification sub-model. Finally, the trained feature extraction sub-model and the trained classification sub-model are determined as the trained detection model. This trained detection model can accurately predict detection results. Thus, a highly accurate trained detection model can be determined using only a small amount of negative sample information. In other words, using the trained detection model for anomaly detection can improve the accuracy and efficiency of the detection results.

[0104] In some embodiments, such as Figure 5 As shown, step S0035 above, "training the parameters of the pre-trained classification sub-model based on multiple training feature vectors and positive feature vector sets to obtain the trained classification sub-model," can be achieved through the following steps S351 to S355:

[0105] Step S351: Select the feature vector to be trained from multiple training feature vectors.

[0106] Here, any training feature vector can be selected from multiple training feature vectors and determined as the feature vector to be trained, until each training feature vector has been selected, that is, traversing each training feature vector and determining each training feature vector as the feature vector to be trained in turn.

[0107] Step S352: Obtain the target label information corresponding to the feature vector to be trained and the training type corresponding to the feature vector to be trained.

[0108] Here, the training set includes negative sample information and the corresponding positive sample information. The sample information includes the label information and the type of the sample information. The label information refers to normal or abnormal, and the type refers to the type of signal.

[0109] In this embodiment, the label information included in the positive sample information is normal, while the label information included in the negative sample information is abnormal. Furthermore, the training type corresponding to the feature vector to be trained can be directly obtained from the training set based on the type acquisition instruction.

[0110] Step S353: Determine the second target positive feature vector of type to be trained from the set of positive feature vectors.

[0111] Here, the set of positive feature vectors includes positive feature vectors of various types. We can first obtain the type of each positive feature vector in the set of positive feature vectors, then determine the positive feature vector of type to be trained from the set of positive feature vectors, and determine the positive feature vector of type to be trained as the second target positive feature vector.

[0112] Step S354: Determine the second similar feature vector between the feature vector to be trained and the second target positive feature vector.

[0113] Here, the implementation process of step S354 is similar to that of step S104 above. Therefore, the implementation process of step S354 can refer to the implementation process of step S104 above.

[0114] Step S355: Backpropagation training is performed on the pre-trained classification sub-model based on the second similarity feature vector and target label information to obtain the trained classification sub-model.

[0115] In actual implementation, such as Figure 6 As shown, this can be achieved through the following steps S3551 to S3553:

[0116] Step S3551: Use the pre-trained classifier sub-model to predict the second similarity feature vector to obtain the predicted label information.

[0117] Here, the pre-trained classification sub-model can include a full connection layer and an activation function, where the full connection layer is capable of mapping the second similar feature vector to a sample label space, and then the activation function is capable of outputting a probability that the to-be-trained signal is a normal signal.

[0118] In the embodiments of the present application, on the one hand, the probability that the to-be-trained signal is a normal signal can be directly determined as the prediction label information. On the other hand, the probability that the to-be-trained signal is a normal signal can also be compared with a probability threshold value, if the probability that the to-be-trained signal is a normal signal is greater than or equal to the probability threshold value, it is determined that the prediction label information is normal, and if the probability that the to-be-trained signal is a normal signal is less than the probability threshold value, it is determined that the prediction label information is abnormal. The probability threshold value can be 0.75, 0.8, 0.85, etc.

[0119] Step S3552, difference information between the prediction label information and the target label information is determined.

[0120] Here, if the prediction label information is the probability that the to-be-trained signal is a normal signal, the target label information is the probability that the training sample information corresponding to the to-be-trained feature vector is a normal signal, where whether the training sample information is a normal signal is known, when the training sample information is a normal signal, the probability that the training sample information is a normal signal is 1, and when the training sample information is an abnormal signal, the probability that the training sample information is a normal signal is 0.

[0121] In the embodiments of the present application, the more similar the prediction label information and the target label information are, the smaller the difference between them represents, and then the difference information is also smaller, and if the prediction label information and the target label information are more dissimilar, the greater the difference between them represents, and then the difference information is also greater.

[0122] Step S3553, the pre-trained classification sub-model is trained based on the difference information and a difference threshold value, to obtain a trained classification sub-model.

[0123] Here, the difference threshold value can be a default value or a custom value, for example, the difference threshold value can be 0.02, 0.025, 0.03, etc.

[0124] In the embodiments of the present application, if the difference information is less than the difference threshold value, it represents that the error is within the allowable range, and then the trained classification sub-model is obtained. If the difference information is greater than or equal to the difference threshold value, it represents that the error exceeds the allowable range, and then the parameters in the pre-trained classification sub-model are adjusted until the difference information is less than the difference threshold value, and then the trained classification sub-model is obtained.

[0125] Thus, through the steps S3551 to S3553, the pre-trained classification sub-model is trained by using the back propagation training, so as to obtain the trained classification sub-model capable of accurate prediction.

[0126] In the embodiments of the present application, through the steps S351 to S355, each training feature vector is sequentially determined as a to-be-trained feature vector, and the to-be-trained type of the to-be-trained feature vector is determined; then, the positive feature vectors of the to-be-trained type in the positive feature vector set are determined as second target positive feature vectors; then, the second similar feature vectors between the to-be-trained feature vector and the second target positive feature vectors are determined, and the second similar feature vectors are input into the pre-trained classification sub-model, and the trained classification sub-model is obtained by using the back propagation training method. On the one hand, the training can be quickly completed by using the back propagation training to obtain the trained classification sub-model; and since the training feature vectors include equal numbers of positive sample data and negative sample data, the trained classification sub-model obtained by training can accurately identify whether the to-be-detected signal is normal or not, thereby improving the detection effect.

[0127] In some embodiments, the step S102 "determining the first target positive feature vector corresponding to the to-be-detected signal from the positive feature vector set" can be implemented through the following steps S1021 and S1022:

[0128] In step S1021, the to-be-detected signal is parsed to obtain the to-be-detected type corresponding to the to-be-detected signal.

[0129] Here, the to-be-detected signal carries the to-be-detected type corresponding to the to-be-detected signal, which can be carried in the header or tail of the to-be-detected signal. Based on this, the header information parsing or tail information parsing method can be used to obtain the to-be-detected type corresponding to the to-be-detected signal.

[0130] In step S1022, the positive feature vector corresponding to the to-be-detected type in the positive feature vector set is determined as the first target positive feature vector.

[0131] Here, the positive feature vector set includes positive feature vectors corresponding to various types, and similarly, each positive feature vector in the positive feature vector set corresponds to a type. Based on this, the positive feature vector of the to-be-detected type is determined from the positive feature vector set, and the positive feature vector of the to-be-detected type is determined as the first target positive feature vector.

[0132] Thus, the first target positive feature vector is quickly determined based on the to-be-detected type, and then the abnormality detection is performed based on the first target positive feature vector, so as to obtain the detection result.

[0133] Based on the above embodiments, the embodiments of the present application provide a detection method, such as Figure 7As shown, the detection method comprises the following steps S701 to S704:

[0134] In step S701, the to-be-detected signal is parsed to obtain lead impedance information of the to-be-detected signal.

[0135] Here, the implementation process of step S701 is similar to the implementation process of step S1021 described above, and therefore the implementation process of step S701 can refer to the implementation process of step S1021 described above.

[0136] In step S702, it is determined whether the lead impedance information represents that the lead impedance is abnormal.

[0137] Here, it is assumed that the lead impedance information is 1, representing that the lead impedance is abnormal, which means that the lead wire for collecting the to-be-detected signal may be detached, and then step S703 is entered; it is assumed that the lead impedance information is 0, representing that the lead impedance is not abnormal, which means that the lead wire for collecting the to-be-detected signal is connected normally, and then step S705 is entered.

[0138] In step S703, it is determined that the detection result is abnormal.

[0139] Here, the lead impedance is abnormal, which means that the lead wire for collecting the to-be-detected signal may be detached, and then it is directly determined that the to-be-detected result is abnormal.

[0140] In step S704, step S101 is entered.

[0141] Here, the lead impedance is not abnormal, which means that the lead wire for collecting the to-be-detected signal is connected normally, and then the to-be-detected signal collected is detected, that is, step S101 is entered.

[0142] Through the above steps S701 to S704, it is determined in advance whether the lead impedance is abnormal. In the case that the lead impedance is abnormal, it is directly determined that the detection result is abnormal, without the need for feature extraction, prediction processing and the like, so as to improve the detection speed and simplify the detection process. In the case that the lead impedance is not abnormal, step S101 is entered, and the detection result is determined through feature extraction, prediction processing and the like, so as to improve the comprehensiveness of the detection.

[0143] Based on the above embodiments, the application provides a detection method for detecting whether the PSG device is abnormal, which can also be referred to as a PSG abnormal signal detection method. The probability of occurrence of the PSG device abnormal state is much smaller than that of the normal state. The reasons for the PSG device to collect abnormal signals mainly include interference noise, wearing error, device falling off in the middle, abnormal lead contact, sensor signal abnormality, and many other types of abnormalities. The application embodiments propose an abnormality detection model, which comprehensively considers various factors such as the types of PSG device sensors, wearing complexity, and sleep behavior in the sleep monitoring process. The technical problems that can be solved include: 1) Due to the different frequencies of different sleep signal characteristic waves, the same lead signal will also change with the change of the sleep state. Solving the preprocessing problem of multi-element heterogeneous PSG signals is the key to solving the abnormality detection problem with a model. 2) After fully analyzing the characteristics of the sleep monitoring signal, the application embodiments design a sleep signal classification model for abnormality detection. 3) In sleep monitoring, the number of abnormal samples is small, and the types of abnormalities are many. In order to improve the effect of abnormality detection, the application embodiments propose a transfer learning architecture that fine-tunes the abnormality classification model using a small amount of abnormal data.

[0144] The application embodiments provide an abnormality detection system, Figure 8 An abnormality detection system framework structure diagram is provided for the application embodiments, as Figure 8 shown, the abnormality detection system 800 includes a PSG device 801, an abnormality detection component 802, a risk control platform system 803, and a user terminal 804.

[0145] In some embodiments, the PSG device 801 includes a signal acquisition unit 8011 and a signal processing module 8012. Wherein:

[0146] The PSG signal acquisition unit 8011 is mainly used to receive physiological signals from the human body when connected to the human body, mainly including EEG patches, eye movement electromyography patches, mandibular electromyography patches, ECG patches, leg movement electromyography patches, snoring sound sensors, nasal heat sensor, nasal pressure sensor, chest and abdomen sensor, blood oxygen sensor, body position sensor and other various leads. The signal processing module 8012 includes a preamplifier and a bandpass filter, which is mainly used to calibrate and amplify the various original lead signals collected by the signal acquisition unit into high-quality electrical signals.

[0147] In some embodiments, the abnormality detection component 802 includes an abnormality detection module 8021 and a wireless communication module 8022. Wherein:

[0148] The anomaly detection module 8021 includes a task allocator, an anomaly detection model, a graphics processing unit (GPU), and an anomaly analysis unit. The task allocator is configured to allocate uploaded multi-lead signal data by minute and sequentially pass the data through the anomaly detection model. Since the total number of leads of sleep signals is large, the time rhythm of detection, the type of hardware device, and the model loading process are fully considered when deploying the anomaly detection model. In the hardware design, a high-speed parallel computing module (i.e., the GPU) is introduced for the first time in a PSG monitoring device. In this embodiment, the anomaly detection model is preprocessed by a model optimizer TensorRT, and the network model output by the optimizer is used as the final detection model. In this way, the goal of real-time monitoring of sleep state and detection of sleep anomaly signals on an embedded sleep device is achieved. The results output by the anomaly detection model are integrated by the anomaly analysis unit, and the anomaly detection results are output to the wireless communication module 8022 at a set time frequency. The wireless communication module 8022 is configured to communicate with the risk control platform system 803 and send the anomaly detection results to the risk control platform system 803.

[0149] The risk control platform system 803 includes a fault reminding module 8031, a fault analysis module 8032, a PSG device management module 8033, and a user management module 8034. Among them:

[0150] The fault reminding module 8031 includes a fault receiving module and a fault sending module. The fault receiving module is configured to receive anomaly detection results, and the fault sending module is configured to push the anomaly detection results to the user terminal 804 through a network.

[0151] The fault analysis module 8032 includes a fault information statistical module and a fault risk early warning module. Users can view fault information details and statistical results of different PSG devices in the risk control platform 803, including the names of the devices that have faults, the patient information used, the lead names, the time and duration of the occurrence of the faults, and the number of times of the occurrence of the faults. Through the statistical results of the fault information, fault risk early warning can be achieved, and users can understand the PSG devices that have the most faults and the corresponding leads, so as to facilitate early replacement of the devices and the corresponding consumables.

[0152] The PSG device management module 8033 includes a PSG device registration module, a PSG device binding module, and a PSG device information management module. The detection method in this embodiment supports registration, deletion, and information modification of PSG devices of different models and different manufacturers. Doctors can bind, unbind, and modify the relationship between PSG devices and corresponding patients.

[0153] The user management module 8034 includes a user registration module and an authority management module. The user registration module is used for patient registration, patient family registration, and doctor registration, and the patient and family registration mainly refers to a user and his / her family using a PSG device for sleep monitoring. The authority management module is used for managing the authority of a person, and mainly includes authority distribution, modification, and cancellation for viewing PSG device data, for example, can include association, cancellation, and modification of the relationship between a doctor and a patient, and data authority management.

[0154] The user terminal 804 is used for viewing the abnormality detection result. The user terminal 804 can be a tablet computer, a mobile phone, a computer, or the like. After receiving the abnormality detection reminder on the user terminal 804, the user can perform lead reconnection, lead replacement, or the like of the PSG device to continue sleep monitoring.

[0155] The connection between the user terminal 804 and the risk control platform system 803 is based on a high-speed network, for example, a fiber network or a 5th Generation Mobile Communication Technology (5G) network. The connection between the abnormality detection component 802 and the risk control platform system 803 is based on a 5G network. The high bandwidth and low latency of the 5G network can guarantee the stability and speed of information transmission.

[0156] Small sample learning is less used in the field of abnormality detection. Small sample refers to that a large number of abnormal signals are not needed for model training, but the expected effect needs to be achieved. A neural network model pre-trained by similar signal samples is needed, and then the detection architecture is optimized and designed according to the sleep signal and device characteristics. Therefore, the embodiment of the present application proposes a PSG signal abnormality detection architecture based on small sample learning, as shown in FIG. 8. Figure 9 As shown in FIG. 8, the PSG signal abnormality detection architecture based on small sample learning includes a PSG signal preprocessing module 801, an abnormality detection component 802, and a risk control platform system 803.

[0157] For real-time monitoring data 901, first check whether the lead impedance 902 is abnormal. If the impedance is abnormal, directly output the detection of the corresponding lead. If the impedance is normal, pre-process the sleep monitoring data 903, and then input different signals in sequence into a signal detection model 904 to generate a feature vector 905 of the real-time monitoring data, and then input the feature vector 905 and a forward feature vector 906 of the corresponding lead into an abnormal signal classifier 907 to detect whether the real-time monitoring data 901 is abnormal. The real-time monitoring data 901 is equivalent to the to-be-detected signal in the above embodiment. The data preprocessing 903 and the signal detection model 904 are equivalent to the trained feature extraction sub-model in the above embodiment. The forward feature vector 906 of the corresponding lead is equivalent to the first target forward feature vector in the above embodiment. The abnormal signal classifier 907 is equivalent to the trained classification sub-model in the above embodiment. The forward feature vector set is equivalent to the forward feature vector set in the above embodiment.

[0158] The PSG sleep signal data is used for model pre-training of the signal detection model, then the pre-trained signal detection model is used to generate positive and negative sample feature sets, the abnormal signal classifier is fine-tuned, and finally the model is simplified by TensorRT and deployed on the PSG device. The specific steps include the following steps one to three:

[0159] Step one, model pre-training.

[0160] Because the abnormal data in the sleep monitoring data is less, the normal data is more, that is, the negative sample data is less, and the positive sample data is more, therefore, the sleep signal classification model is generated by using the normal sleep monitoring data in the embodiment of the application, as the pre-trained abnormal monitoring model, that is, the pre-trained signal classifier. The sleep monitoring data has the characteristics of multi-element heterogeneity, different physiological signals correspond to different lead sampling frequencies, and the periodicity and characteristic waveform of different signals are completely different. In view of these characteristics of the sleep monitoring data, the whole process of data preprocessing, model design and model training is given in the embodiment of the application.

[0161] The data preprocessing includes the following four processes:

[0162] Process 1, all PSG signals in the training set are processed by the up-sampling technology based on linear interpolation filtering. The normal sleep monitoring signal is used as the training set, because the sampling frequencies of the signals of different leads are different, first, the electroencephalogram, electroencephalogram, electromyogram, electrocardiogram and respiration and other time series physiological signal data are synchronized, and all the data are up-sampled at the maximum sampling frequency.

[0163] Process 2, in order to improve the time resolution and frequency resolution of the input data in the global range, the up-sampled data is cut by a 1-minute window and a 15-second interval sliding window, each frame of data is used as the input of the neural network, and the sample label is the type of the signal.

[0164] Process 3, because the characteristic wave frequencies of different lead sleep signals are different, the signals of the same lead will also change with the change of the sleep state, and only the respiration and electrocardiogram signals in the sleep signal have periodicity, therefore, in the embodiment of the application, the short-time Fourier transform is used to perform time-frequency analysis on each frame of sleep signal, and the output time-frequency matrix is used as another input of the training model.

[0165] Process 4, considering the diversity of normal sleep signals and the uncertainty of abnormal sleep signals, a dynamic time-frequency analysis method is needed to analyze the mutation signals and non-stationary signals, and sensitively reflect the mutation of the signal. In the embodiment of the application, the event-related spectrum in the electroencephalogram signal analysis is used to extract the mutation feature, and the extraction formula of the event-related spectrum is shown in formula (1).

[0166]

[0167] Here, each frame of sleep signal is divided into n = 10 segments, the data power spectrum of a sliding time window centered at time t in each segment of data is calculated, and then the average value F k (f, t) is the spectral estimate of frequency f and time point t.

[0168] For model design, in the embodiments of the present application, there are two types of input data, namely the data obtained by up-sampling the original signal after fixed time length division and the data with time-frequency characteristics obtained by short-time Fourier transform and event-related spectrum calculation of the signal, which can be regarded as time series and image data respectively.

[0169] For input data with time-frequency characteristics, it is regarded as image data, and in the embodiments of the present application, a residual network (ResNet18) with 18 layers is used as a feature extraction network for time-frequency signals, and the signals of respiration, blood oxygen, electroencephalogram, electrooculogram, electrocardiogram and electrooculogram after time-frequency transformation are used as the input of the ResNet18 network.

[0170] After fully considering the data size, time series characteristics and signal characteristics, for the up-sampled and divided data of the original signal, one-dimensional convolution and long short-term memory network (LSTM) are selected to construct a classification model, the model is composed of two LSTM networks and three one-dimensional convolution networks with different scales, and the structure diagram is as shown in Figure 10 .

[0171] In Figure 10 , the up-sampled data sequentially passes through two layers of LSTM 1001, and then passes through three layers of one-dimensional convolution layer 1002 and pooling layer 1003 to obtain a time domain feature vector; at the same time, the up-sampled data after video analysis is frequency domain image information, which will be processed by an 18-layer residual network 1004 to obtain a frequency domain feature vector; finally, a joint fusion 1005 is used to dynamically fuse the features extracted from the same original data by the three network models, and then a classifier 1006 is used to calculate the signal classification result.

[0172] For classification model training, as shown in Figure 11 , the network model is trained using PSG signal positive sample data, the data distribution after preprocessing is normalized, then the hyperparameters are set according to the steps of training deep neural network, the network model is initialized and then the model is trained, and finally the classification model of the positive sample signal is output. In Figure 11In the first step, the three preprocessed data points are normalized, and then classified based on the network model 1101 to obtain the prediction results. Next, the network model is trained through backpropagation using the labels and prediction results. On the other hand, training stops when the loss function has reached the required number of iterations, but continues if the required number of iterations has not yet been reached, using the loss function and optimization function for further training.

[0173] Step two, transfer learning.

[0174] In sleep monitoring, due to the limited number of abnormal samples and the large variety of abnormality categories, this application embodiment uses a small amount of abnormal data to fine-tune a pre-trained model to obtain an abnormal signal detection model in order to improve the anomaly detection effect. This application embodiment designs a transfer learning architecture for signal anomaly detection based on Siamese networks in few-shot learning. The anomaly classifier is trained using this architecture, and its structural framework is as follows: Figure 12 As shown. In Figure 12 It includes a feature extraction module 1201 and an anomaly detection classifier 1202. The training set is processed by the feature extraction module 1201 to obtain the corresponding feature vector X. i ; and also from the determined set of positive eigenvectors, and eigenvector X i The corresponding positive eigenvector M n Finally, the feature vector X i and positive eigenvector M n The similarity vectors are input into the anomaly detection classifier 1202 to obtain the classification result. The anomaly detection classifier 1202 consists of a classifier D and an activation function.

[0175] Unlike traditional transfer learning methods used in few-shot learning, this embodiment does not use a small number of abnormal samples as the support set. This is because in sleep monitoring, the input to the anomaly detection model is mostly normal data, so the anomaly detection model needs to be able to distinguish between positive and negative samples. Therefore, the improvements made by this embodiment to the construction of the support set and training set, as well as the training method, for the sleep anomaly detection scenario include the following eight processes:

[0176] Step 1: First, randomly initialize the parameters of the anomaly classification model.

[0177] Step 2: Use the abnormal signals and the same number of normal signals with the same attributes as the training set for few-sample learning, denoted as Trainset, and denote each sample as (x... i y n (index), x i The original sequence signal, y n This is a signal category label; the index represents abnormal or normal.

[0178] Flow 3, remove the classifier of the signal classification model, and retain the feature extraction part, denoted as M. Input each type of normal signal in the normal signal training set into the signal classification model M, calculate the average feature vector of each type of signal, generate a positive sample feature set, denoted as (M1, …, M N ), wherein the positive sample feature set is equivalent to the above-mentioned positive feature vector set.

[0179] Flow 4, in the training process, randomly select data (x i , y n , index) in Trainset as the input of the model, and output the feature vector X i .

[0180] Flow 5, according to the category y n of the feature vector X i , select the corresponding vector in the positive sample feature set, denoted as M n .

[0181] Flow 6, the parameters of the model M are fixed, and X i , M n are used to train the newly added network structure, i.e., the abnormality monitoring classifier, and the label is index.

[0182] Flow 7, since the feature vector X i , M n is not a unit vector, a cosine similarity function can be used to measure the similarity of the vectors in the embodiment of the application, and the similarity function is denoted as Sim(X i , M n ), which can be determined by formula (2).

[0183]

[0184] Flow 8, finally, the results are output through the full connection layer and the Sigmoid activation function, compared with the label, and the abnormality classification model is fine-tuned by using the cross-entropy loss function.

[0185] Step three, model deployment.

[0186] Since there are many leads of sleep signals, the time rhythm of detection, the type of hardware device and the model loading process need to be fully considered when deploying the abnormality detection model.

[0187] First, in the hardware design, a high-speed parallel computing module is introduced for the first time in the PSG monitoring device. The abnormality detection model designed in the embodiment of the application is preprocessed by the model optimizer TensorRT, and the network model output by the optimizer is used as the final detection model. In this way, the goal of real-time monitoring of sleep state and detection of sleep abnormal signal on an embedded sleep device is achieved.

[0188] Secondly, the final loaded model processing is divided into two parts, first, the sleep signal is input in sequence, the signal detection model extracts the feature vector of the signal in real time, and then the abnormal classification model inputs the feature vector and the normal mean feature vector corresponding to the signal, and finally outputs whether the signal is abnormal.

[0189] In the embodiment of the present application, as shown in Figure 13 the abnormality detection for the PSG device can be implemented by the following steps S1301 to S1303:

[0190] Step S1301, the registration, binding of the PSG device and the registration of the user are completed in the risk control platform system, and an abnormality detection component is installed on the existing PSG device, and the abnormality detection component is connected with the risk control platform system through a wireless communication module.

[0191] Step S1302, the PSG device is started, and the lead signal passes through the task distributor in the abnormality detection component, the task distributor passes each lead data through the abnormality detection model in turn at a minute level, the model result is stored in the abnormality analysis unit, after all the lead data pass through the abnormality detection model, the abnormality analysis unit integrates the abnormality detection result according to the time frequency set in advance, and sends the result to the risk control platform system through the wireless communication module.

[0192] Here, the PSG device can be worn on the object to be detected, and the PSG device is started.

[0193] Step S1303, after the risk control platform system receives the abnormality detection result, the result is pushed to the user terminal.

[0194] Here, after the doctor or the patient's family member sees the abnormality prompt, the lead adjustment and the patient care can be performed in time according to the prompt result, so as to avoid the situation of endangering life, at the same time, the user can check the fault information statistics and obtain the fault risk early warning on the risk control platform system, the user can know the PSG device with the most fault times and the corresponding lead, so as to facilitate the early replacement of the device and the corresponding lead consumables.

[0195] The embodiment of the application provides a PSG signal anomaly detection method based on small sample learning, trains a neural network through a small amount of anomaly samples to perform anomaly detection, and solves the problem of a lack of a large amount of anomaly sleep data samples of multi-element heterogeneous PSG signals. The anomaly of various types of signals can be detected through one model, the problem of constant refreshing of a multi-model deep neural network when the multi-model deep neural network is deployed on equipment is avoided, and time delay caused by real-time acquisition is reduced. In addition, the detection method in the embodiment of the application can only need to perform hardware upgrading on an existing PSG device in the form of adding an anomaly detection component, and the change is small and the cost is lower. Meanwhile, the PSG device can be adapted to PSG devices of different brands and different models, and the application scenario is more extensive. Furthermore, 5G communication mode is adopted, so that the transmission of data is more stable and fast. The risk control platform system can collect anomaly data of PSG devices of different brands and different models, realize risk control of the devices by using data analysis, and maintain and analyze the relationship among doctors, patients and devices, and the analysis of the data has a certain research effect on PSG device manufacturers, doctors and the like.

[0196] Based on the foregoing embodiment, the embodiment of the application provides a detection device, each module included in the device and each unit included in each module can be implemented by a processor in the detection device; of course, the device can also be implemented by a corresponding logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA) and the like.

[0197] The embodiment of the application further provides a detection device, Figure 14 The composition structure diagram of the detection device provided by the embodiment of the application is shown as Figure 14 As shown in the figure, the detection device 1400 includes:

[0198] The first acquisition module 1401 is configured to acquire a to-be-detected signal, a positive feature vector set and a trained detection model, wherein the trained detection model includes a trained feature extraction submodel and a trained classification submodel, the positive feature vector set is obtained by performing feature extraction on positive sample data by using the trained feature extraction submodel, and the trained classification submodel is obtained by training a pre-trained classification submodel by using negative sample data, and the number of the negative sample data is less than the number of the positive sample data;

[0199] The first determination module 1402 is configured to determine a first target positive feature vector corresponding to the to-be-detected signal from the set of positive feature vectors.

[0200] The first feature extraction module 1403 is configured to perform feature extraction on the to-be-detected signal by using the trained feature extraction sub-model to obtain a to-be-detected feature vector.

[0201] The second determination module 1404 is configured to determine a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector.

[0202] The first prediction module 1405 is configured to perform prediction processing on the first similar feature vector by using the trained classification sub-model to obtain a detection result.

[0203] In some embodiments, the detection apparatus 1400 further includes:

[0204] The second acquisition module is configured to acquire a pre-trained detection model trained by using the positive sample data, where the pre-trained detection model includes a trained feature extraction sub-model and a pre-trained classification sub-model.

[0205] The third acquisition module is configured to acquire negative sample information and perform feature extraction on the negative sample information by using the trained feature extraction sub-model to obtain a negative feature vector.

[0206] The first training module is configured to train the pre-trained classification sub-model by using the negative feature vector to obtain a trained classification sub-model.

[0207] The third determination module is configured to determine a trained detection model based on the trained feature extraction sub-model and the trained classification sub-model.

[0208] In some embodiments, the first training module includes:

[0209] The initialization sub-module is configured to initialize parameters of the pre-trained classification sub-model.

[0210] The first acquisition sub-module is configured to acquire positive sample information corresponding to the negative sample information, and determine the negative sample information and the positive sample information as a training set.

[0211] The first feature extraction sub-module is configured to perform feature extraction on the positive sample data by using the trained feature extraction sub-model to obtain the set of positive feature vectors.

[0212] The second feature extraction submodule is configured to sequentially perform feature extraction on training sample data of training sample information in the training set by using the trained feature extraction submodel to obtain a plurality of training feature vectors, wherein the training sample information includes the negative sample information and positive sample information corresponding to the negative sample information.

[0213] The first training submodule is configured to train parameters of the pre-trained classification submodel based on the plurality of training feature vectors and the set of positive feature vectors to obtain a trained classification submodel.

[0214] In some embodiments, the first training submodule includes:

[0215] The selection unit is configured to select a to-be-trained feature vector from the plurality of training feature vectors.

[0216] The first acquisition unit is configured to acquire target label information corresponding to the to-be-trained feature vector and a to-be-trained type corresponding to the to-be-trained feature vector.

[0217] The first determination unit is configured to determine a second target positive feature vector of the to-be-trained type from the set of positive feature vectors.

[0218] The second determination unit is configured to determine a second similar feature vector between the to-be-trained feature vector and the second target positive feature vector.

[0219] The first training unit is configured to perform back propagation training on the pre-trained classification submodel based on the second similar feature vector and the target label information to obtain a trained classification submodel.

[0220] In some embodiments, the first training unit includes:

[0221] The first prediction subunit is configured to perform prediction processing on the second similar feature vector by using the pre-trained classification submodel to obtain predicted label information.

[0222] The first determination subunit is configured to determine difference information between the predicted label information and the target label information.

[0223] The first training unit is configured to perform back propagation training on the pre-trained classification submodel based on the difference information and a difference threshold to obtain a trained classification submodel.

[0224] In some embodiments, the third acquisition module includes:

[0225] The sampling submodule is configured to sequentially perform up-sampling and cutting processing on the negative sample data to obtain time domain data.

[0226] a third feature extraction sub-module, configured to perform feature extraction processing on the time domain data to obtain a time domain feature vector;

[0227] a fourth feature extraction sub-module, configured to perform time-frequency analysis on the time domain data to obtain frequency domain data, and perform feature extraction processing on the frequency domain data to obtain a frequency domain feature vector;

[0228] a fusion sub-module, configured to fuse the time domain feature vector and the frequency domain feature vector to obtain the negative feature vector.

[0229] In some embodiments, the first determination module 1402 includes:

[0230] a parsing sub-module, configured to parse the to-be-detected signal to obtain a to-be-detected type corresponding to the to-be-detected signal;

[0231] a first determination sub-module, configured to determine, as the first target positive feature vector, a positive feature vector corresponding to the to-be-detected type in the positive feature vector set.

[0232] In some embodiments, the detection apparatus 1400 further includes:

[0233] a parsing module, configured to parse the to-be-detected signal to obtain lead impedance information of the to-be-detected signal;

[0234] a fourth determination module, configured to determine that the detection result is abnormal if the lead impedance information indicates that there is an abnormality in lead impedance.

[0235] It should be noted that the description of the detection apparatus of the embodiments of the present application is similar to the description of the method embodiments described above, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the present apparatus embodiments, please refer to the description of the method embodiments of the present application for understanding.

[0236] It should be noted that, in the embodiments of the present application, if the detection method described above is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality 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 methods described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various program code storage media. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.

[0237] Correspondingly, the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the detection method provided in the above embodiment.

[0238] The embodiment of the present application provides a detection device, Figure 15 The structural diagram of the detection device provided by the embodiment of the present application is shown in Figure 15 The detection device 1500 includes a processor 1501, at least one communication bus 1502, a user interface 1503, at least one external communication interface 1504 and a memory 1505. The communication bus 1502 is configured to realize the connection and communication between the components. The user interface 1503 can include a display screen, and the external communication interface 1504 can include a standard wired interface and a wireless interface. The processor 1501 is configured to execute the program of the detection method stored in the memory to implement the detection method provided in the above embodiment.

[0239] The above description of the detection device and the storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the detection device and the storage medium embodiment of the present application, please refer to the description of the method embodiment of the present application.

[0240] It should be noted that: the above description of the storage medium and the detection device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium and the detection device embodiment of the present application, please refer to the description of the method embodiment of the present application.

[0241] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The sequence number of the above embodiment of the present application is only for description, not representing the advantages and disadvantages of the embodiment.

[0242] It should be noted that, in the present document, the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusions, such that a process, method, article, or apparatus that comprises a list of elements does not necessarily include only those elements in the list, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0243] In several embodiments provided in the present application, it should be understood that the disclosed detection device and method can be implemented in other ways. The above-described detection device embodiments are only illustrative, for example, the division of the units is only a logical functional division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0244] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units; they can be located in one place or distributed on multiple network units; and part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0245] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.

[0246] Those of ordinary skill in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the aforementioned program can be stored in a computer readable storage medium, and the program executes the steps of the above method embodiments when executed; and the aforementioned storage medium includes: mobile storage device, ROM, magnetic disc or optical disc, and various storage medium that can store program codes.

[0247] Alternatively, the above-mentioned integrated units of the present application, if realized in the form of software function modules and sold or used as independent products, can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to make an AC execute all or part of the method described in the embodiments of the present application. The aforementioned storage medium includes mobile storage devices, ROM, magnetic discs or optical discs and various media that can store program codes.

[0248] The above is only an embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of detection, characterized in that, The method comprises: obtaining a to-be-detected signal, a positive feature vector set and a trained detection model, wherein the trained detection model comprises a trained feature extraction sub-model and a trained classification sub-model, the positive feature vector set is obtained by performing feature extraction on positive sample data by using the trained feature extraction sub-model, and the trained classification sub-model is obtained by training a pre-trained classification sub-model by using negative sample data, and the number of the negative sample data is less than the number of the positive sample data; determining a first target positive feature vector corresponding to the to-be-detected signal from the positive feature vector set; performing feature extraction on the to-be-detected signal by using the trained feature extraction sub-model to obtain a to-be-detected feature vector; determining a first similar feature vector between the first target positive feature vector and the to-be-detected feature vector; performing prediction processing on the first similar feature vector by using the trained classification sub-model to obtain a detection result.

2. The method of claim 1, wherein, The method further comprises: obtaining a pre-trained detection model trained by using the positive sample data, wherein the pre-trained detection model comprises a trained feature extraction sub-model and a pre-trained classification sub-model; obtaining negative sample information and performing feature extraction on the negative sample information by using the trained feature extraction sub-model to obtain a negative feature vector; training the pre-trained classification sub-model by using the negative feature vector to obtain a trained classification sub-model; determining a trained detection model based on the trained feature extraction sub-model and the trained classification sub-model.

3. The method of claim 2, wherein, The training of the pre-trained classification sub-model by using the negative feature vector to obtain a trained classification sub-model comprises: initializing parameters of the pre-trained classification sub-model; obtaining positive sample information corresponding to the negative sample information, and determining the negative sample information and the positive sample information as a training set; performing feature extraction on the positive sample data by using the trained feature extraction sub-model to obtain the positive feature vector set; performing feature extraction on training sample data of training sample information in the training set by using the trained feature extraction sub-model in sequence to obtain a plurality of training feature vectors, wherein the training sample information comprises the negative sample information and the positive sample information corresponding to the negative sample information; training parameters of the pre-trained classification sub-model based on the plurality of training feature vectors and the positive feature vector set to obtain a trained classification sub-model.

4. The method of claim 3, wherein, The training of the pre-trained classification sub-model based on the plurality of training feature vectors and the positive feature vector set to obtain a trained classification sub-model comprises: selecting a to-be-trained feature vector from the plurality of training feature vectors; obtaining target label information corresponding to the to-be-trained feature vector and a to-be-trained type corresponding to the to-be-trained feature vector; determining a second target positive feature vector of the to-be-trained type from the positive feature vector set; determining a second similar feature vector between the to-be-trained feature vector and the second target positive feature vector; The pre-trained classification sub-model is backpropagated and trained based on the second similarity feature vector and the target label information to obtain the trained classification sub-model.

5. The method of claim 4, wherein, The step of backpropagating the pre-trained classification sub-model based on the second similarity feature vector and the target label information to obtain the trained classification sub-model includes: The pre-trained classification sub-model is used to predict the second similarity feature vector to obtain predicted label information; Determine the difference between the predicted label information and the target label information; Based on the difference information and difference threshold, the pre-trained classification sub-model is backpropagated to obtain a trained classification sub-model.

6. The method as claimed in claim 2, wherein, The step of using the trained feature extraction sub-model to extract features from the negative sample information to obtain a negative feature vector includes: The negative sample data is sequentially upsampled and segmented to obtain time-domain data; The time-domain data is subjected to feature extraction processing to obtain a time-domain feature vector; Time-frequency analysis is performed on the time-domain data to obtain frequency-domain data, and feature extraction processing is performed on the frequency-domain data to obtain frequency-domain feature vectors; The negative feature vector is obtained by fusing the time-domain feature vector and the frequency-domain feature vector.

7. The method according to any one of claims 1 to 6, characterized in that, Determining the first target positive feature vector corresponding to the signal to be detected from the set of positive feature vectors includes: Analyze the signal to be detected to obtain the detection type corresponding to the signal to be detected; The positive feature vectors in the set of positive feature vectors that correspond to the type to be detected are determined as the first target positive feature vectors.

8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: The signal to be detected is analyzed to obtain the lead impedance information of the signal to be detected; If the lead impedance information indicates an abnormality in the lead impedance, the detection result is determined to be abnormal.

9. A detection device, characterized in that The detection device includes: The first acquisition module is used to acquire the signal to be detected, a set of positive feature vectors, and a trained detection model. The trained detection model includes a trained feature extraction sub-model and a trained classification sub-model. The set of positive feature vectors is obtained by extracting features from positive sample data using the trained feature extraction sub-model. The trained classification sub-model is obtained by training a pre-trained classification sub-model using negative sample data. The number of negative sample data is less than the number of positive sample data. The first determining module is used to determine the first target positive feature vector corresponding to the signal to be detected from the set of positive feature vectors; The first feature extraction module is used to extract features from the signal to be detected using the trained feature extraction sub-model to obtain the feature vector to be detected. The second determining module is used to determine a first similarity feature vector between the first target positive feature vector and the feature vector to be detected; The first prediction module is used to perform prediction processing on the first similar feature vector using the trained classification sub-model to obtain the detection result.

10. A detection device, characterized by The detection equipment includes: Processor; and Memory for storing computer programs that can run on the processor; The computer program is executed by a processor to implement the detection method in any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions configured to execute the detection method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Information classification method, device and equipment and computer readable storage medium

    CN116910642A