A remote collaborative sharing method and system for mental health data

By preprocessing and encrypting mental health data, storing it on edge servers, and uploading it to the blockchain, the problem of inefficient data storage and sharing in existing technologies is solved, efficient and secure data management and cross-institutional collaborative sharing are achieved, and the accuracy and continuity of mental health diagnosis are improved.

CN120388670BActive Publication Date: 2025-09-30CHINA JAPAN FRIENDSHIP HOSPITAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510384607.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-09-30
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

In existing technologies, mental health data exists in the form of paper or single electronic records, resulting in low diagnostic efficiency, poor data confidentiality, and excessive local device load, making it difficult to meet the needs of large-scale data storage and real-time collaborative sharing. Traditional methods cannot fully, continuously, and real-time understand the visitor's mental health diagnosis history and symptom changes.

Method used

By obtaining the visitor's mental health data, preprocessing and encrypting the data, storing it on the edge server and building constraints, using the whale optimization algorithm to minimize storage costs, uploading it to the blockchain for storage, and realizing real-time access and decryption sharing through smart contracts.

Benefits of technology

It improves diagnostic efficiency and data confidentiality, reduces local device load, realizes large-scale data storage and real-time collaborative sharing, ensures the integrity and security of mental health data, and supports continuous and real-time understanding of visitors' mental state changes across institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388670B_ABST
    Figure CN120388670B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for remote collaborative sharing of mental health data, relating to the field of mental health management technology. The method comprises: acquiring mental health data; preprocessing the mental health data to obtain mental health target data; encrypting the mental health target data to obtain encrypted mental health data; calculating the comprehensive storage cost of storing the encrypted mental health data on an edge server; establishing constraints; and, under the constraints, using a whale optimization algorithm to minimize the comprehensive storage cost, storing the encrypted mental health data on the edge server; establishing a smart contract; uploading the encrypted mental health data to a blockchain for storage according to the smart contract; obtaining a real-time access request; and, if the real-time access request complies with the smart contract, decrypting the encrypted mental health data stored on the blockchain to enable remote collaborative sharing of the mental health target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mental health management technology, and in particular 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 become a growing global concern. In modern society, factors such as work pressure and a fast-paced lifestyle have led to a rapid increase in mental health issues. An increasing number of people experiencing mood disorders or psychological disorders are seeking professional mental health treatment and intervention, and this demand has driven rapid advancements in related technologies, particularly those for mental health data management and collaborative sharing.

[0003] In existing technologies, mental health data typically exists in paper or single electronic record formats, resulting in inefficient diagnostics and poor data confidentiality. Furthermore, as the number of visitors increases, local device load becomes excessive, making it difficult to meet the demands of large-scale data storage and real-time collaborative sharing.

[0004] Traditional mental health management methods typically rely on face-to-face diagnosis and treatment, which prevents comprehensive, continuous, real-time, and cross-institutional understanding of clients' mental health diagnostic histories and symptom changes. For example, after a period of service at one psychotherapy institution, a client may choose to discontinue treatment or switch to another institution due to changes in personal feelings or needs. This fluidity leads to fragmented and siloed mental health data, hindering counselors from fully and accurately understanding the client's mental state evolution. Summary of the Invention

[0005] In order to solve the problems in the prior art that mental health data usually exist in the form of paper or a single electronic record, resulting in low diagnostic efficiency and poor data confidentiality, and at the same time, as the number of visitors increases, the local equipment load is too high, which makes it difficult to meet the needs of 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 cannot fully, continuously, real-time and cross-institutionally understand the visitors' mental health diagnosis history and symptom changes, resulting in the fragmentation and isolation of mental health data, which is not conducive to psychological counselors to fully and accurately understand the visitors' mental state changes. The present invention provides a remote collaborative sharing method and system for mental health data.

[0006] The technical solutions provided by the embodiments of the present invention are as follows:

[0007] First aspect:

[0008] An embodiment of the present invention provides a method for remote collaborative sharing of mental health data, comprising:

[0009] S1: Obtain the client's mental health data;

[0010] S2: performing data preprocessing on the mental health data to obtain mental health target data;

[0011] S3: performing data encryption processing on the mental health target data to obtain mental health encrypted data;

[0012] S4: Calculating the comprehensive storage cost of storing the mental health encrypted data in the edge server;

