Medical care health sensor data security protection method and system, medium and server
By building a data matrix and using quad-tree segmentation and path encoding, the problem of low data processing efficiency of medical and health sensors is solved, efficient and secure data processing is achieved, and data confidentiality and manageability are enhanced.
Patent Information
- Application Number
- CN202510485183.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The prior art uses a long time to process medical and health sensor data, especially large-scale data sets, which affects the data processing efficiency.
The second matrix is constructed through the block splicing algorithm, and the quad-tree segmentation algorithm is used to divide the data blocks and perform path encoding and scrambling processing on the leaf nodes to improve data security and processing efficiency.
It improves data security and processing efficiency, simplifies the data processing process, enhances data confidentiality and manageability, and reduces the computing resource consumption of the encryption process.
Smart Images

Figure CN120372684A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data security, and in particular to a method, system, medium and server for protecting the data security of medical and health sensors. Background Art
[0002] With the rapid development of the Internet of Things (IoT) and medical informatization technologies, medical and health sensors (such as wearable devices, home medical monitors, etc.) have been widely used in fields such as telemedicine, health management, and chronic disease monitoring. These sensors continuously collect users' physiological data (such as heart rate, blood pressure, blood sugar), behavioral data (such as movement trajectories, sleep patterns), and environmental data (such as temperature and humidity, air quality), providing a basis for personalized medicine and health management.
[0003] The Chinese invention patent with the application publication number CN115664830A provides a full-process data security protection system. When the server loads and executes the computer program corresponding to this patent, the server implements the following steps: obtaining user data uploaded by a target user, encrypting the user data according to an encryption algorithm to obtain encrypted data, when a third party uses the encrypted data, sampling the encrypted data according to a preset rule to obtain sampled data, based on the security level encryption policies corresponding to different fields in the encrypted data, encrypting the sampled data according to the security level encryption policies corresponding to the fields, and providing the encrypted sampled data to the third party for display.
[0004] However, encryption algorithms usually require a series of mathematical operations on data, such as permutation, substitution, exclusive OR, etc., to convert the original data into ciphertext. These operations consume a certain amount of computing resources and time. Especially when dealing with large-scale data, the encryption process will become more time-consuming. For example, for a dataset containing a large number of patient health records, encrypting each data item will significantly increase the time cost of data processing. Summary of the Invention
[0005] In order to be able to process data efficiently and securely, this application provides a method, system, medium and server for protecting the data security of medical and health sensors.
[0006] In a first aspect, this application provides a method for protecting the data security of medical and health sensors, adopting the following technical solution: A method for protecting the data security of medical and health sensors, comprising: Historical data collection: collecting historical data of medical and health sensors and obtaining user information of medical and health sensors; Constructing a data matrix: Extract multiple features of user information and encode each feature separately; construct a first matrix for each medical and health sensor. The diagonal elements of the first matrix are the encoding values of any feature, and the non-diagonal elements of the first matrix are historical data from the same medical and health sensor. When the historical data is not sufficient to fill the non-diagonal elements of the first matrix, use a specific character to fill the non-diagonal elements of the first matrix, and add the same label to the historical data belonging to the same first matrix; use the block splicing algorithm to splice the first matrix into a second matrix. Data matrix segmentation: Use the quadtree segmentation algorithm to segment the second matrix to obtain multiple segmentation blocks. Attribution judgment: Judge whether the historical data in the current segmentation block belongs to the same first matrix according to the label. If so, perform the step of adding a leaf node; if not, perform the step of updating the data matrix. Adding a leaf node: Use the historical data in the current segmentation block as a leaf node in the quadtree structure. Updating the data matrix: Update the current segmentation block to the second matrix and perform the step of data matrix segmentation. Encoding: Perform path encoding processing on the leaf node to obtain an encoding result. Scrambling: Use the encoding result as the label of the leaf node and perform scrambling processing on the leaf node to obtain and store the processing result.
[0007] This application first extracts multiple features from user information and encodes these features to obtain encoding values. Then, it uses the encoding values to construct a first matrix and constructs a second matrix through the block splicing algorithm. This application not only retains the original features of the data but also increases the complexity by introducing diagonal elements. Through this scrambling process, this application improves the security of the data. Subsequently, this application uses the quadtree segmentation algorithm to segment the second matrix so that each segmentation block contains a meaningful data subset. Subsequently, this application realizes the dynamic recognition of data attribution by judging whether the historical data in the current segmentation block belongs to the same first matrix. When the data in the segmentation block belongs to the same first matrix, it is directly added as a leaf node; otherwise, the segmentation block is updated to the second matrix and continues to be segmented to achieve the gradual refinement of the data and improve the efficiency and accuracy of data processing. Subsequently, this application performs path encoding processing on the leaf node to convert the complex data structure into an encoding result that is easy to manage and transmit, thus simplifying the data processing process and increasing the confidentiality of the data. Finally, this application uses the encoding result as the label of the leaf node and performs scrambling processing on the leaf node, thereby breaking the original association between the data and making it difficult for attackers to infer the original data from the processing result, significantly improving the security of the data.
[0008] Optionally, the step of constructing the data matrix further includes: Quantity judgment: Determine whether the number of the features is less than the number of the healthcare sensors. If so, execute the step of adding features; if not, execute the step of constructing the data matrix; Adding features: Statistically analyze the behavior data of the user to obtain new features, merge the new features with the features in the feature extraction step, and calculate the correlation degree between any two features by using the cosine similarity algorithm, denoted as the first correlation degree; In the step of constructing the data matrix, splice the first matrix in the order of the first correlation degree from large to small.
[0009] This application determines whether the number of features is less than the number of healthcare sensors, so as to ensure that the number of features is sufficient before constructing the matrix. When the number of features is less than the number of healthcare sensors, execute the step of adding features to enable each healthcare sensor to have sufficient features for association and analysis. Subsequently, this application statistically analyzes the behavior data of the user to obtain new features, which can reflect the user's usage habits, behavior patterns, etc., providing an additional dimension for data security protection. Subsequently, this application merges the new features with the original features to enrich the feature set. Subsequently, this application calculates the correlation degree between any two features by using the cosine similarity algorithm, denoted as the first correlation degree, to reveal the internal relationship between the features. This application splices the first matrix in the order of the first correlation degree from large to small, so that the features with higher correlation are adjacent or close in the second matrix, and thus there is a higher correlation between adjacent nodes of the quadtree structure. That is, during the construction of the quadtree, the highly correlated features arranged adjacent or close to each other will be preferentially divided into the same node or adjacent nodes. This spatial topology enables the quadtree to naturally form a feature clustering effect when splitting - that is, the feature subsets with similar semantics or statistical correlation are automatically merged into the same subtree. When performing region queries or nearest neighbor searches, the search path can be predicted based on the correlation strength between nodes, thereby improving the retrieval efficiency.
[0010] Optionally, after executing the step of adding features, the method further includes: Analysis of the correlation degree between historical data and features: Calculate the correlation degree between the historical data of each healthcare sensor and the i-th feature by using the cosine similarity algorithm, denoted as the second correlation degree; In the step of constructing the data matrix, fill the historical data of each healthcare sensor into the corresponding first matrix in the order of the second correlation degree from large to small.
[0011] This application uses the cosine similarity algorithm to calculate the correlation between the historical data of each healthcare sensor and the i-th feature respectively, denoted as the second correlation. The second correlation can quantify the degree of association between the historical data of each healthcare sensor and the feature. In the step of constructing the data matrix, the historical data of each healthcare sensor is filled into the corresponding first matrix in descending order of the second correlation, so that the first matrix not only retains the original information of the historical data, but also highlights the historical data closely related to the features in the user information.
[0012] Optionally, the step of constructing the data matrix further includes: Data analysis: Set the normal range of the output data of each healthcare sensor; Range judgment: Sequentially judge whether the j-th non-diagonal element in each first matrix falls within the normal range. If so, retain the j-th non-diagonal element in the first matrix; if not, replace the j-th non-diagonal element with a specific character; Iteration: Take the (j + 1)-th non-diagonal element as the new j-th non-diagonal element, and execute the range judgment step until all non-diagonal elements in the first matrix are traversed.
[0013] This application first sets the normal range of the output data of each healthcare sensor, and then checks whether the j-th non-diagonal element in the first matrix falls within the normal range. If the non-diagonal element is not within the normal range, the j-th non-diagonal element is updated to a specific character. By filling in specific characters, this application can replace abnormal data points and maintain the accuracy and reliability of the data in the first matrix; otherwise, retain the j-th non-diagonal element in the first matrix, take the (j + 1)-th non-diagonal element as the new j-th non-diagonal element, and then continue to execute the range judgment. By adopting the above technical solutions, this application can filter out irregular data as much as possible and improve the accuracy and reliability of data processing.
[0014] Optionally, after performing the attribution judgment step and before performing the data matrix update step, it further includes: Segment block judgment: Judge whether the number of historical data included in the current segment block is less than the preset minimum number threshold. If so, execute the data matrix update step; if not, execute the segment block update step; Segment block update: Calculate the covariance matrix of the non-diagonal elements in the current segment block, calculate the maximum eigenvalue and the corresponding eigenvector of the covariance matrix, and divide the current segment block according to the direction of the eigenvector to obtain a first sub-block and a second sub-block. Sequentially update the first sub-block and the second sub-block as the current segment block, and execute the data matrix update step.
[0015] The present application first checks whether the number of historical data contained in the current segmentation block is less than a preset minimum number threshold. If so, it performs the step of updating the data matrix; otherwise, it calculates the covariance matrix of the non-diagonal elements in the current segmentation block, and extracts the maximum eigenvalue and the eigenvector corresponding to the maximum eigenvalue. The covariance matrix reflects the correlation between data, while the eigenvalue and eigenvector reveal the main change directions and amplitudes of the data. Subsequently, the present application segments the current segmentation block in the direction of the eigenvector to obtain a first segmentation sub-block and a second segmentation sub-block, which can segment the data block in the main change direction and helps to more accurately cut the current segmentation block. Subsequently, the present application sequentially updates the first segmentation sub-block and the second segmentation sub-block as the current segmentation block, and performs the step of updating the data matrix. Through covariance analysis and eigenvector segmentation, the present application can more accurately identify key information and patterns in the data, segment the current segmentation block in the direction with the greatest difference, thereby improving the segmentation efficiency.
[0016] Optionally, after performing the step of updating the data matrix, the method further includes: Adding empty nodes: obtaining a quadtree structure, adding a plurality of empty nodes to the leaf nodes of the k-th layer in the quadtree structure, updating the added empty nodes as the leaf nodes of the k-th layer in the quadtree structure, and obtaining an extended quadtree structure; In the encoding step, perform path encoding processing on the leaf nodes of each layer in the extended quadtree structure to obtain a new encoding result.
[0017] The present application first obtains the current quadtree structure and adds a plurality of empty nodes to the leaf nodes of the k-th layer. These empty nodes are then updated as the leaf nodes of the k-th layer to form an extended quadtree structure. By adding empty nodes and updating them as new leaf nodes, it is possible to effectively increase the encoding space of the quadtree structure without changing the original data structure. Subsequently, the present application performs path encoding processing on the leaf nodes of each layer in the extended quadtree structure. Since the quadtree structure has been extended, the result of path encoding will contain more information, making the encoding more complex and diverse. This complex encoding method makes it more difficult for attackers to infer the characteristics and patterns of the original data from the encoding result, thereby improving the security of the data. By adopting the above solution, the present application can flexibly adjust the structure of the quadtree according to needs. By adding empty nodes, the present application can adapt to data sets of different scales and complexities, improving the adaptability and flexibility of data processing. Moreover, the extended quadtree structure and the encoding result also provide a better basis for subsequent scrambling processing. Since the encoding result is more complex and diverse, the scrambling processing will be able to more effectively disrupt the order and correlation of the data, further improving the security of the data.
[0018] Optionally, after performing the encoding step, the method further includes: Node update: Collect the real-time data of the current healthcare sensor, and obtain the level in the extended quadtree structure to which the historical data of the current healthcare sensor belongs, denoted as the first level; obtain the empty node in the first level, denoted as the first node; fill the real-time data into the first node, use the new encoding result corresponding to the first node as the encoding result of the real-time data, and update the first node after adding the real-time data to the leaf node of the first level.
[0019] This application collects the real-time data of the current healthcare sensor and obtains the level in the quadtree structure to which these real-time data belong, denoted as the first level. Subsequently, this application obtains the empty node in the first level, denoted as the first node. By obtaining the empty node, this application can find a suitable storage location for the real-time data while maintaining the integrity and consistency of the quadtree structure. Subsequently, this application fills the real-time data into the first node and uses the encoding result of the first node as the encoding result of the real-time data, realizing the dynamic integration of the real-time data and the quadtree structure, enabling the real-time data to immediately participate in the subsequent data processing process. Then, the first node after adding the real-time data is updated to the leaf node of the first level, further enriching the content of the quadtree structure and increasing the complexity and diversity of the encoding. By adopting the above solution, this application can obtain and process the real-time data of the sensor in real time, maintaining the timeliness and accuracy of data processing. By filling the real-time data into the quadtree structure, this application can dynamically adjust the data structure to adapt to the changes and updates of the data.
[0020] In a second aspect, this application provides a healthcare sensor data security protection system, adopting the following technical solution: The healthcare sensor data security protection system includes: A historical data collection module, configured to collect the historical data of the healthcare sensor and obtain the user information of the healthcare sensor; A data matrix construction module, configured to extract multiple features of the user information and perform separate encoding on each feature; construct a first matrix for each healthcare sensor, where the diagonal elements of the first matrix are the encoding values of any one feature, the non-diagonal elements of the first matrix are the historical data from the same healthcare sensor, and when the historical data is not sufficient to fill the non-diagonal elements of the first matrix, use specific characters to fill the non-diagonal elements of the first matrix, and add the same mark to the historical data belonging to the same first matrix; use the block splicing algorithm to splice the first matrix into a second matrix; A data matrix segmentation module, configured to segment the second matrix using the quadtree segmentation algorithm to obtain multiple segmentation blocks; An attribution judgment module, configured to determine whether the historical data in the current segmentation block belongs to the same first matrix according to the marking; A leaf node addition module, configured to use the historical data in the current segmentation block as leaf nodes in a quadtree structure; A data matrix update module, configured to update the current segmentation block to a second matrix and trigger a data matrix segmentation module; An encoding module, configured to perform path encoding processing on the leaf nodes to obtain an encoding result; A scrambling module, configured to use the encoding result as the label of the leaf nodes, perform scrambling processing on the leaf nodes, and obtain and store the processing result.
[0021] This application first obtains historical data and user information. After the feature extraction module transforms the features, the data matrix construction module forms a matrix and splices it. Then, the data matrix segmentation module uses the quadtree algorithm to segment it into multiple blocks. After the attribution judgment module determines the consistency of data attribution, the leaf node addition module integrates the data into the quadtree structure, and the data matrix update module is responsible for dynamic update and loop processing. The encoding module improves the complexity by encoding the leaf node paths. Finally, the scrambling module enhances the security through label scrambling. Each module collaborates to achieve efficient, flexible, and secure data processing, comprehensively protecting the security of the data in the medical and health sensors.
[0022] In a third aspect, this application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is processed by a processor, it is used to implement the method described in the first aspect.
[0023] In a fourth aspect, this application provides a server, on which the system described in the second aspect is loaded. The server includes: a processor, and a memory communicatively connected to the processor; The memory is provided with the computer-readable storage medium described in the third aspect, and the computer-readable storage medium stores a computer program; When the processor processes the computer program stored on the computer-readable storage medium, it is used to implement the method described in the first aspect.
[0024] In summary, this application includes at least one of the following beneficial technical effects: 1. The present application first extracts multiple features from user information and encodes these features to obtain encoded values. Then, it constructs a first matrix using the encoded values and constructs a second matrix through a block splicing algorithm. The present application not only preserves the original features of the data but also increases the complexity by introducing diagonal elements. Through this scrambling process, the present application improves the security of the data. Subsequently, the present application uses a quadtree segmentation algorithm to segment the second matrix so that each segmented block contains a meaningful data subset. Subsequently, the present application realizes the dynamic recognition of data attribution by judging whether the historical data in the current segmented block belongs to the same first matrix. When the data in the segmented block belongs to the same first matrix, it is directly added as a leaf node; otherwise, the segmented block is updated to a second matrix and continues to be segmented to achieve the layer-by-layer refinement of the data, while improving the efficiency and accuracy of data processing. Subsequently, the present application performs path encoding processing on the leaf nodes, converting the complex data structure into an encoding result that is easy to manage and transmit, thereby simplifying the data processing process and increasing the confidentiality of the data. Finally, the present application uses the encoding result as the label of the leaf node and performs scrambling processing on the leaf nodes, thereby breaking the original association between the data and making it difficult for attackers to infer the original data from the processing result, significantly improving the security of the data.
[0025] 2. The present application splices the first matrix in the order of the first correlation degree from large to small, so that the features with higher correlation are adjacent or close in the second matrix. Furthermore, there is a high correlation between adjacent nodes in the quadtree structure. That is, during the construction of the quadtree, the high-correlation features arranged adjacent or close to each other will be preferentially divided into the same node or adjacent nodes. This spatial topology enables the natural formation of a feature clustering effect when the quadtree splits - that is, the feature subsets that are semantically similar or statistically relevant are automatically merged into the same subtree. When performing a region query or a nearest neighbor search, the search path can be predicted based on the correlation strength between the nodes, thereby improving the retrieval efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is the flowchart of Embodiment 1 of the present application; Figure 2 is the flowchart of Embodiment 2 of the present application; Figure 3 is the flowchart of Embodiment 3 of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The following is a further detailed description of the present application in conjunction with Figures 1 to 3 to the present application.
[0028] Embodiment 1: This embodiment discloses a method for protecting the security of medical and health sensor data. Referring to Figure 1, the method includes: S11 historical data collection, S12 constructing a data matrix, S13 data matrix segmentation, S14 attribution judgment, S15 leaf node addition, S16 data matrix update, S17 encoding, and S18 scrambling. First, collect the historical data of the medical and health sensors, and at the same time obtain user information. Then, extract the user information features and encode them. Then, construct a first matrix with the encoded value of any feature, and then construct a second matrix through the block splicing algorithm; Subsequently, use the quadtree segmentation algorithm to segment the second matrix, and judge the attribution of the segmented block data. If it belongs to the same first matrix, take the segmented block as the leaf node of the quadtree structure, otherwise update it to the second matrix and continue to segment; Finally, perform path encoding on the leaf nodes, and then perform scrambling processing with the encoding result as the label to obtain and store the final processing result. The process of this embodiment is as follows: S11 Historical data collection, collect the historical data of the medical and health sensors, and obtain the user information of the medical and health sensors.
[0029] The historical data includes various physiological parameters, environmental data, etc. recorded by the medical and health sensors.
[0030] At the same time, this embodiment will also obtain user information associated with these medical and health sensors, such as user identity information, usage habits, health status, etc.
[0031] S12 Constructing a data matrix, extract multiple features of the user information, and perform encoding processing on each feature separately to convert the feature into an encoded value that can be recognized and processed by a computer.
[0032] This embodiment constructs a first matrix for each medical and health sensor, and selects the encoded value of any feature as the diagonal element of the first matrix, and fills the non-diagonal elements of the first matrix with the historical data of the same medical and health sensor. Subsequently, this embodiment also adds the same mark to the historical data belonging to the same first matrix. Subsequently, this embodiment uses the block splicing algorithm to splice multiple first matrices into a larger second matrix to further increase the complexity and diversity of the data.
[0033] In this embodiment, if the historical data of the same medical and health sensor cannot form a complete first matrix, specific characters are used to fill the vacant positions in the first matrix.
[0034] In other embodiments, for the convenience of calculation, a time window can be set according to requirements, and the historical data of the medical and health sensors within the time window is filled into the first matrix.
[0035] S13 Data matrix segmentation. After constructing the second matrix, the quadtree segmentation algorithm is used to segment it. The quadtree segmentation algorithm can recursively divide a large data block into multiple smaller sub-blocks until the second matrix is divided into multiple segmentation blocks with different features and attributes, obtaining a quadtree structure.
[0036] S14 Attribution judgment. After segmenting multiple segmentation blocks, this step will judge whether the historical data in each segmentation block belongs to the same first matrix according to the previously added marks. If the judgment result is yes, it means that the data in the current segmentation block comes from the same first matrix, and then S15 leaf node addition will be executed; if the judgment result is no, it means that the data in the current segmentation block comes from different first matrices, and then S16 data matrix update will be executed.
[0037] S15 Leaf node addition. If the historical data in the current segmentation block belongs to the same first matrix, this step will use the historical data in the current segmentation block as a leaf node in the quadtree structure.
[0038] S16 Data matrix update. If the historical data in the current segmentation block does not belong to the same first matrix, this step will update the current segmentation block to the second matrix and re-execute S13 data matrix segmentation to continue dividing and processing the current segmentation block.
[0039] S17 Encoding. After the quadtree structure is constructed, path encoding processing is performed on the leaf nodes in the quadtree structure. Path encoding is a coding method that can uniquely identify the position of a leaf node in the quadtree. This step can obtain the coding results of each leaf node. These coding results not only have uniqueness and identifiability but also provide a basis for subsequent data scrambling processing.
[0040] S18 Scrambling. Using the coding results as the labels of the leaf nodes, scrambling processing is performed on the leaf nodes in the quadtree structure. Scrambling processing is a processing method that can disrupt the order and correlation of leaf nodes. Through this scrambling processing, this step can further improve the security and privacy of data. The results after scrambling processing will be stored by the system.
[0041] After the user authentication is passed, this embodiment will feedback the processing results to the user.
[0042] The following uses a case to elaborate on this embodiment.
[0043] S11 Historical data collection. In a medical and health monitoring project, the historical data of medical and health sensors is collected. These medical and health sensors are installed in each user's home for long-term monitoring of the user's health status.
[0044] The collected historical data includes various physiological parameters recorded by sensors, such as heart rate, blood pressure (the combination of systolic and diastolic blood pressure), blood glucose level, etc., as well as environmental data, such as indoor temperature, humidity, air quality, etc.
[0045] After that, user information associated with these sensors was obtained. For example, user identity information (age, gender, etc.), usage habits (sensor usage frequency, usage time period, etc.), and health status (whether there are chronic diseases).
[0046] S12 constructs a data matrix, extracts various features from the user information, extracts the usage frequency feature from the usage habits, extracts the feature of whether there is hypertension from the health status, etc. The extracted features will be encoded and transformed into encoded values.
[0047] Exemplarily, the encoding methods for each feature are as follows: Age: Interval encoding is adopted. That is, age is divided into different intervals, and each interval corresponds to a unique encoded value.
[0048] 0 - 18 years old: Encoded as 01 19 - 30 years old: Encoded as 02 31 - 45 years old: Encoded as 03 46 - 60 years old: Encoded as 04 Over 60 years old: Encoded as 05 Gender: Binary encoding is adopted. 0 for male and 1 for female.
[0049] Usage frequency: Hierarchical encoding is adopted.
[0050] Used more than 3 times a day: Encoded as 13 Used more than 1 time and less than 3 times a week: Encoded as 12 Used more than 1 time and less than 3 times a month: Encoded as 11 Used more than 1 time and less than 3 times a year: Encoded as 10 Usage time period: A day is divided into different time periods, and each time period corresponds to an encoded value.
[0051] 0:00 - 6:00: Encoded as 21 6:00 - 12:00: Encoded as 22 12:00 - 18:00: Encoded as 23 18:00 - 24:00: Encoded as 24 Health status: Binary encoding is adopted, 30 indicates yes, and 31 indicates no.
[0052] For example, there is currently a user's information as follows: 32 years old, male, uses more than 1 time and less than 3 times per week, uses during the time period from 18:00 to 24:00, and has no chronic diseases. Its encoding is: 03, 0, 11, 24, 30.
[0053] The non - diagonal elements of the first matrix are filled with historical data from the same healthcare sensor. If the historical data from the same healthcare sensor cannot form a complete first matrix, it is filled with a specific character (in this embodiment, X is used).
[0054] For example, assume that the encoded value 03 of the feature "32 years old" is selected, and 03 is used as the diagonal element of the first matrix. The heart rate data of Zhang San over a period of time is selected and filled into the non - diagonal positions:
[0055] The elements in the above - mentioned first matrix are marked as Matrix One.
[0056] For example, assume that the encoded value 0 of the feature "gender" is selected, and 0 is used as the diagonal element of the first matrix. The blood pressure data of Zhang San over a period of time is selected and filled into the non - diagonal positions:
[0057] The elements in the above - mentioned first matrix are marked as Matrix Two.
[0058] After that, the system uses the block splicing algorithm to splice multiple first matrices into a second matrix.
[0059]
[0060] S13 Data matrix segmentation. After constructing the second matrix, use the quadtree segmentation algorithm to segment it. The quadtree segmentation algorithm can recursively divide a large data block into multiple smaller sub - blocks.
[0061] S14 Attribution judgment. After splitting into multiple split blocks, check the marks of each data in the split block to determine whether the historical data in each split block belongs to the same first matrix in turn. If the judgment result is yes, it means that the data in the current split block is consistent, and then S15 Leaf node addition will be executed; if the judgment result is no, it means that the data in the current split block comes from different first matrices, and then S16 Data matrix update will be executed.
[0062] S15 Leaf node addition. The historical data in the current split block is used as a leaf node in the quadtree structure.
[0063] S16 data matrix update: if the historical data in the current segmentation block does not belong to the same first matrix, the current segmentation block is updated to the second matrix, and S13 data matrix segmentation is re-executed to continue segmenting and processing the updated second matrix.
[0064] S17 coding, after the quadtree structure is built, the leaf nodes in the quadtree structure are processed by path coding. Path coding is a coding method that can uniquely identify the position of a leaf node in a quadtree.
[0065] For example, for a leaf node in a quadtree, a unique code is generated based on the path from the root node to the leaf node. For example, 0110 means that the path from the root node first goes to the left subtree, then to the right subtree, then to the right subtree, and finally to the left subtree to reach the leaf node.
[0066] S18 scrambling, using the encoding result as the label of the leaf node, scrambling the leaf nodes in the quadtree structure.
[0067] This embodiment first collects historical data and user information of medical and health sensors, then extracts and encodes user information features, constructs a first matrix with the encoded values and splices them into a second matrix; then uses a quadtree segmentation algorithm to segment the second matrix, determines the ownership of the segmented block data, and adds it to the quadtree structure as a leaf node if it belongs to the same first matrix, otherwise updates the segmented block to the second matrix and continues segmenting; after completing the quadtree construction, path encoding is performed on the leaf nodes, and finally the leaf nodes are scrambled with the encoded results as labels, and the processing results are stored to improve the security and privacy of the data.
[0068] Example 2: Reference Figure 2 The difference between this embodiment and embodiment 1 is that S12 constructing a data matrix further includes: S21 Quantity judgment, compare the number of extracted features with the number of medical and health sensors. If the number of features is less than the number of medical and health sensors, it means that the current encoding value is not enough to fill all the first matrices. In Example 1, the diagonal elements of the first matrix repeatedly use the encoding values of one or several features. In order to increase the difference, this embodiment executes S22 to add features and increase the number of features; if the number of features is greater than or equal to the number of medical and health sensors, it means that the current features are rich enough, and directly execute S13 data matrix segmentation.
[0069] S22 adds features and conducts statistical analysis on user behavior data to mine more valuable new features. These new features include user activity frequency, usage duration, behavior patterns, etc., which can more comprehensively reflect user behavior habits and health status.
[0070] Merge the new features with the features in the S12 construction data matrix, and use the cosine similarity algorithm to calculate the correlation between any two features, denoted as the first correlation.
[0071] Taking 32 years old and no chronic diseases as an example, the process of calculating the correlation between any two features using the cosine similarity is as follows: Perform class one-hot encoding on the above features (the vector length is the number of features, the element at the position corresponding to the feature is 0, and the remaining positions are 1). The vectors after class one-hot encoding are [0, 1, 1, 1, 1] and [1, 1, 1, 1, 0] respectively, and the process of calculating their correlation is as follows: First, calculate the dot product of the two vectors: 0×1 + 1×1 + 1×1 + 1×1 + 0×1 = 3; Then, calculate the magnitudes of the two vectors: ; ; The first correlation is: ; The calculation method of the first correlation for other feature pairs is the same as the above content, and this embodiment will not elaborate too much.
[0072] S23 Historical data and feature correlation analysis. Use the cosine similarity algorithm to calculate the correlation between the historical data of each medical and health sensor and the i-th feature, denoted as the second correlation.
[0073] In this step, first integrate the historical data of each medical and health sensor into a vector, denoted as the first vector. Then, organize the encoded value of the i-th feature into a vector with the same dimension as the first vector, denoted as the second vector. Then, calculate the cosine similarity between the first vector and the second vector, that is, the second correlation.
[0074] Taking the first vector as [89, 78, 74, 82, 71] as an example, the second vector is [03, 03, 03, 03, 03]. Then, use the cosine similarity algorithm to calculate the second correlation between the first vector and the second vector.
[0075] In other embodiments, it can also be the same as adding features in S22. Select a historical data combination with the same dimension as the second vector [0, 1, 1, 1, 1] as the first vector to calculate the second correlation.
[0076] After that, perform S13 data matrix segmentation. When performing S13 data matrix segmentation, first, in the order of decreasing second correlation, fill the historical data of each healthcare sensor into the corresponding first matrix (for example, if matrix one uses the feature of gender as the diagonal element, then in this embodiment, in the order of decreasing second correlation, blood pressure is filled into matrix one; if matrix two uses the feature of usage time period as the diagonal element, then in this embodiment, the historical data of the remaining healthcare sensors with the highest correlation with the usage time period is filled into matrix two). Then, splice the first matrices in the order of decreasing first correlation.
[0077] S24 Data analysis, set the normal range of the output data of each healthcare sensor. These normal ranges are determined based on historical data, industry standards, or medical knowledge. For example, the normal range of heart rate is 60 - 105.
[0078] S25 Range judgment, sequentially judge whether the j-th non-diagonal element in the first matrix falls within the normal range. If so, it means the data of this element is normal, retain the j-th non-diagonal element in the first matrix, and perform S26 iteration; if not, it means the data of this element may be abnormal, and replace the j-th non-diagonal element with a specific character.
[0079] S26 Iteration, take the (j + 1)-th non-diagonal element as the new j-th non-diagonal element, and perform S25 range judgment until all non-diagonal elements in the first matrix are traversed.
[0080] In this embodiment, first, it is determined whether the number of features is sufficient. If not, statistical analysis of user behavior data is performed to increase features, and new and old features are integrated to form a new feature set. Then, the cosine similarity is used to calculate the correlation between new features and the correlation between the historical data of each healthcare sensor and the new features respectively. Subsequently, the historical data is filled into the first matrix according to the second correlation order and spliced into the second matrix according to the first correlation order. After that, the normal range of the output data of each sensor is set, and the range judgment step is used to check whether the non-diagonal elements in the first matrix are within the normal range. If so, the element is retained and the judgment continues; otherwise, the abnormal element is replaced with a specific character until the preset stop condition is met, thereby improving the quality and security of data processing.
[0081] Embodiment 3: Refer to Figure 3 , the difference between this embodiment and Embodiment 1 is that after performing S14 attribution judgment and before performing S16 data matrix update, it further includes: S31 Split block judgment, judge whether the number of historical data included in the current split block is less than the preset minimum number threshold. If so, perform S16 data matrix update; if not, perform S32 split block update.
[0082] S32 Split block update, calculate the covariance matrix of the non-diagonal elements in the current split block, and calculate the maximum eigenvalue and the corresponding eigenvector of the covariance matrix. The covariance matrix can reflect the correlation and distribution characteristics between data, while the maximum eigenvalue and the corresponding eigenvector can reveal the main change direction and amplitude of the data.
[0083] Split the current split block according to the direction of the eigenvector to obtain two smaller sub-blocks, namely the first split sub-block and the second split sub-block. This step can refine the data in the main change direction, that is, split according to the direction of the maximum eigenvector to maximize the difference between the first split sub-block and the second split sub-block.
[0084] Update the first split sub-block and the second split sub-block as the current split block in sequence, and execute S16 data matrix update.
[0085] Before executing S17 encoding after executing S16 data matrix update, it also includes: S33 Add empty nodes, obtain the current quadtree structure, and add multiple empty nodes to the leaf nodes of the k-th layer. These empty nodes will then be updated to the leaf nodes of the k-th layer, thus forming an extended quadtree structure to increase the depth and complexity of the quadtree.
[0086] S17 encoding will perform path encoding processing on the leaf nodes of each layer in the extended quadtree structure.
[0087] Before executing S18 scrambling after executing S17 encoding, it also includes: S34 Node update, collect the real-time data of the current medical and health sensor, and obtain the level of the historical data of the current medical and health sensor in the quadtree structure, denoted as the first level, to associate the real-time data with a specific level in the quadtree structure.
[0088] Obtain the empty node in the first level, denoted as the first node. Fill the real-time data into the first node, use the encoding result of the first node as the encoding result of the real-time data, update the first node added with the real-time data to the leaf node of the first level, and integrate the real-time data into the quadtree structure to realize the dynamic processing and encoding of the real-time data.
[0089] In this embodiment, it is first determined whether the number of historical data contained in the current segmentation block is less than a preset threshold. If so, the step of updating the data matrix is executed. If not, the covariance matrix, its maximum eigenvalue, and the corresponding eigenvector are calculated, and after being segmented into two sub-blocks in the direction of the eigenvector, they are sequentially updated as the current segmentation block for continued processing. Subsequently, the quadtree structure is expanded to add empty nodes. During encoding, path encoding is performed on the leaf nodes of each expanded layer. After encoding and before scrambling, real-time data is collected and associated with the first level of the quadtree. After obtaining the empty nodes at this level, the real-time data is filled, and its encoding result is used as the encoding of the real-time data, and this node is updated as a leaf node, thereby realizing the dynamic processing, encoding, and structure expansion of the data.
[0090] Embodiment 4: This embodiment discloses a medical and health sensor data security protection system, and the system includes: A historical data acquisition module, which is responsible for acquiring the historical data of medical and health sensors and obtaining the user information associated with these sensors.
[0091] A data matrix construction module, which is responsible for extracting features from the user information. These features can highly summarize and represent certain characteristics or behavior patterns of the user. After that, this module encodes the features to obtain encoding values.
[0092] This module is also used to construct a first matrix with the encoding value of any feature as the diagonal element. The non-diagonal elements of the first matrix are the historical data from the same medical and health sensor. When the historical data is not sufficient to fill the non-diagonal elements of the first matrix, specific characters are used to fill the non-diagonal elements of the first matrix, and marks are added to the data belonging to the same first matrix. This module is also used to splice the first matrix into a second matrix by using the block splicing algorithm.
[0093] A data matrix segmentation module. After the second matrix is constructed, the data matrix segmentation module will segment it by using the quadtree segmentation algorithm, and segment the second matrix into multiple segmentation blocks with different features and attributes.
[0094] An attribution judgment module, which is used to judge whether the historical data in the current segmentation block belongs to the same first matrix according to the mark.
[0095] A leaf node addition module, which is used to use the historical data in the current segmentation block as the leaf nodes in the quadtree structure.
[0096] A data matrix update module, which is used to update the current segmentation block as the second matrix and trigger the data matrix segmentation module.
[0097] An encoding module, which is used to perform path encoding processing on the leaf nodes to obtain an encoding result.
[0098] The scrambling module is used to take the encoding result as the label of the leaf node and scramble the leaf nodes in the quadtree structure. The result after scrambling will be stored by the system for subsequent data analysis and applications.
[0099] Embodiment 5: This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is processed by a processor, it is used to implement the method described above.
[0100] Embodiment 6: This embodiment provides a server, on which the system described above is loaded. The server includes: a processor, and a memory communicatively connected to the processor; The computer-readable storage medium is provided in the memory, and a computer program is stored on the computer-readable storage medium; When the processor processes the computer program stored on the computer-readable storage medium, it is used to implement the method described above.
[0101] The above are all the preferred embodiments of this application. The protection scope of this application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of this application should be covered within the protection scope of this application.
Claims
1. A method for protecting the security of medical and health sensor data, characterized in that, Including: Historical data collection: Collect historical data of the healthcare sensors and obtain user information of the healthcare sensors; Constructing a data matrix: Extract multiple features of the user information and perform individual encoding on each feature; For each healthcare sensor, construct a first matrix correspondingly. The diagonal elements of the first matrix are the encoding values of any one feature, and the non-diagonal elements of the first matrix are the historical data from the same healthcare sensor. When the historical data is not sufficient to fill the non-diagonal elements of the first matrix, use specific characters to fill the non-diagonal elements of the first matrix, and add the same label to the historical data belonging to the same first matrix; Use the block splicing algorithm to splice the first matrix into a second matrix; Data matrix segmentation: Use the quadtree segmentation algorithm to segment the second matrix to obtain multiple segmentation blocks; Attribution judgment: Judge whether the historical data in the current segmentation block belongs to the same first matrix according to the label. If so, perform the step of adding a leaf node; If not, perform the step of updating the data matrix; Adding a leaf node: Use the historical data in the current segmentation block as a leaf node in the quadtree structure; Updating the data matrix: Update the current segmentation block to the second matrix and perform the step of data matrix segmentation; Encoding: Perform path encoding processing on the leaf node to obtain an encoding result; Scrambling: Use the encoding result as the label of the leaf node and perform scrambling processing on the leaf node to obtain and store the processing result.
2. The method for protecting the security of medical and health sensor data according to claim 1, wherein The step of constructing the data matrix further includes: Quantity judgment: Judge whether the quantity of the features is less than the quantity of the healthcare sensors. If so, perform the step of adding features; If not, perform the step of constructing the data matrix; Adding features: Perform statistical analysis on the user's behavior data to obtain new features, merge the new features with the features in the feature extraction step, and use the cosine similarity algorithm to calculate the correlation degree between any two features, denoted as the first correlation degree; In the step of constructing the data matrix, splice the first matrices in descending order of the first correlation degree.
3. The method for protecting the security of medical and health sensor data according to claim 2, wherein After performing the step of adding features, the method further includes: Analysis of the correlation degree between historical data and features: Use the cosine similarity algorithm to calculate the correlation degree between the historical data of each healthcare sensor and the i-th feature respectively, denoted as the second correlation degree; In the step of constructing the data matrix, fill the historical data of each healthcare sensor into the corresponding first matrix in descending order of the second correlation degree.
4. The method for protecting the security of medical and health sensor data according to claim 3, wherein The step of constructing the data matrix further includes: Data analysis: Set the normal range of the output data of each healthcare sensor; Range judgment: Sequentially judge whether the j-th non-diagonal element in each first matrix falls within the normal range. If so, retain the j-th non-diagonal element in the first matrix; If not, use specific characters to replace the j-th non-diagonal element; Iteration: Use the (j + 1)-th non-diagonal element as the new j-th non-diagonal element and perform the range judgment step until all non-diagonal elements in the first matrix are traversed.
5. The method for protecting the security of medical and health sensor data according to any one of claims 1-4, characterized in that, After performing the step of attribution judgment and before performing the step of data matrix update, it further includes: Split block judgment: Determine whether the number of historical data contained in the current split block is less than the preset minimum number threshold. If so, perform the step of data matrix update; if not, perform the step of split block update; Split block update: Calculate the covariance matrix of the non-diagonal elements in the current split block, calculate the maximum eigenvalue and the corresponding eigenvector of the covariance matrix, split the current split block in the direction of the eigenvector to obtain a first split sub-block and a second split sub-block, sequentially update the first split sub-block and the second split sub-block as the current split block, and perform the step of data matrix update.
6. The method for protecting the security of medical and health sensor data according to claim 5, characterized in that, After performing the step of data matrix update, the method further includes: Adding empty nodes: Obtain a quadtree structure, add multiple empty nodes to the leaf nodes at the k-th layer of the quadtree structure, update the added empty nodes as the leaf nodes at the k-th layer of the quadtree structure to obtain an extended quadtree structure; In the encoding step, perform path encoding processing on the leaf nodes at each layer of the extended quadtree structure to obtain a new encoding result.
7. The method for protecting the security of medical and health sensor data according to claim 6, characterized in that, After performing the encoding step, the method further includes: Node update: Collect the real-time data of the current healthcare sensor, and obtain the level to which the historical data of the current healthcare sensor belongs in the extended quadtree structure, denoted as the first level; obtain the empty node at the first level, denoted as the first node; fill the real-time data into the first node, use the new encoding result corresponding to the first node as the encoding result of the real-time data, and update the first node after adding the real-time data as the leaf node at the first level.
8. A medical and health sensor data security protection system, which is used to implement the method described in any one of claims 1-7, characterized in that, It includes: Historical data acquisition module, used to collect the historical data of the healthcare sensor and obtain the user information of the healthcare sensor; Data matrix construction module, used to extract multiple features of the user information and perform separate encoding on each feature; Construct a first matrix for each healthcare sensor. The diagonal elements of the first matrix are the encoding values of any one feature, and the non-diagonal elements of the first matrix are the historical data from the same healthcare sensor. When the historical data is not sufficient to fill the non-diagonal elements of the first matrix, use a specific character to fill the non-diagonal elements of the first matrix, and add the same label to the historical data belonging to the same first matrix; use the block splicing algorithm to splice the first matrix into a second matrix; Data matrix splitting module, used to split the second matrix using the quadtree splitting algorithm to obtain multiple split blocks; Attribution judgment module, used to judge whether the historical data in the current split block belongs to the same first matrix according to the label; Leaf node addition module, used to use the historical data in the current split block as the leaf nodes in the quadtree structure; Data matrix update module, used to update the current split block as the second matrix and trigger the data matrix splitting module; Encoding module, used to perform path encoding processing on the leaf nodes to obtain an encoding result; Scrambling module, used to use the encoding result as the label of the leaf node, perform scrambling processing on the leaf nodes, and obtain and store the processing result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When being processed by a processor, the computer program is used to implement the method according to any one of claims 1-7.
10. A server, characterized in that, The system according to claim 8 is loaded on the server, and the server includes: a processor, and a memory communicatively connected to the processor; A computer-readable storage medium according to claim 9 is provided in the memory, and a computer program is stored on the computer-readable storage medium; When the processor processes the computer program stored on the computer-readable storage medium, the method according to any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Full-process data security protection system
CN115664830A
Method for tracing human body movement based on maximum geometric flow histogram
CN102663449A
Surface temperature detection method for nanoimprint wafer production
CN118412296A
Coding and decoding method and device
CN119316616A
Video system with quantization matrix coding mechanism and method of operation thereof
US20130163662A1