Remote collaborative sharing method and system for mental health data
By encrypting and processing mental health data and blockchain storage on edge servers, the problem of inefficient data storage and sharing in the existing technology is solved, and efficient and secure cross-institutional mental health data sharing and diagnosis is achieved.
Patent Information
- Application Number
- CN202510384607.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-03-28
AI Technical Summary
In the prior art, mental health data exists in paper or single electronic records, resulting in inefficient diagnosis, poor data confidentiality, and excessive load on local equipment, making it difficult to meet large-scale data storage and real-time collaborative sharing. Traditional methods cannot fully, continuously and in real-time understand the client's mental health diagnosis history and symptom changes.
By acquiring mental health data, preprocessing and encryption of data, it uses whale optimization algorithm to store it to the edge server, and builds a smart contract to upload it to the blockchain for storage and decryption sharing, real-time and cross-institutional collaborative sharing.
It improves diagnostic efficiency and data confidentiality, reduces the load of local equipment, realizes large-scale data storage and real-time collaborative sharing, ensures the integrity and privacy of mental health data, and supports continuous and real-time understanding of client psychological state changes across institutions.
Smart Images

Figure CN120388670A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mental health management, and particularly to a method and system for remote collaborative sharing of mental health data. Background Art
[0002] With the rapid development of information technology, mental health issues have increasingly become the focus of global attention. Especially in modern society, factors such as work pressure and the accelerating pace of life have led to a rapid growth trend in mental health problems. More and more people with emotional disorders or mental impairments are beginning to seek professional mental health treatment and intervention, and this demand has also promoted the rapid progress of related technologies, especially the development of mental health data management and collaborative sharing technologies.
[0003] In the prior art, mental health data usually exists in the form of paper or single electronic records, resulting in low diagnostic efficiency and poor data confidentiality. At the same time, with the increase in the number of visitors, the local device load is too high to meet the needs of large-scale data storage and real-time collaborative sharing.
[0004] Traditional mental health management methods usually rely on face-to-face diagnosis and treatment, and it is impossible to comprehensively, continuously, real-time and across institutions understand the mental health diagnosis history and symptom changes of visitors. For example: After a visitor receives services at a mental therapy institution for a period of time, they may choose to discontinue treatment due to personal feelings or changing needs, or switch to other institutions for continued treatment. This mobility results in the fragmentation and isolation of mental health data, which is not conducive to psychologists comprehensively and accurately understanding the change process of the mental state of visitors. Summary of the Invention
[0005] In order to solve the technical problems in the prior art that mental health data usually exists in the form of paper or single electronic records, resulting in low diagnostic efficiency and poor data confidentiality, and at the same time, with the increase in the number of visitors, the local device load is too high to meet large-scale data storage and real-time collaborative sharing, and traditional mental health management methods usually rely on face-to-face diagnosis and treatment, and it is impossible to comprehensively, continuously, real-time and across institutions understand the mental health diagnosis history and symptom changes of visitors, resulting in the fragmentation and isolation of mental health data, which is not conducive to psychologists comprehensively and accurately understanding the change process of the mental state of visitors, the present invention provides a method and system for remote collaborative sharing of mental health data.
[0006] The technical solutions provided by the embodiments of the present invention are as follows:
[0007] First aspect:
[0008] A method for remote collaborative sharing of mental health data provided by the embodiments of the present invention includes:
[0009] S1: Obtain the mental health data of the visitor;
[0010] S2: Perform data preprocessing on the mental health data to obtain mental health target data;
[0011] S3: Perform data encryption processing on the mental health target data to obtain mental health encrypted data;
[0012] S4: Calculate the comprehensive storage cost of storing the mental health encrypted data in the edge server;
[0013] S5: Construct the constraint conditions for storing the mental health encrypted data in the edge server;
[0014] S6: Under the constraint of the constraint conditions, with the goal of minimizing the comprehensive storage cost, store the mental health encrypted data in the edge server through the whale optimization algorithm;
[0015] S7: Construct the smart contract of the blockchain;
[0016] S8: According to the smart contract, upload the mental health encrypted data stored in the edge server to the blockchain for storage;
[0017] S9: Obtain a real-time access request;
[0018] S10: When the real-time access request conforms to the smart contract, decrypt the mental health encrypted data stored in the blockchain to remotely collaboratively share the mental health target data.
[0019] Second aspect:
[0020] A mental health data remote collaborative sharing system provided by an embodiment of the present invention includes:
[0021] A processor;
[0022] A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the mental health data remote collaborative sharing method as described in the first aspect is implemented.
[0023] Third aspect:
[0024] A computer-readable storage medium provided by an embodiment of the present invention, on which a computer program is stored, and when the program is executed by a processor, the mental health data remote collaborative sharing method as described in the first aspect is implemented.
[0025] The beneficial effects brought by the technical solution provided by the embodiment of the present invention at least include:
[0026] In an embodiment of the present invention, through data encryption processing of mental health target data, it is avoided that mental health data exists in the form of paper or a single electronic record, improving the diagnostic efficiency and data confidentiality. By storing the encrypted mental health data in an edge server, the local device load is reduced. By uploading the encrypted mental health data stored in the edge server to the blockchain for storage, it can meet the requirements of large-scale data storage and real-time collaborative sharing. When a real-time access request conforms to a smart contract, the encrypted mental health data stored in the blockchain is decrypted to remotely collaboratively share the mental health target data, no longer relying on face-to-face diagnosis and treatment, and can comprehensively, continuously, real-time and cross-institutionally understand the mental health diagnostic history and symptom changes of the visitor, without resulting in fragmented and isolated mental health data, which is beneficial for psychologists to comprehensively and accurately understand the mental state change process of the visitor. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following-described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0028] Figure 1 It is a schematic flowchart of a method for remotely collaboratively sharing mental health data provided by an embodiment of the present invention;
[0029] Figure 2 It is a schematic structural diagram of a system for remotely collaboratively sharing mental health data provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The following will describe the technical solutions in the present invention with reference to the drawings.
[0031] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "example" in the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, the use of the word "example" is intended to present concepts in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two.
[0032] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same. "Of", "corresponding", and "corresponding to" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same.
[0033] In the embodiments of the present invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, their intended meanings are the same.
[0034] To make the technical problems, technical solutions, and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0035] Refer to the attached Figure 1 , which shows a schematic flowchart of a method for remotely collaboratively sharing mental health data provided by an embodiment of the present invention.
[0036] The embodiments of the present invention provide a method for remotely collaboratively sharing mental health data. This method can be implemented by a device for remotely collaboratively sharing mental health data, and this device for remotely collaboratively sharing mental health data can be a terminal or a server. The processing flow of the method for remotely collaboratively sharing mental health data can include the following steps:
[0037] S1: Obtain the mental health data of the visitor.
[0038] Among them, the mental health data includes: emotional state, psychological assessment, health indicators, self-report, and treatment history.
[0039] It should be noted that the emotional state refers to the emotional changes and fluctuations in the psychological state of the visitor, such as the frequency, intensity, and duration of emotions such as anxiety, depression, stress, and pleasure.
[0040] It should be noted that the psychological assessment refers to the assessment results of the visitor's psychological state obtained through standardized psychological tests, questionnaires, or surveys, such as the Patient Health Questionnaire-9 (PHQ-9) for depression, the Generalized Anxiety Disorder 7-item (GAD-7) scale for anxiety, etc.
[0041] It should be noted that the health indicators refer to physiological indicators related to mental health, usually including heart rate, blood pressure, sleep quality, weight, etc., which can reflect the overall health status of the visitor and the indirect impact on mental health.
[0042] It should be noted that the self-report refers to the subjective feedback of the visitor on their psychological state, emotional experience, or mental health status, usually collected through questionnaires, diaries, or self-assessment tools.
[0043] It should be noted that the treatment history refers to the past mental health treatment records of the client, including whether they have received psychological counseling, the use of therapeutic drugs, and any intervention measures in the field of mental health.
[0044] In the present invention, through comprehensive data in multiple dimensions such as emotional state, psychological assessment, and health indicators, the mental health status of the client can be comprehensively understood. This multi-angle assessment can help doctors or treatment personnel more accurately judge the client's emotional fluctuations, psychological state, potential psychological problems, and the impact of physical health on mental health, and provide more accurate diagnosis and intervention plans.
[0045] S2: Perform data preprocessing on the mental health data to obtain mental health target data.
[0046] In a possible implementation manner, S2 specifically includes sub-steps S201 to S203:
[0047] S201: Correct the abnormal data in the mental health data.
[0048] Optionally, correcting the abnormal data in the mental health data specifically means:
[0049] Delete the repeatedly submitted questionnaire data: When the client repeats the submission of the same questionnaire due to operation errors or technical problems, delete the repeated questionnaires and only retain the data of the first submission.
[0050] S202: Unify the data format in the mental health data after correcting the abnormal data.
[0051] Optionally, unifying the data format in the mental health data after correcting the abnormal data specifically means:
[0052] Convert the original scores of different mental health scales (such as PHQ-9, GAD-7, etc.) into a unified percentage format for comparative analysis between different scales. For example, convert the scores of 0-27 in the PHQ-9 scale into a percentage format:
[0053]
[0054] Where p represents the percentage score, s0 represents the original score, and s represents the total score (in the PHQ-9 scale, the total score is 27).
[0055] S203: Fill in the missing data in the mental health data after unifying the data format to obtain the mental health target data.
[0056] Optionally, filling in the missing data in the mental health data after unifying the data format specifically means:
[0057] Filling in missing questionnaire scores: For the missing questions in the mental health questionnaire, the average scores of similar visitors can be used for filling. For example, if the emotional state score of a visitor is missing, the average score of other visitors is used for filling.
[0058] In the present invention, by correcting abnormal data, data redundancy caused by operation problems is reduced, ensuring that the analysis is based on real and unique data, improving data quality and preventing misleading analysis conclusions. By unifying the data format, the consistency and standardization of data are improved, and the analysis difficulty caused by inconsistent data formats is reduced, especially in the processing and analysis of large-scale data sets. By filling in missing data, it helps to maintain the integrity of the data and avoid biases in the analysis results due to missing data.
[0059] S3: Perform data encryption processing on the mental health target data to obtain encrypted mental health data.
[0060] Specifically, before storing the mental health target data in the edge server, the edge server needs to perform data encryption processing on the mental health target data.
[0061] In a possible implementation manner, S3 specifically includes sub-steps S301 to S308:
[0062] S301: Randomly select a symmetric key.
[0063] S302: According to the symmetric key, through the symmetric encryption algorithm, perform preliminary encryption on the mental health target data and output the preliminary encrypted ciphertext.
[0064] It should be noted that the symmetric encryption algorithm is an encryption algorithm in which the same key is used for encryption and decryption. The sender uses this key to encrypt the plaintext data into ciphertext, and then the receiver uses the same key to decrypt the ciphertext back into plaintext. Since the same key is used in the encryption and decryption processes, the symmetric encryption algorithm is relatively fast and suitable for encrypting a large amount of data. However, at the same time, this method also has certain security risks, because if the key is leaked, all encrypted data will be exposed. Therefore, in practical applications, the security management of the key is very important.
[0065] Optionally, according to the following formula, perform preliminary encryption on the mental health target data and output the preliminary encrypted ciphertext:
[0066] C' = SE HK (m)
[0067] Where C' represents the preliminary encrypted ciphertext, SE represents the symmetric encryption algorithm, HK represents the symmetric key, and m represents the mental health target data.
[0068] S303: Construct an access policy tree, where the access policy tree includes a root node and leaf nodes.
[0069] It should be noted that an access decision tree is usually composed of access control rules and user attributes, and is used to determine whether a certain user has the permission to access specific data. The root node of the tree defines the global access policy, which usually includes basic access conditions or rules to ensure the security and privacy of data. The leaf nodes contain more specific access conditions, such as user identity information, role permissions, authorization status, etc. Each leaf node represents a specific access condition. For example, whether the user is an administrator, whether the user has passed authentication, whether the user has specific permissions, etc. Through the path from the root node to the leaf node, the access decision tree evaluates whether the user's attribute values meet all access conditions based on the user's attributes, so as to decide whether to allow the user to access the data. In this way, the access decision tree can flexibly perform permission control according to the specific situation of the user to ensure the secure sharing of data.
[0070] S304: Select a polynomial for the root node and leaf nodes in turn in a bottom-up manner.
[0071] S305: Select a first random number and set the polynomial equal to the first random number.
[0072] S306: Perform outsourced encryption on the access policy tree according to the set polynomial and output the outsourced encrypted ciphertext.
[0073] Optionally, perform outsourced encryption on the access policy tree according to the following formula and output the outsourced encrypted ciphertext:
[0074]
[0075] where CT' represents the outsourced encrypted ciphertext, T represents the access policy tree, C3' and C'4 both represent the encryption results of the root node, g and h both represent public base points, s represents the first random number, C7 represents the encryption result of the leaf nodes of the access policy tree, represents the encryption result calculated based on the base point g, p y (0) represents the value of the polynomial related to each leaf node y of the access policy tree, represents the encryption result based on the hash value H1(attr y ) of the user attributes, H1(attr y ) represents the result of hashing the attributes attr y in the leaf node y of the access policy tree, and Y represents the set of leaf nodes in the access policy tree.
[0076] S307: Select a second random number.
[0077] S308: Based on the preliminary encrypted ciphertext, the outsourced encrypted ciphertext, and the second random number, perform final encryption on the preliminarily encrypted mental health target data, and output the final encrypted ciphertext.
[0078] Optionally, perform final encryption on the preliminarily encrypted mental health target data according to the following formula, and output the final encrypted ciphertext:
[0079]
[0080] where CT represents the final encrypted ciphertext, C1 represents the extension of the health data encryption, e(g, g) represents the bilinear mapping, t represents the second random number, α, β, and both represent constants, C2 represents the encryption related to the access policy tree, C3 represents the adjustment of the encryption result, C4 represents the further adjustment of the encryption result, C5 represents the attribute encryption adjustment, C6 represents another attribute encryption adjustment, and C7 represents the encryption result of the leaf node.
[0081] In the present invention, through encryption technology, the security, privacy, and integrity of the mental health data of the visitors are ensured, and data leakage, tampering, and abuse are prevented. The data is encrypted through multiple stages, greatly improving the security of the data. Even if the key or method of a certain encryption link is cracked, other links can still provide protection to ensure that the data cannot be easily tampered with or stolen. By constructing an access policy tree and performing encryption, the access rights of each user can be carefully controlled, so that only eligible users can decrypt the data, thus avoiding unauthorized access.
[0082] S4: Calculate the comprehensive storage cost of storing the mental health encrypted data in the edge server.
[0083] It should be noted that there are multiple edge servers. When the mental health encrypted data is stored in different edge servers, different comprehensive storage costs will be generated. Whenever the mental health encrypted data is stored in a certain edge server, a storage scheme is formed. And storing the data in other edge servers represents different storage schemes, and each storage scheme represents the choice of storing the mental health encrypted data in different edge servers.
[0084] In a possible implementation manner, S4 specifically includes sub-steps S401 to S404:
[0085] S401: Calculate the storage time cost of storing the mental health encrypted data in the edge server.
[0086] Optionally, calculate the storage time cost of storing the mental health encrypted data in the edge server according to the following formula:
[0087]
[0088] Among them, T offload represents the storage time cost, D enc represents the data size of the mental health encrypted data, X enc represents the CPU usage rate during the encryption process of the mental health target data, f local represents the computing power of the local device, X edge represents the CPU usage rate of the edge server, f edge represents the computing power of the edge server, and r represents the transmission rate of the mental health encrypted data.
[0089] S402: Calculate the storage energy consumption cost of storing the mental health encrypted data to the edge server.
[0090] Optionally, according to the following formula, calculate the storage energy consumption cost of storing the mental health encrypted data to the edge server:
[0091]
[0092] Among them, E offload represents the storage energy consumption cost, E enc represents the energy consumption during the encryption process of the mental health target data, E trans represents the energy consumption during the process of transmitting the mental health encrypted data.
[0093] S403: Calculate the storage memory cost of storing the mental health encrypted data to the edge server.
[0094] Optionally, according to the following formula, calculate the storage memory cost of storing the mental health encrypted data to the edge server:
[0095] M offload = M enc + M trans
[0096] Among them, M offload represents the storage memory cost, M enc represents the memory usage during the encryption process of the mental health target data, M trans represents the memory usage during the process of transmitting the mental health encrypted data.
[0097] S404: Calculate the comprehensive storage cost of storing the mental health encrypted data to the edge server according to the storage time cost, storage energy consumption cost, and storage memory cost.
[0098] Optionally, according to the following formula, calculate the comprehensive storage cost of storing the mental health encrypted data to the edge server:
[0099] C offload = αT ·T offload +α E ·E offload +α M ·M offload
[0100] Among them, C offload represents the comprehensive storage cost, α T represents the weight coefficient of the storage time cost, α E represents the weight coefficient of the storage energy consumption cost, α M represents the weight coefficient of the storage memory cost.
[0101] In the present invention, by calculating the comprehensive storage cost of storing the mental health encrypted data in the edge server, the utilization of storage resources can be optimized, unnecessary overhead can be reduced, and the efficiency of the system can be improved. Such calculation can not only reduce energy consumption and improve environmental sustainability, but also optimize the storage response speed to ensure that data can be quickly accessed and stored. By flexibly adjusting the weight coefficients of the comprehensive cost, the system can dynamically select the most suitable storage scheme according to actual needs, improving the adjustability and adaptability of the system. In addition, the evaluation of the comprehensive storage cost can also help select an efficient and secure edge server to ensure the privacy and integrity of the data of the visitors, and finally achieve efficient, secure and economical storage and sharing of mental health data.
[0102] S5: Construct the constraint conditions for storing the mental health encrypted data in the edge server.
[0103] Optionally, the constraint conditions include: the first constraint condition, the second constraint condition, and the third constraint condition.
[0104] The first constraint condition is specifically: the storage time cost is less than or equal to the maximum storage time cost threshold.
[0105] Optionally, the formula expression of the first constraint condition is specifically:
[0106]
[0107] Among them, N represents the total amount of mental health encrypted data, x n represents the decision variable of the nth mental health encrypted data. When x n =0, the nth mental health encrypted data is not stored in the edge server. When x n =1, the nth mental health encrypted data is stored in the edge server. represents the storage time cost of the nth mental health encrypted data stored in the edge server, and τ represents the maximum storage time cost threshold.
[0108] It should be noted that those skilled in the art can set the maximum storage time cost threshold and the size of the preset load according to actual needs, and the present invention does not make any limitations in this regard.
[0109] The second constraint condition is specifically: the storage energy consumption cost is less than or equal to the maximum storage energy consumption cost threshold.
[0110] Optionally, the formula expression of the second constraint condition is specifically:
[0111]
[0112] Where N represents the total amount of mental health encrypted data, represents the storage energy consumption cost of the nth mental health encrypted data stored in the edge server, and ε represents the maximum storage energy consumption cost threshold.
[0113] It should be noted that those skilled in the art can set the size of the maximum storage energy consumption cost threshold according to actual needs, and the present invention does not make any limitations in this regard.
[0114] The third constraint condition is specifically: the storage memory cost is less than or equal to the maximum storage memory cost threshold.
[0115] Optionally, the formula expression of the third constraint condition is specifically:
[0116]
[0117] Where N represents the total amount of mental health encrypted data, represents the storage memory cost of the nth mental health encrypted data stored in the edge server, and ζ represents the maximum storage memory cost threshold.
[0118] It should be noted that those skilled in the art can set the size of the maximum storage memory cost threshold according to actual needs, and the present invention does not make any limitations in this regard.
[0119] In the present invention, by setting and calculating the constraint conditions for storing mental health encrypted data in the edge server, resource utilization can be effectively optimized, storage costs can be reduced, and storage efficiency can be improved. By controlling the maximum thresholds of storage time, energy consumption, and memory, it is ensured that the system can flexibly respond to different storage requirements and data volumes, while avoiding excessive resource consumption. Such constraint conditions not only improve the efficiency and response speed of the storage process, but also promote the efficient use of energy, reduce the burden on the system, and thus achieve a green and environmentally friendly storage solution.
[0120] S6: Under the constraints of the constraint conditions, with the goal of minimizing the comprehensive storage cost, the mental health encrypted data is stored in the edge server through the whale optimization algorithm.
[0121] It should be noted that the Whale Optimization Algorithm (WOA) is a heuristic optimization algorithm based on the hunting behavior of whales. It simulates the social behavior exhibited by humpback whales during the hunting process, especially the spiral "bubble net" hunting strategy. The WOA searches for the optimal solution to a problem by simulating the process of whales making spiral movements around a target point when tracking prey. In the algorithm, whale individuals continuously approach the global optimal solution by updating their positions, simulating hunting behavior, and social behavior. The advantage of this algorithm lies in its strong global search ability and good convergence, making it suitable for dealing with complex optimization problems, especially in the fields of multi-dimensional function optimization and large-scale data processing.
[0122] In one possible implementation, S6 specifically includes sub-steps S601 and S602:
[0123] S601: Under the constraints of the constraint conditions, with the goal of minimizing the comprehensive storage cost, construct an objective function:
[0124]
[0125] where F() represents the objective function, X represents the storage scheme of mental health encrypted data, min represents minimization, N represents the total amount of mental health encrypted data, represents the comprehensive storage cost of storing the nth mental health encrypted data on the edge server.
[0126] S602: According to the objective function, use the Whale Optimization Algorithm to store the mental health encrypted data on the edge server.
[0127] In one possible implementation, S602 specifically includes sub-steps S6021 to S6028:
[0128] S6021: Initialize the population to obtain an initial population. The initial population includes multiple whale individuals, and each whale individual represents a feasible storage scheme.
[0129] S6022: Use the reciprocal of the objective function as the fitness function, calculate the fitness values of the whale individuals in the initial population, and use the position of the whale individual with the maximum fitness value as the current whale individual's position.
[0130] S6023: Update the control factors:
[0131] A = 2a·r1 - a
[0132] C = 2r2
[0133]
[0134] where A, a, and C all represent control factors, r1 and r2 both represent random numbers between [0, 1], Tmax represents the maximum number of iterations, and t represents the current iteration number.
[0135] S6024: Determine whether the probability of the predation mechanism is less than 0.5. If so, enter S6025. Otherwise, enter the hunting stage.
[0136] Optionally, the calculation formula for the hunting stage is specifically:
[0137]
[0138] where D represents the distance between the position of the current whale individual and the position of the optimal whale individual in the hunting stage, X * (t) represents the position of the optimal whale individual at the t-th iteration, X(t) represents the position of the current whale individual at the t-th iteration, X(t + 1) represents the position of the whale individual at the (t + 1)-th iteration, b represents the logarithmic spiral shape constant, l represents a random number between [–1, 1], and ω represents the adaptive inertia weight.
[0139] It should be noted that by introducing the adaptive inertia weight, the algorithm can dynamically adjust the search strategy according to the progress of the optimization process. In the initial stage, a larger inertia weight prompts the algorithm to conduct extensive global searches, which helps to avoid local optimal solutions. In the later stage, as the inertia weight gradually decreases, the algorithm focuses more on local searches, improving the convergence speed and finely approaching the optimal solution. This adaptive mechanism effectively balances the global search and local search capabilities, improves the stability of the optimization process, convergence efficiency, and the flexibility of the algorithm, thereby helping the optimization algorithm to find the global optimal solution more quickly and accurately, especially having significant advantages in complex optimization problems.
[0140] S6025: Determine whether the absolute value of the control factor A is less than 1. If so, enter the encircling stage. Otherwise, enter the searching stage.
[0141] Optionally, the calculation formula for the encircling stage is specifically:
[0142]
[0143] where D' represents the distance between the position of the current whale individual and the position of the optimal whale individual in the encircling stage.
[0144] Optionally, the calculation formula for the searching stage is specifically:
[0145]
[0146] where D″ represents the distance between the position of the current whale individual and the position of a randomly selected whale individual in the searching stage, X rand(t + 1) represents the position of a randomly selected whale individual at the (t + 1)-th iteration.
[0147] S6026: Update the position of the current whale individual according to the calculation results of the hunting phase, the encircling phase, and the searching phase.
[0148] S6027: Calculate the fitness value of the updated whale individual. When the fitness value of the updated whale individual is greater than or equal to the fitness value of the current whale individual, update the position of the current whale individual. When the fitness value of the updated whale individual is less than the fitness value of the current whale individual, keep the position of the current whale individual unchanged.
[0149] S6028: Determine whether the maximum number of iterations has been reached. If so, output the optimal storage scheme. Otherwise, return to step S6022.
[0150] In the present invention, the whale optimization algorithm can effectively search for the optimal solution by simulating the predation behavior of whales. Among various storage schemes, the algorithm can adaptively find the optimal storage location, thereby achieving the goal of minimizing the storage cost. By storing the mental health encrypted data on the edge server, the data transmission delay can be reduced, a faster access response can be provided, the risk of transmitting sensitive data to the central server can be avoided, and thus the possibility of data leakage can be reduced. By storing and processing data on the edge server, the need to send a large amount of data to the central server is reduced, thereby reducing the bandwidth consumption and transmission cost.
[0151] S7: Construct the smart contract of the blockchain.
[0152] It should be noted that the blockchain is a distributed ledger technology. Through a decentralized network structure, data can be shared and stored among multiple nodes, ensuring the transparency, immutability, and security of the data. In the blockchain, data is stored in the form of "blocks". Each block contains a set of verified transaction information and is connected to the previous block through an encryption algorithm, forming a chain structure. This makes it impossible to easily change or delete the data once it is written into the blockchain, thus ensuring the integrity and credibility of the data.
[0153] Optionally, the content of the smart contract specifically includes:
[0154] Each visitor's mental health encrypted data has an independent storage space.
[0155] When the storage space of the current visitor is included in the blockchain, store the mental health encrypted data of the current visitor in the corresponding storage space.
[0156] When there is no storage space for the current visitor in the blockchain, a new storage space is created, and the encrypted mental health data of the current visitor is stored in the newly created storage space.
[0157] Bind the visitor with the access right to their corresponding encrypted mental health data, and reject the visitor's access to the encrypted mental health data of other visitors.
[0158] Reject the access request for mental health data without the authorization of the visitor.
[0159] Allow the access request for mental health data with the authorization of the visitor.
[0160] In the present invention, by constructing the smart contract of the blockchain, the privacy and security of mental health data can be effectively guaranteed. The encrypted mental health data of each visitor is stored in an independent storage space, ensuring the isolation and protection of the visitor's data. At the same time, the smart contract strictly binds the visitor with the access right to their data, ensuring that unauthorized access requests are rejected, and the data can only be accessed with the authorization of the visitor. This mechanism not only enhances the transparency and credibility of the data, prevents data leakage or abuse, but also improves the efficiency and reliability of data management through automated storage and access control.
[0161] S8: According to the smart contract, upload the encrypted mental health data stored in the edge server to the blockchain for storage.
[0162] In a possible implementation manner, S8 specifically includes sub-steps S801 and S802:
[0163] S801: Calculate the hash value of the encrypted mental health data through a hash function.
[0164] It should be noted that a hash function is a function that converts an input of any size of data into an output of a fixed size. It generates a unique value by performing specific algorithm processing on the input data, and this value is usually a string of a fixed length. The hash function has several important characteristics: First, the same input always produces the same output. Second, the change of the hash value is very sensitive to the slightest change of the input. Even if the input data changes slightly, the output hash value will change significantly. Finally, the hash function is one-way, that is, it is impossible to reverse the original input from the hash value. The hash function is widely used in fields such as data storage, encryption, security verification, and blockchain to ensure the integrity of data and fast query.
[0165] Optionally, calculate the hash value of the encrypted mental health data according to the following formula:
[0166] H(D enc )=Hash(Denc )
[0167] Among them, H(D enc ) represents the hash value of the mental health encrypted data, D enc represents the mental health encrypted data, and Hash() represents the hash function.
[0168] S802: According to the smart contract, upload the hash value to the blockchain for storage.
[0169] In the present invention, by uploading the hash value of the mental health encrypted data to the blockchain, the integrity and immutability of the data can be ensured. Storing the hash value instead of the original data through the blockchain improves the security of the data, avoids the leakage of sensitive information, and at the same time utilizes the decentralized characteristics of the blockchain to enhance the data verification and auditing capabilities, ensuring the transparency and credibility of data management. In addition, the automatic execution of the smart contract and the transparency of the data upload process not only reduce the storage cost, but also reduce human intervention and errors, ensuring the compliance and security of data storage. In this way, data management becomes more efficient, secure, and can effectively protect the privacy of visitors.
[0170] S9: Obtain a real-time access request.
[0171] S10: When the real-time access request conforms to the smart contract, decrypt the mental health encrypted data stored in the blockchain to remotely collaboratively share the mental health target data.
[0172] In a possible implementation manner, S10 specifically includes sub-steps S1001 to S1004:
[0173] S1001: Determine whether the user attribute meets the access policy tree. If so, enter S1002. Otherwise, reject decryption.
[0174] S1002: Partially decrypt the final encrypted ciphertext and output the partially decrypted health ciphertext.
[0175] Optionally, according to the following formula, partially decrypt the final encrypted ciphertext and output the partially decrypted health ciphertext:
[0176] CT r =(C' = SE HK (m), C1 = HK·e(g, g) αt , C2 = g βt , A = e(g, g) γ )
[0177] Among them, CT r represents the partially decrypted health ciphertext, and γ represents a constant.
[0178] S1003: Calculate the symmetric key based on the partially decrypted health ciphertext.
[0179] Optionally, calculate the symmetric key according to the following formula:
[0180]
[0181] where HK represents the symmetric key.
[0182] S1004: Decrypt the preliminary encrypted ciphertext with the symmetric key to obtain the mental health target data.
[0183] In the present invention, before the decryption process, the system first determines whether the user meets the conditions of the access policy tree to ensure that only authorized users can access the data, ensuring the privacy and security of the data, preventing unauthorized users from accessing the mental health information of visitors, and effectively protecting the privacy of visitors. Through the multi-step decryption process, the complexity of data decryption is increased, the security of the data processing process is improved, and the risk of single-point failure is reduced. Through the decrypted data, professionals in mental health management institutions can obtain the mental health information of visitors in real time for remote collaborative sharing. This makes the treatment process more efficient, especially in remote psychological intervention and cross-institutional medical cooperation, and can greatly improve the quality and efficiency of psychological intervention.
[0184] Refer to the attached Figure 2 illustrates a schematic structural diagram of a remote collaborative sharing system for mental health data provided by the present invention.
[0185] The present invention also provides a remote collaborative sharing system 20 for mental health data, which is applied to the above-mentioned remote collaborative sharing method for mental health data and includes:
[0186] A processor 201;
[0187] A memory 202, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor 201, the remote collaborative sharing method for mental health data as described in the method embodiment is implemented.
[0188] The remote collaborative sharing system 20 for mental health data provided by the present invention can execute the above-mentioned remote collaborative sharing method for mental health data and achieve the same or similar technical effects. To avoid repetition, the present invention will not be described in detail herein.
[0189] The beneficial effects brought by the technical solution provided in the embodiment of the present invention at least include:
[0190] In the embodiment of the present invention, through data encryption processing of mental health target data, the existence of mental health data in the form of paper or single electronic records is avoided, the diagnosis efficiency and data confidentiality are improved. By storing the mental health encrypted data in the edge server, the local device load is reduced. By uploading the mental health encrypted data stored in the edge server to the blockchain for storage, large-scale data storage and real-time collaborative sharing can be satisfied. When the real-time access request conforms to the smart contract, the mental health encrypted data stored in the blockchain is decrypted to remotely collaboratively share the mental health target data, no longer relying on face-to-face diagnosis and treatment, and the needs of comprehensively, continuously, real-time and cross-institutionally understanding the mental health diagnosis history and symptom changes of the visitor can be met, without resulting in the fragmentation and isolation of mental health data, which is beneficial for psychologists to comprehensively and accurately understand the mental state change process of the visitor.
[0191] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0192] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).
[0193] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0194] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. Additionally, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood with reference to the context before and after.
[0195] In the present invention, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.
[0196] It should be understood that in various embodiments of the present invention, the magnitudes of the sequence numbers of the above processes do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0197] Those of ordinary skill in the art will realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0198] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices, apparatuses, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0199] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0200] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0202] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0203] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the method for remote collaborative sharing of mental health data as described in the method embodiment is implemented.
[0204] The computer-readable storage medium provided by the present invention can implement the steps and effects of the remote collaborative sharing method of mental health data in the above-mentioned method embodiment. To avoid repetition, the present invention will not go into details.
[0205] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0206] In an embodiment of the present invention, by encrypting the mental health target data, the mental health data is avoided from existing in the form of paper or a single electronic record, thereby improving the diagnostic efficiency and data confidentiality. By storing the mental health encrypted data in the edge server, the local device load is reduced. By uploading the mental health encrypted data stored in the edge server to the blockchain for storage, large-scale data storage and real-time collaborative sharing can be met. By decrypting the mental health encrypted data stored in the blockchain when the real-time access request complies with the smart contract, the mental health target data can be remotely collaboratively shared, no longer relying on face-to-face diagnosis and treatment, and the visitor's mental health diagnosis history and symptom changes can be fully, continuously, in real time and across institutions. The needs will not cause the mental health data to be fragmented and isolated, which is beneficial for psychological counselors to fully and accurately understand the visitor's mental state changes.
[0207] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
[0208] The following points need to be explained:
[0209] (1) The attached drawings of the embodiments of the present invention only relate to the structures involved in the embodiments of the present invention, and other structures can refer to the general design.
[0210] (2) For clarity, in the attached drawings used to describe the embodiments of the present invention, the thickness of the layer or region is enlarged or reduced, that is, these drawings are not drawn according to the actual scale. It can be understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element can be "directly" on or under the other element or there can be intermediate elements.
[0211] (3) Without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.
[0212] As mentioned above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for remotely collaborative sharing of mental health data, characterized in that, Including: S1: Obtain the mental health data of the visitor; S2: Perform data preprocessing on the mental health data to obtain mental health target data; S3: Perform data encryption processing on the mental health target data to obtain mental health encrypted data; S4: Calculate the comprehensive storage cost of storing the mental health encrypted data in the edge server; S5: Construct the constraint conditions for storing the mental health encrypted data in the edge server; S6: Under the constraints of the constraint conditions, with the goal of minimizing the comprehensive storage cost, use the whale optimization algorithm to store the mental health encrypted data in the edge server; S7: Construct the smart contract of the blockchain; S8: According to the smart contract, upload the mental health encrypted data stored in the edge server to the blockchain for storage; S9: Obtain the real-time access request; S10: When the real-time access request conforms to the smart contract, decrypt the mental health encrypted data stored in the blockchain to remotely collaboratively share the mental health target data.
2. The remote collaborative sharing method for mental health data according to claim 1, wherein The mental health data includes: emotional state, psychological assessment, health indicators, self-report, and treatment history.
3. The remote collaborative sharing method for mental health data according to claim 1, wherein The specific content of S2 includes: S201: Correct the abnormal data in the mental health data; S202: Unify the data format in the mental health data after correcting the abnormal data; S203: Fill in the missing data in the mental health data with unified data format to obtain the mental health target data.
4. The remote collaborative sharing method for mental health data according to claim 1, characterized in that The specific data encryption processing of the mental health target data in S3 includes: S301: Randomly select a symmetric key; S302: According to the symmetric key, perform preliminary encryption on the mental health target data through the symmetric encryption algorithm, and output the preliminary encrypted ciphertext; S303: Construct an access policy tree, and the access policy tree includes a root node and leaf nodes; S304: Select a polynomial for the root node and the leaf nodes in turn in a bottom-up manner; S305: Select a first random number and set the polynomial equal to the first random number; S306: According to the set polynomial, perform outsourcing encryption on the access policy tree and output the outsourcing encrypted ciphertext; S307: Select a second random number; S308: According to the preliminary encrypted ciphertext, the outsourcing encrypted ciphertext, and the second random number, perform final encryption on the preliminarily encrypted mental health target data and output the final encrypted ciphertext.
5. The remote collaborative sharing method for mental health data according to claim 1, wherein The specific content of S4 includes: S401: Calculate the storage time cost of storing the mental health encrypted data in the edge server; S402: Calculate the storage energy consumption cost of storing the mental health encrypted data in the edge server; S403: Calculate the storage memory cost of storing the mental health encrypted data in the edge server; S404: Calculate the comprehensive storage cost of storing the mental health encrypted data in the edge server according to the storage time cost, the storage energy consumption cost, and the storage memory cost.
6. The remote collaborative sharing method for mental health data according to claim 1, wherein The constraint conditions include: a first constraint condition, a second constraint condition, and a third constraint condition; The first constraint condition is specifically: the storage time cost is less than or equal to the maximum storage time cost threshold; The second constraint condition is specifically: the storage energy consumption cost is less than or equal to the maximum storage energy consumption cost threshold; The third constraint condition is specifically: the storage memory cost is less than or equal to the maximum storage memory cost threshold.
7. The remote collaborative sharing method of mental health data according to claim 1, characterized in that The content of the smart contract specifically includes: The mental health encrypted data of each visitor has an independent storage space; When the blockchain contains the storage space of the current visitor, store the mental health encrypted data of the current visitor in the corresponding storage space; When the blockchain does not contain the storage space of the current visitor, create a new storage space and store the mental health encrypted data of the current visitor in the newly created storage space; Bind the visitor with the access right to the mental health encrypted data corresponding to the visitor, and reject the visitor from accessing the mental health encrypted data of other visitors; Without the authorization of the visitor, reject the access request for the mental health data; With the authorization of the visitor, allow the access request for the mental health data.
8. The remote collaborative sharing method for mental health data according to claim 7, wherein The S8 specifically includes: S801: Calculate the hash value of the mental health encrypted data through a hash function; S802: According to the smart contract, upload the hash value to the blockchain for storage.
9. The remote collaborative sharing method for mental health data according to claim 4, wherein The S10 specifically includes: S1001: Determine whether the user attribute meets the access policy tree; if so, enter S1002; otherwise, reject decryption; S1002: Partially decrypt the final encrypted ciphertext and output the partially decrypted health ciphertext; S1003: Calculate the symmetric key according to the partially decrypted health ciphertext; S1004: Decrypt the preliminary encrypted ciphertext through the symmetric key to obtain the mental health target data.
10. A remote collaborative sharing system for mental health data, characterized in that, It includes: A processor; A memory, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor, the mental health data remote collaborative sharing method as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Medical data sharing method, system and device capable of protecting privacy
CN118260794A
An intelligent system for managing health and fitness data using artificial intelligence with IoT devices.
DE202023101305U1
Systems and Methods for Encrypting and Controlling Access to Encrypted Data Based Upon Immutable Ledgers
US20220398340A1