[0013] S5: Constructing constraints for storing the mental health encrypted data in the edge server;

[0014] S6: Under the constraints of the constraints, 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;

[0015] S7: Building smart contracts on the blockchain;

[0016] S8: uploading the encrypted mental health data stored in the edge server to the blockchain for storage according to the smart contract;

[0017] S9: Get real-time access request;

[0018] S10: When the real-time access request complies with the smart contract, the mental health encrypted data stored in the blockchain is decrypted to remotely and collaboratively share the mental health target data.

[0019] Second aspect:

[0020] An embodiment of the present invention provides a remote collaborative sharing system for mental health data, comprising:

[0021] processor;

[0022] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for remote collaborative sharing of mental health data as described in the first aspect is implemented.

[0023] The third aspect:

[0024] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for remote collaborative sharing of mental health data as described in the first aspect is implemented.

[0025] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0026] 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of a method for remote collaborative sharing of mental health data provided by an embodiment of the present invention;

[0029] Figure 2 A structural diagram of a remote collaborative sharing system for mental health data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0031] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.

[0032] In the embodiments of the present invention, the terms "image" and "picture" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same. The terms "of," "corresponding," and "corresponding" may be used interchangeably. It should be noted that, when the distinction between them is not emphasized, their intended meanings are the same.

[0033] In the embodiment of the present invention, sometimes a subscript such as W1 may be written as a non-subscript form such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0034] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0035] Reference Manual Figure 1 , which shows a flow chart of a method for remote collaborative sharing of mental health data provided by an embodiment of the present invention.

[0036] An embodiment of the present invention provides a method for remote collaborative sharing of mental health data. This method can be implemented by a remote collaborative sharing device for mental health data, which can be a terminal or a server. The processing flow of the remote collaborative sharing method for mental health data can include the following steps:

[0037] S1: Obtain the visitor's mental health data.

[0038] Among them, mental health data includes: emotional state, psychological assessment, health indicators, self-report and treatment history.

[0039] It should be noted that emotional state refers to the client's emotional changes and fluctuations in psychological state, such as the frequency, intensity and duration of emotions such as anxiety, depression, stress and pleasure.

[0040] It should be noted that psychological assessment refers to the assessment results of the client's psychological state obtained through standardized psychological tests, questionnaires or surveys, such as the Depression Scale (PHQ-9), the Anxiety Scale (GAD-7), etc.

[0041] It should be noted that 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 of mental health.

[0042] It should be noted that self-report refers to the client's own subjective feedback on his or her psychological state, emotional experience or mental health status, which is usually collected through questionnaires, diaries or self-assessment tools.

[0043] It should be noted that treatment history refers to the client's past mental health treatment records, including whether he or she has received psychological counseling, the use of therapeutic drugs, and any intervention measures in the field of mental health.

[0044] This invention uses comprehensive data from multiple dimensions, including emotional state, psychological assessment, and health indicators, to provide a comprehensive understanding of a client's mental health. This multi-faceted assessment can help doctors or therapists more accurately assess a client's emotional fluctuations, psychological state, potential psychological issues, and the impact of physical health on mental health, providing more precise diagnosis and intervention plans.

[0045] S2: Preprocess the mental health data to obtain mental health target data.

[0046] In a possible implementation, S2 specifically includes sub-steps S201 to S203:

[0047] S201: Correct abnormal data in mental health data.

[0048] Optionally, the abnormal data in the mental health data is corrected as follows:

[0049] Delete duplicated questionnaire data: When a visitor submits the same questionnaire repeatedly due to operational errors or technical problems, delete the duplicate questionnaires and only retain the questionnaire data submitted for the first time.

[0050] S202: Unifying the data format of the mental health data after the abnormal data is corrected.

[0051] Optionally, the data format of the mental health data after the abnormal data is corrected is unified as follows:

[0052] Convert the raw scores of different mental health scales (such as PHQ-9, GAD-7, etc.) into a unified percentage format to facilitate comparative analysis between different scales. For example, convert the 0-27 score of the PHQ-9 scale into a percentage format:

[0053]

[0054] Where p represents the percentage score, s0 represents the raw 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 the unified data format to obtain mental health target data.

[0056] Optionally, the missing data in the mental health data after the unified data format is filled in as follows:

[0057] Filling in missing questionnaire scores: For missing mental health questionnaire questions, you can fill in the missing scores based on the average scores of similar clients. For example, if a client's emotional state score is missing, fill in the missing scores with the average scores of other clients.

[0058] In this invention, by correcting abnormal data, we reduce data redundancy caused by operational issues, ensure that analysis is based on authentic and unique data, improve data quality, and prevent misleading analytical conclusions. By standardizing data formats, we improve data consistency and standardization, reducing the analytical difficulty caused by inconsistent data formats, especially in the processing and analysis of large-scale datasets. By filling in missing data, we help maintain data integrity and avoid biased analytical results caused by missing data.

[0059] S3: Perform data encryption processing on the mental health target data to obtain mental health encrypted 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, S3 specifically includes sub-steps S301 to S308:

[0062] S301: Randomly select a symmetric key.

[0063] S302: Based on the symmetric key, the mental health target data is preliminarily encrypted through a symmetric encryption algorithm, and the preliminarily encrypted ciphertext is output.

[0064] It's important to note that symmetric encryption uses the same key for both encryption and decryption. The sender uses this key to encrypt plaintext data into ciphertext, and the receiver then uses the same key to decrypt the ciphertext back into plaintext. Because the same key is used for both encryption and decryption, symmetric encryption is fast and suitable for encrypting large amounts of data. However, this method also carries certain security risks: if the key is compromised, all encrypted data will be exposed. Therefore, secure key management is crucial in practical applications.

[0065] Optionally, the mental health target data is preliminarily encrypted according to the following formula, and the preliminarily encrypted ciphertext is output:

[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, which includes a root node and leaf nodes.

[0069] It should be noted that an access decision tree typically consists of access control rules and user attributes, and is used to determine whether a user has permission to access specific data. The root node of the tree defines the global access policy, which typically includes basic access conditions or rules to ensure data security and privacy. Leaf nodes contain more specific access conditions, such as the user's identity information, role permissions, and authorization status. Each leaf node represents a specific access condition, such as whether the user is an administrator, whether they have passed authentication, or whether they have specific permissions. By following 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 and thus determines whether the user is allowed to access the data. In this way, the access decision tree can flexibly control permissions based on the specific circumstances of the user, ensuring secure data sharing.

[0070] S304: Select a polynomial for the root node and the leaf node in sequence 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 outsource encryption on the access policy tree according to the set polynomial, and output the outsource encrypted ciphertext.

[0073] Optionally, outsource encryption is performed on the access policy tree according to the following formula, and the outsource encrypted ciphertext is output:

[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 the public base point, s represents the first random number, and C7 represents the encryption result of the access policy tree leaf node. Indicates the encryption result calculated based on the base point g, p y (0) represents the value of the polynomial associated with each leaf node y of the access strategy tree, Indicates the hash value H1 based on user attributes (attr y ) encryption result, H1(attr y ) represents the attribute attr in the access policy leaf node y y The result of the hash operation, Y, represents the set of leaf nodes in the access strategy 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, the preliminary encrypted mental health target data is finally encrypted and the final encrypted ciphertext is output.

[0078] Optionally, the mental health target data after preliminary encryption is finally encrypted according to the following formula, and the final encrypted ciphertext is output:

[0079]

[0080] Among them, CT represents the final encrypted ciphertext, C1 represents the extension of health data encryption, e(g,g) represents the bilinear mapping, t represents the second random number, α, β and All 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 leaf node encryption result.

[0081] In this invention, encryption technology ensures the security, privacy, and integrity of visitor mental health data, preventing data leakage, tampering, and misuse. Data is encrypted at multiple stages, significantly improving security. Even if the key or method of a particular encryption link is cracked, other links still provide protection, ensuring that the data cannot be easily tampered with or stolen. By constructing and encrypting an access policy tree, each user's access rights can be meticulously controlled, ensuring that only qualified users can decrypt the data, thus preventing unauthorized access.

[0082] S4: Calculate the comprehensive storage cost of storing encrypted mental health data in edge servers.

[0083] It should be noted that there are multiple edge servers. When encrypted mental health data is stored on different edge servers, different comprehensive storage costs will be incurred. Each time encrypted mental health data is stored on a particular edge server, a storage solution is formed. Storing the data on other edge servers represents a different storage solution, each representing the choice of storing encrypted mental health data on a different edge server.

[0084] In a possible implementation, S4 specifically includes sub-steps S401 to S404:

[0085] S401: Calculate the storage time cost of storing encrypted mental health data in the edge server.

[0086] Optionally, calculate the storage time cost of storing encrypted mental health data on the edge server according to the following formula:

[0087]

[0088] Among them, T offload represents the storage time cost, D enc Indicates the data size of mental health encrypted data, X enc represents the CPU usage of mental health target data during encryption, f local Indicates the computing power of the local device, X edge Indicates the CPU usage of the edge server, f edge represents the computing power of the edge server, and r represents the rate of mental health encrypted data transmission.

[0089] S402: Calculate the storage energy consumption cost of storing encrypted mental health data in the edge server.

[0090] Optionally, calculate the storage energy consumption cost of storing encrypted mental health data on the edge server according to the following formula:

[0091]

[0092] Among them, E offload represents the storage energy cost, E enc represents the energy consumption of mental health target data during encryption, E trans Represents the energy consumption during the transmission of mental health encrypted data.

[0093] S403: Calculate the storage memory cost of storing the mental health encrypted data in the edge server.

[0094] Optionally, calculate the storage memory cost of storing encrypted mental health data on the edge server according to the following formula:

[0095] M offload =M enc +M trans

[0096] Among them, M offload represents the storage memory cost, M enc represents the memory usage of mental health target data during encryption, M trans Represents memory usage during transmission of mental health encrypted data.

[0097] S404: Calculate the comprehensive storage cost of storing the mental health encrypted data in the edge server based on the storage time cost, storage energy consumption cost, and storage memory cost.

[0098] Optionally, calculate the comprehensive storage cost of storing encrypted mental health data on the edge server according to the following formula:

[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 storage time cost, α E Represents the weight coefficient of storage energy consumption cost, α M The weight coefficient representing the storage memory cost.

[0101] In the present invention, by calculating the comprehensive storage cost of storing encrypted mental health data on edge servers, the utilization of storage resources can be optimized, unnecessary overhead can be reduced, and system efficiency can be improved. This calculation not only reduces energy consumption and improves environmental sustainability, but also optimizes storage response speed, ensuring that data can be quickly accessed. By flexibly adjusting the weight coefficient of the comprehensive cost, the system can dynamically select the most appropriate storage solution based on actual needs, improving the system's adjustability and adaptability. In addition, the evaluation of the comprehensive storage cost can also help select efficient and secure edge servers, ensuring the privacy and integrity of visitor data, and ultimately achieving efficient, secure, and economical mental health data storage and sharing.

[0102] S5: Construct constraints for storing encrypted mental health data to edge servers.

[0103] Optionally, the constraint conditions include: a first constraint condition, a second constraint condition, and a 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 for the first constraint condition is specifically expressed as:

[0106]

[0107] Where 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. 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 limit this.

[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 second constraint condition is specifically expressed as follows:

[0111]

[0112] Where N represents the total amount of mental health encrypted data, represents the storage energy consumption cost of storing the nth mental health encrypted data 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 maximum storage energy consumption cost threshold according to actual needs, and the present invention does not limit this.

[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 third constraint condition is specifically expressed as follows:

[0116]

[0117] Where N represents the total amount of mental health encrypted data, represents the storage memory cost of storing the nth mental health encrypted data 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 maximum storage memory cost threshold according to actual needs, and the present invention does not limit this.

[0119] In this invention, by setting and calculating constraints for storing encrypted mental health data on edge servers, we can effectively optimize resource utilization, reduce storage costs, and improve storage efficiency. By controlling the maximum thresholds for storage time, energy consumption, and memory, we ensure that the system can flexibly respond to different storage requirements and data volumes while avoiding excessive resource consumption. Such constraints not only improve the efficiency and responsiveness of the storage process, but also promote efficient energy utilization and reduce the burden on the system, thereby achieving a green and environmentally friendly storage solution.

[0120] S6: Under the constraints, 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 (WHA) is a heuristic optimization algorithm based on whale hunting behavior. It simulates the social behaviors exhibited by humpback whales during hunting, particularly their spiral "bubble net" feeding strategy. The Whale Optimization Algorithm searches for the optimal solution by simulating the spiral motion of whales around a target point while tracking prey. In the algorithm, individual whales continuously approach the global optimal solution by updating their positions and simulating their hunting and social behaviors. The advantages of this algorithm lie in its strong global search capabilities and good convergence properties, making it suitable for complex optimization problems, particularly in the fields of multidimensional function optimization and large-scale data processing.

[0122] In a possible implementation, S6 specifically includes sub-steps S601 and S602:

[0123] S601: Under the constraints, with the goal of minimizing the comprehensive storage cost, construct the objective function:

[0124]

[0125] Where F() represents the objective function, X represents the storage scheme of mental health encrypted data, min represents minimization, and N represents the total amount of mental health encrypted data. Denotes the comprehensive storage cost of storing the nth mental health encrypted data in the edge server.

[0126] S602: Based on the objective function, the mental health encrypted data is stored in the edge server through the whale optimization algorithm.

[0127] In a 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 solution.

[0129] S6022: Using the inverse 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 position of the whale individual.

[0130] S6023: Update control factors:

[0131] A=2a·r1-a

[0132] C=2r2

[0133]

[0134] Among them, A, a and C are control factors, r1 and r2 are random numbers between [0,1], Tmax represents the maximum number of iterations, and t represents the current number of iterations.

[0135] S6024: Determine whether the predation mechanism probability is less than 0.5. If so, proceed to S6025. Otherwise, enter the hunting phase.

[0136] Optionally, the calculation formula for the hunting phase is as follows:

[0137]

[0138] Where D represents the distance between the current whale individual position and the optimal whale individual position in the hunting phase, 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 an adaptive inertia weight, the algorithm can dynamically adjust its search strategy based on the progress of the optimization process. Initially, a larger inertia weight prompts the algorithm to conduct an extensive global search, helping to avoid local optimal solutions. Later, as the inertia weight gradually decreases, the algorithm focuses more on local search, improving convergence speed and approaching the optimal solution more precisely. This adaptive mechanism effectively balances the capabilities of global and local search, improving the stability, convergence efficiency, and algorithmic flexibility of the optimization process, thereby helping the optimization algorithm find the global optimal solution more quickly and accurately, offering 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 encirclement phase. Otherwise, enter the search phase.

[0141] Optionally, the calculation formula for the encirclement phase 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 encirclement stage.

[0144] Optionally, the calculation formula of the search phase is specifically:

[0145]

[0146] Where D″ represents the distance between the current whale individual position and the position of the randomly selected whale individual in the search phase, and X rand(t+1) represents the position of a randomly selected whale individual in the t+1th iteration.

[0147] S6026: Update the current position of the individual whale based on the calculation results of the hunting phase, the encirclement phase, and the search 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, maintain the position of the current whale individual unchanged.

[0149] S6028: Determine whether the maximum number of iterations has been reached, and if so, output the optimal storage solution. Otherwise, return to step S6022.

[0150] In this invention, the whale optimization algorithm can effectively search for the optimal solution by simulating the hunting behavior of whales. Among multiple storage options, the algorithm can adaptively find the optimal storage location, thereby achieving the goal of minimizing storage costs. By storing encrypted mental health data on edge servers, data transmission latency can be reduced, providing faster access responses, and avoiding the risk of transmitting sensitive data to central servers, thereby reducing the possibility of data leakage. By performing data storage and processing on edge servers, the need to send large amounts of data to central servers is reduced, thereby reducing bandwidth consumption and transmission costs.

[0151] S7: Building smart contracts on the blockchain.

[0152] It's important to note that blockchain is a distributed ledger technology that, through a decentralized network structure, enables data to be shared and stored across multiple nodes, ensuring transparency, immutability, and security. In a blockchain, data is stored in "blocks," each containing a set of verified transaction information. These blocks are linked to the previous block using a cryptographic algorithm, forming a chain structure. This ensures that once data is written to the blockchain, it cannot be easily altered or deleted, thus ensuring its integrity and credibility.

[0153] Optionally, the content of the smart contract specifically includes:

[0154] Each visitor's mental health encrypted data has independent storage space.

[0155] When the blockchain contains the storage space of the current visitor, the mental health encrypted data of the current visitor is stored in the corresponding storage space.

[0156] When the blockchain does not contain the storage space of the current visitor, a new storage space is created, and the mental health encrypted data of the current visitor is stored in the newly created storage space.

[0157] Bind the access rights of visitors to their corresponding mental health encrypted data, and deny visitors access to other visitors' mental health encrypted data.

[0158] Deny access requests to mental health data without the visitor's authorization.

[0159] Access requests to mental health data are permitted with the visitor's authorization.

[0160] In this invention, by building a blockchain-based smart contract, the privacy and security of mental health data can be effectively protected. Each visitor's encrypted mental health data is stored in a separate storage space, ensuring the isolation and protection of visitor data. Furthermore, by strictly binding visitor access rights to their data, the smart contract ensures that unauthorized access requests are denied and data can only be accessed with visitor authorization. This mechanism not only enhances data transparency and credibility, preventing data leakage or misuse, but also improves the efficiency and reliability of data management through automated storage and access control.

[0161] S8: According to the smart contract, the mental health encrypted data stored in the edge server is uploaded to the blockchain for storage.

[0162] In a possible implementation, S8 specifically includes sub-steps S801 and S802:

[0163] S801: Calculate the hash value of the mental health encrypted data through a hash function.

[0164] It's important to note that a hash function converts an input of any size into an output of a fixed size. It generates a unique value, typically a string of fixed length, by applying a specific algorithm to the input data. Hash functions have several important properties: First, the same input always produces the same output. Second, the hash value is highly sensitive to even small changes in the input; even a slight change in the input data can significantly alter the hash output. Finally, hash functions are one-way; the original input cannot be deduced from the hash value. Hash functions are widely used in data storage, encryption, security verification, and blockchain to ensure data integrity and enable fast query speeds.

[0165] Optionally, calculate the hash value of the mental health encrypted data according to the following formula:

[0166] H(D enc )=Hash(Denc )

[0167] Among them, H(D enc ) represents the hash value of mental health encrypted data, D enc represents mental health encrypted data, and Hash() represents a hash function.

[0168] S802: According to the smart contract, the hash value is uploaded to the blockchain for storage.

[0169] In this invention, by uploading the hash value of encrypted mental health data to the blockchain, data integrity and immutability are ensured. Storing hash values ​​on the blockchain, rather than raw data, improves data security and prevents the leakage of sensitive information. The decentralized nature of the blockchain also enhances data verification and auditing capabilities, ensuring transparency and trustworthiness in data management. Furthermore, the automated execution of smart contracts and the transparency of the data upload process not only reduce storage costs but also minimize human intervention and errors, ensuring the compliance and security of data storage. This approach makes data management more efficient and secure, effectively protecting visitor privacy.

[0170] S9: Get real-time access request.

[0171] S10: Decrypt the encrypted mental health data stored in the blockchain when a real-time access request complies with the smart contract to enable remote collaborative sharing of mental health target data.

[0172] In a possible implementation, S10 specifically includes sub-steps S1001 to S1004:

[0173] S1001: Determine whether the user attributes satisfy the access policy tree. If so, proceed to S1002. Otherwise, reject decryption.

[0174] S1002: Partially decrypt the final encrypted ciphertext and output the partially decrypted healthy ciphertext.

[0175] Optionally, partially decrypt the final encrypted ciphertext according to the following formula, and output the partially decrypted healthy 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 healthy 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] Here, HK represents a symmetric key.

[0182] S1004: Decrypt the initial encrypted ciphertext using a 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, ensuring that only authorized users can access the data, ensuring the privacy and security of the data, preventing unauthorized users from accessing the visitor's mental health information, and effectively protecting the visitor's privacy. Through a 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 at mental health management institutions can obtain the visitor's mental health information in real time and conduct 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] Reference Manual Figure 2 , which shows a structural diagram of a remote collaborative sharing system for mental health data provided by the present invention.

[0185] The present invention further 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 comprises:

[0186] Processor 201;

[0187] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the method for remote collaborative sharing of 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 elaborate on them.

[0189] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0190] 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.

[0191] It should be understood that the processor in the embodiments of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or 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 and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0193] The above embodiments can be implemented in whole or in part through 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 program are loaded or executed on a computer, the processes or functions described in accordance with 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 device. 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 via a wired method (such as infrared, wireless, microwave, etc.). 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 data center that contains a collection of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0194] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.

[0195] In this disclosure, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of a, b, or c" can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0196] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0197] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0198] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0199] In the 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 merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0201] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into 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] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

[0208] There are a few points to note:

[0209] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0210] (2) For the sake of clarity, the thickness of layers or regions in the drawings used to describe the embodiments of the present invention are exaggerated or reduced, that is, these drawings are not drawn to scale. It is 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 may be "directly" "on" or "under" the other element or intervening elements may be present.

[0211] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to form new embodiments.

[0212] 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 based on the protection scope of the claims.

Claims

1. A remote collaborative sharing method for mental health data, characterized in that: include: S1: Obtain the client's mental health data; S2: performing data preprocessing on the mental health data to obtain mental health target data; S3: performing data encryption processing on the mental health target data to obtain mental health encrypted data; S4: Calculating the comprehensive storage cost of storing the mental health encrypted data in the edge server; S5: Constructing constraints for storing the mental health encrypted data in the edge server; S6: Under the constraints of the constraints, 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; S7: Building smart contracts on the blockchain; S8: uploading the encrypted mental health data stored in the edge server to the blockchain for storage according to the smart contract; S9: Get real-time access request; S10: When the real-time access request complies with the smart contract, decrypt the mental health encrypted data stored in the blockchain to remotely and collaboratively share the mental health target data; The data encryption processing of the mental health target data in S3 specifically includes: S301: Randomly select a symmetric key; S302: Preliminarily encrypting the mental health target data using a symmetric encryption algorithm according to the symmetric key, and outputting a preliminary encrypted ciphertext; S303: Construct an access policy tree, wherein the access policy tree includes a root node and leaf nodes; S304: Selecting a polynomial for the root node and the leaf node in sequence in a bottom-up manner; S305: Select a first random number, and set the polynomial equal to the first random number; S306: Perform outsource encryption on the access policy tree according to the set polynomial, and output the outsource encrypted ciphertext; S307: Select a second random number; S308: performing final encryption on the initially encrypted mental health target data according to the initially encrypted ciphertext, the outsourced encrypted ciphertext, and the second random number, and outputting a final encrypted ciphertext; The content of the smart contract specifically includes: Each visitor's mental health encrypted data has independent storage space; When the blockchain contains the storage space of the current visitor, the encrypted mental health data of the current visitor is stored in the corresponding storage space; When the blockchain does not contain the storage space of the current visitor, a new storage space is created, and the mental health encrypted data of the current visitor is stored in the new storage space; Bind the access rights of visitors to their corresponding mental health encrypted data and deny visitors access to other visitors' mental health encrypted data; Deny access requests to mental health data without the visitor’s authorization; Access requests to mental health data are permitted with the visitor's authorization.

2. The remote collaborative sharing method for mental health data according to claim 1, characterized in that: 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, characterized in that: The S2 specifically includes: S201: Correcting abnormal data in the mental health data; S202: unifying the data format of the mental health data after the abnormal data is corrected; S203: Fill in the missing data in the mental health data in the 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 S4 specifically includes: S401: Calculating the storage time cost of storing the mental health encrypted data in the edge server; S402: Calculating the storage energy consumption cost of storing the mental health encrypted data on the edge server; S403: Calculating 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 based on the storage time cost, the storage energy consumption cost, and the storage memory cost.

5. The remote collaborative sharing method for mental health data according to claim 1, characterized in that: The constraints include: a first constraint, a second constraint, and a third constraint; 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.

6. The remote collaborative sharing method for mental health data according to claim 1, characterized in that: The S8 specifically includes: S801: Calculating a hash value of the mental health encrypted data through a hash function; S802: According to the smart contract, the hash value is uploaded to the blockchain for storage.

7. The remote collaborative sharing method for mental health data according to claim 1, characterized in that: The S10 specifically includes: S1001: Determine whether the user attributes meet the access policy tree; if so, proceed to S1002; otherwise, refuse decryption; S1002: Partially decrypt the final encrypted ciphertext and output the partially decrypted healthy ciphertext; S1003: Calculating the symmetric key according to the partially decrypted health ciphertext; S1004: Decrypt the preliminary encrypted ciphertext using the symmetric key to obtain the mental health target data.

8. A remote collaborative sharing system for mental health data, characterized by: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for remote collaborative sharing of mental health data as described in any one of claims 1 to 7 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