A smart elderly care method and system based on blockchain
Through blockchain technology and smart contracts, real-time monitoring and supervision of elderly people in nursing homes is achieved, and the problems of information asymmetry and inadequate supervision in the traditional elderly care model are solved, the quality and transparency of elderly care services are improved, and the safety of elderly care lives is ensured. and a sense of happiness.
Patent Information
- Application Number
- CN202410337755.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-24
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-03-24
AI Technical Summary
The traditional elderly care model has problems such as information asymmetry, inadequate supervision and inability to guarantee service quality, which has affected the quality of life and happiness of the elderly. The existing supervision methods are inefficient, high cost and inability to achieve real-time monitoring.
Adopt smart elderly care methods and systems based on blockchain, and through the interaction between smart contracts and nodes, real-time collection, supervision and verification of elderly people in nursing homes is achieved, and the transparency of elderly care services is improved by using multi-party supervision and reward and punishment mechanisms. and quality.
Real-time supervision and effective management of the entire process of elderly care services has been achieved, the safety and reliability of the elderly's lives have been improved, the transparency and fairness of elderly care services have been enhanced, and the data is not tampered with and credibility.
Smart Images

Figure CN118229295B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based smart elderly care method and system. [Background technology]
[0002] In today's society, with the increasingly prominent trend of population aging, elderly care services are facing many challenges and problems. The traditional elderly care model has many shortcomings, mainly including information asymmetry, inadequate supervision, and inability to guarantee service quality. First, due to information asymmetry, the elderly and their families often cannot fully understand the actual situation of the nursing home, including service quality, management level, employee quality, etc., which leads to the lack of effective reference for the elderly and their families when choosing a nursing home, and they are easily misled or defrauded. Secondly, the supervision mechanism is not perfect enough, the existing supervision system has loopholes and blind spots, the government's supervision is not strong enough, and the supervision means are insufficient, which allows some illegal elderly care institutions to evade supervision, thus bringing safety hazards and health risks to the elderly. Furthermore, the inability to guarantee service quality is a common problem in the current elderly care service field; some nursing homes have poor service attitudes, outdated facilities, and substandard food hygiene, which seriously affects the quality of life and happiness of the elderly. In addition, the existing supervision methods and technical means are relatively backward, mainly relying on manual sampling and regular inspections, and there are problems such as low efficiency, high cost, and easy manipulation, which cannot achieve real-time monitoring and effective management of the entire process of elderly care services.
[0003] Based on the above status quo and problems, people urgently need a new solution that can improve the quality and transparency of elderly care services. [Summary of the invention]
[0004] In view of this, an embodiment of the present invention provides a blockchain-based smart elderly care method and system.
[0005] In a first aspect, an embodiment of the present invention provides a blockchain-based smart elderly care method, which is used in a shared chain, wherein the shared chain includes a nursing home node, a relative node, a public welfare node, a public node, a government supervision node, and a media node. Each node of the shared chain interacts with a first smart contract and / or a second smart contract deployed on the chain, and the method includes:
[0006] S1. The relative node requests the monitoring video and health data of a specific elderly person through the first smart contract and pays a reward;
[0007] S2. The public welfare node broadcasts the donation request according to the second smart contract and broadcasts the random elderly supervision task;
[0008] S3. The nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and uploads them to the blockchain;
[0009] S4. The public welfare node supervises the surveillance video and health data according to the second smart contract, and uploads the disputed supervision results to the blockchain;
[0010] S5. Public nodes and relative nodes conduct secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, initiate objection voting on the secondary supervision results, and upload the objectionable secondary supervision results to the blockchain;
[0011] S6. The government supervision node and / or media node obtains the nursing home on-site verification video based on the disputed first and / or second supervision results. The government supervision node ranks and rewards or punishes the nursing home nodes based on the on-site verification results, and uploads the on-site verification video, nursing home node ranking list and reward or punishment results to the blockchain.
[0012] According to the above aspects and any possible implementation, an implementation is further provided, wherein the content of the first smart contract is:
[0013] A1. Initialize the first smart contract:
[0014] Set the government supervision node address as the contract deployer and set the initial parameters;
[0015] Define the remuneration balance mapping table;
[0016] A2. Participant Identity Verification:
[0017] Each node provides identity verification information and registers it in the contract;
[0018] A3. Permission granting process:
[0019] Granting the government supervisory node management authority, including adding or deleting nodes;
[0020] A4. Data request and transaction process:
[0021] The verified relative node initiates a request to the contract, requesting the surveillance video and health data of a specific elderly person, and pays a reward;
[0022] The nursing home node collects surveillance videos and health data of specific elderly people and uploads them to the blockchain within a preset time. If the data is not uploaded within the specified time, the early warning function is triggered to send an alarm to the relative node, public welfare node, government supervision node and media node.
[0023] After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain;
[0024] Obtain on-site verification results of disputed primary and / or secondary surveillance results;
[0025] If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be paid to the public welfare node, and the second proportion of remuneration will be paid to the public node.
[0026] A5. Transaction confirmation and data upload:
[0027] After the transaction is completed, the contract is responsible for uploading the transaction data to the chain;
[0028] A6. Contract Execution:
[0029] The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
[0030] According to the above aspects and any possible implementation, an implementation is further provided, wherein the content of the second smart contract is:
[0031] B1. Contract initialization:
[0032] Set the government supervision node address as the contract deployer and set the initial parameters;
[0033] Define task counters and task structures;
[0034] B2. Publish public welfare donations:
[0035] The contract has a regular donation release function and allows each node to donate funds to a specific account, where the specific account is also used to receive rewards;
[0036] B3. Release supervision tasks:
[0037] According to the funds in a specific account, a random elderly supervision task is issued by calling the create task function, and a nursing home elderly person is randomly assigned to be supervised;
[0038] After the task is created, the task created event is triggered;
[0039] B4. Perform supervisory tasks:
[0040] The nursing home node collects surveillance videos and health data of random elderly people and uploads them to the blockchain; if the data is not uploaded within the specified time, the early warning function is triggered to send an alarm to the relative node, public welfare node, government supervision node and media node;
[0041] The public welfare node conducts a supervision of the surveillance video and health data, and uploads the disputed supervision results to the blockchain;
[0042] After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain;
[0043] B5. Execution Rewards:
[0044] Obtain on-site verification results of disputed primary and / or secondary surveillance results;
[0045] If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be retained and the second proportion of remuneration will be paid to the public node.
[0046] B6. Transaction confirmation and data upload:
[0047] Call the task completion function to mark the task as completed. After the transaction is completed, the contract is responsible for uploading the transaction data to the chain.
[0048] B7. Contract Execution:
[0049] The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
[0050] According to the above aspects and any possible implementation, an implementation is further provided, wherein the nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, specifically including:
[0051] The nursing home node collects video data of the target area of the nursing home and the individual rooms of the elderly through pre-set camera equipment, transmits the real-time video signal to the nursing home server for storage, and distinguishes between specific elderly people and / or random elderly people through face recognition;
[0052] The health data of specific and / or random elderly people are obtained through health monitoring devices and examination instruments worn by the elderly, and the data is transmitted to the nursing home server for storage, where the health data includes but is not limited to blood pressure, heart rate, body temperature, exercise steps and examination data.
[0053] According to the above aspects and any possible implementation, an implementation is further provided, wherein the public welfare node supervises the monitoring video and health data once, specifically including:
[0054] The surveillance video is obtained for tampering detection. If a tampering record is detected, the abnormal video data is marked as abnormal, and an abnormal video report is generated. The supervision is stopped and a disputed supervision result is directly generated. The abnormal video report includes a description and timestamp information of the abnormal video;
[0055] If no tampering record is detected, the health data of the specific elderly and / or random elderly are obtained and compared with the preset health range. If there is an abnormality, the abnormal data is marked as abnormal and an abnormal health report is generated, which includes a description of the abnormal health and timestamp information;
[0056] In addition, the surveillance video data is transmitted to the face recognition module to extract the facial feature information of the elderly, and the extracted facial features are matched with the pre-stored facial features of the elderly to confirm the identity of the specific elderly and / or random elderly;
[0057] Extract the video data related to specific elderly people and / or random elderly people from the surveillance video data, and transmit it to the action recognition module for action recognition and analysis to identify whether there is abnormal behavior;
[0058] If there is no abnormal behavior, the behavior is marked as abnormal and an abnormal behavior report is generated, wherein the abnormal behavior report includes a description of the abnormal behavior and timestamp information;
[0059] Generate controversial primary supervision results based on abnormal health reports and abnormal behavior reports;
[0060] If there is no abnormality, a supervision result without objection is generated.
[0061] According to the above aspects and any possible implementation, an implementation is further provided, wherein acquiring surveillance video for tampering detection specifically includes:
[0062] Preprocessing the acquired surveillance video, wherein the preprocessing includes removing noise, adjusting image contrast and brightness, histogram equalization and adaptive histogram equalization;
[0063] Extract visual features from video frames using a local feature descriptor algorithm;
[0064] Based on the extracted visual features, a tampering detection convolutional neural network model is constructed, and the model is trained using a dataset containing a large amount of real video data and different types of tampering data. The dataset is divided into training set, validation set, and test set with a ratio of 8:1:1;
[0065] The architecture of the tampering detection convolutional neural network model includes: using ResNet as the basic network, adopting the ResNet-50 structure, including 50 convolutional layers and fully connected layers, using pre-trained ImageNet weights to initialize network parameters, applying the self-attention mechanism in the Transformer after each residual block output of ResNet, adding residual connections between the input and output of each residual block, and generating adversarial networks using the DCGAN structure, including generators and discriminators, applying attention weighted averaging after the features obtained from ResNet and DCGAN, connecting the fully connected layer for classification after the output of the fusion module, and the fully connected layer outputs the final classification result of the model; the training process adopts the cross entropy loss function and the Adam optimizer, the learning rate is 0.001, the training process adopts the random batch gradient descent method, each batch contains 32 samples, and a total of 100 cycles of training are performed;
[0066] Among them, the generator is responsible for generating adversarial samples. The structure of the generator is: Deconvolution layer 1: converts the input 100-dimensional noise vector into a feature map of size 512x4x4, Deconvolution layer 2: converts the feature map of 512 channels into a feature map of 256 channels, size 256x8x8, Deconvolution layer 3: converts the feature map of 256 channels into a feature map of 128 channels, size 128x16x16, Deconvolution layer 4: converts the feature map of 128 channels into a feature map of 64 channels, size 64x32x32, Deconvolution layer 5: converts the feature map of 64 channels into a feature map of 3 channels, size 3x64x64; batch normalization and ReLU activation function are used in each layer;
[0067] The discriminator is responsible for distinguishing between real samples and generated samples. The structure of the discriminator is as follows: Convolutional layer 1: converts the input 3-channel image into a 64-channel feature map of size 64x32x32, Convolutional layer 2: converts the 64-channel feature map into a 128-channel feature map of size 128x16x16, Convolutional layer 3: converts the 128-channel feature map into a 256-channel feature map of size 256x8x8, Convolutional layer 4: converts the 256-channel feature map into a 512-channel feature map of size 512x4x4, Convolutional layer 5: converts the 512-channel feature map into a 1-channel feature map of size 1x1x1; batch normalization and LeakyReLU activation function are used in each layer;
[0068] The surveillance video data is input into the trained tamper detection convolutional neural network model for analysis to identify whether there is any tampering behavior;
[0069] The detected tampering behavior is located, the time point and specific location of the tampering are determined, and a tampering record is generated.
[0070] According to the above aspects and any possible implementation, an implementation is further provided, wherein the video data related to a specific elderly person and / or a random elderly person in the monitoring video data is extracted and transmitted to the action recognition module to perform action recognition and analysis to identify whether there is abnormal behavior, specifically including:
[0071] Extracting video clips related to specific elderly people and / or random elderly people from surveillance video data, and performing inter-frame difference on the video to obtain a difference image;
[0072] Thresholding the difference image to obtain a binary image, in which the moving area is marked as foreground and the non-moving area is marked as background;
[0073] Use contour detection algorithm to confirm the contour of the moving area and calculate its shape characteristics;
[0074] The pixel displacement between adjacent frames is calculated through the optical flow estimation algorithm to obtain the motion trajectory and speed information of the moving person;
[0075] Using the background modeling method, the moving person is separated from the static background to obtain the motion information of the moving person;
[0076] Analyze the extracted motion information, and extract and analyze the temporal features of the action based on the characteristic patterns of the specific action;
[0077] Defining a set of abnormal actions, and setting an abnormal range for the abnormal actions in the set, wherein the abnormal range includes a preset range value of posture, action frequency, amplitude, and duration;
[0078] The action features extracted by the detection are matched with the preset abnormal action set. If the match is successful, it is determined to be abnormal behavior.
[0079] According to the above aspects and any possible implementation, an implementation is further provided, wherein the public node and the relative node perform secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, and initiate an objection vote on the secondary supervision result, and upload the objectionable secondary supervision result to the blockchain, specifically including:
[0080] The public node and the relative node perform secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, wherein the secondary supervision is manual supervision;
[0081] Initiate a dissenting vote on the secondary supervision result through a preset voting smart contract, which is used to record the time and voting information of the voting, and broadcast the voting request to the entire blockchain network;
[0082] After receiving the voting request, the public nodes and relative nodes will choose to vote with or without objection to the secondary supervision results, and sign the voting results with a timestamp and send them to the blockchain network before the voting deadline;
[0083] When the voting deadline arrives, the voting smart contract verifies the identity and voting qualifications of the public nodes and relative nodes participating in the voting, and counts the voting results. The voting weight of the relative nodes is set to twice that of the public nodes, that is, the voting weight ratio of relative nodes to public nodes is 10:1. When counting the voting results, for the relative nodes, the number of votes is multiplied by 10 times the voting weight;
[0084] If the voting results show that the majority of public nodes choose to vote with objections, the voting smart contract will generate a secondary supervision result with objections. If the voting results show that the majority of public nodes choose to vote without objections, the voting smart contract will generate a secondary supervision result without objections.
[0085] The voting smart contract updates the generated secondary supervision results to the blockchain and signs them.
[0086] According to the above aspects and any possible implementation, an implementation is further provided, wherein the ranking of the nursing home nodes is performed by ranking value F, wherein the calculation formula of the ranking value F is:
[0087]
[0088]
[0089]
[0090] Among them, F represents the ranking value, R represents the reward value obtained by the nursing home node, L represents the historical verification value, η represents the result of this on-site verification, and Q represents a constant. N represents the number of tampering records, α, β and γ represent adjustment coefficients, θ represents the preset value, M1 represents the normal number of historical verifications of the nursing home node, M2 represents the abnormal number of historical verifications of the nursing home node, T represents the duration of historical verification, and w1 and w2 represent weights.
[0091] In a second aspect, an embodiment of the present invention provides a blockchain-based smart elderly care system, which is used in a shared chain, wherein the shared chain includes a nursing home node, a relative node, a public welfare node, a public node, a government supervision node, and a media node. Each node of the shared chain interacts with a first smart contract and / or a second smart contract deployed on the chain.
[0092] Relatives node, used to request surveillance video and health data of a specific elderly person through the first smart contract and pay compensation;
[0093] Public welfare node, used to broadcast donation requests according to the second smart contract and broadcast random elderly supervision tasks;
[0094] The nursing home node is used to collect monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and upload them to the blockchain;
[0095] The public welfare node is used to conduct a supervision of the surveillance video and health data according to the second smart contract, and upload the disputed supervision results to the blockchain;
[0096] The public node is used to conduct secondary supervision of the monitoring video and health data according to the first smart contract and the second smart contract, initiate a dissenting vote on the secondary supervision results, and upload the dissenting secondary supervision results to the blockchain;
[0097] The government supervision nodes and / or media nodes are used to obtain on-site verification videos of nursing homes based on disputed primary and / or secondary supervision results. The government supervision nodes are also used to rank and reward or punish nursing home nodes based on the on-site verification results, and upload the on-site verification videos, nursing home node ranking lists, and reward or punishment results to the blockchain.
[0098] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the above method.
[0099] One of the above technical solutions has the following beneficial effects:
[0100] In the method of the embodiment of the present invention, a smart elderly care method and system based on blockchain are proposed. The smart elderly care method and system based on blockchain technology of the present invention realize real-time supervision and effective management of the entire elderly care service process through the decentralized, tamper-proof and transparent characteristics of blockchain, and provide the elderly with safer, more convenient and reliable elderly care services.
Brief Description of the Drawings
[0101] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. 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.
[0102] Figure 1 It is a flowchart of a blockchain-based smart elderly care method provided by an embodiment of the present invention;
[0103] Figure 2This is a structural diagram of the blockchain-based smart elderly care system provided in an embodiment of the present invention;
[0104] Figure 3 A hardware schematic diagram of a node device provided in an embodiment of the present invention. [Specific implementation method]
[0105] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0106] Please refer to Figure 1 , which is a blockchain-based smart elderly care method provided by an embodiment of the present invention, such as Figure 1 As shown, the method is used in a shared chain, wherein the shared chain includes a nursing home node, a relative node, a public welfare node, a public node, a government supervision node, and a media node. Each node of the shared chain interacts with a first smart contract and / or a second smart contract deployed on the chain, and is characterized in that the method includes:
[0107] S1. The relative node requests the monitoring video and health data of a specific elderly person through the first smart contract and pays a reward;
[0108] S2. The public welfare node broadcasts the donation request according to the second smart contract and broadcasts the random elderly supervision task;
[0109] S3. The nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and uploads them to the blockchain;
[0110] S4. The public welfare node supervises the surveillance video and health data according to the second smart contract, and uploads the disputed supervision results to the blockchain;
[0111] S5. Public nodes and relative nodes conduct secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, initiate objection voting on the secondary supervision results, and upload the objectionable secondary supervision results to the blockchain;
[0112] S6. The government supervision node and / or media node obtains the nursing home on-site verification video based on the disputed first and / or second supervision results. The government supervision node ranks and rewards or punishes the nursing home nodes based on the on-site verification results, and uploads the on-site verification video, nursing home node ranking list and reward or punishment results to the blockchain.
[0113] The relative node of the embodiment of the present invention requests the monitoring video and health data of a specific elderly person in real time through a smart contract, so as to understand the living conditions of the elderly person in a timely manner; this real-time design can help relatives to find abnormal conditions of the elderly in a timely manner and take measures in a timely manner. The public welfare node broadcasts donation requests and random elderly supervision tasks through smart contracts to encourage the public to participate in elderly care services; this public welfare supervision and social participation can increase the transparency and fairness of elderly care services and promote the joint participation of all parties in society. The nursing home node collects monitoring videos and health data according to the smart contract and uploads them to the blockchain to ensure the credibility and integrity of the data; the immutability and distributed storage characteristics of blockchain technology can effectively prevent data tampering and loss, and improve the credibility of the data. The public node and relative node conduct secondary supervision of the monitoring video and health data through smart contracts, initiate objection voting, and upload the objectionable supervision results to the blockchain; this multi-party supervision and feedback mechanism can effectively reduce subjective bias in supervision and improve the fairness and accuracy of supervision. The government supervision node and the media node obtain the nursing home on-site verification video according to the controversial supervision results, and rank and reward and punish the nursing home nodes, and upload the on-site verification video, the nursing home node ranking list and the reward and punishment results to the blockchain; this government supervision and reward and punishment mechanism can effectively improve the service quality and management level of the nursing home, and protect the rights and safety of the elderly. Therefore, the blockchain-based smart elderly care method and system of the present invention can effectively improve the quality and transparency of elderly care services, promote the participation and supervision of all parties in society, and provide safer and more reliable smart elderly care services for the elderly.
[0114] In a preferred embodiment of the present invention, the content of the first smart contract is:
[0115] A1. Initialize the first smart contract:
[0116] Set the government supervision node address as the contract deployer and set the initial parameters;
[0117] Define the remuneration balance mapping table;
[0118] A2. Participant Identity Verification:
[0119] Each node provides identity verification information and registers it in the contract;
[0120] A3. Permission granting process:
[0121] Granting the government supervisory node management authority, including adding or deleting nodes;
[0122] A4. Data request and transaction process:
[0123] The verified relative node initiates a request to the contract, requesting the surveillance video and health data of a specific elderly person, and pays a reward;
[0124] The nursing home node collects surveillance videos and health data of specific elderly people and uploads them to the blockchain within a preset time. If the data is not uploaded within the specified time, the early warning function is triggered to send an alarm to the relative node, public welfare node, government supervision node and media node.
[0125] After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain;
[0126] Obtain on-site verification results of disputed primary and / or secondary surveillance results;
[0127] If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be paid to the public welfare node, and the second proportion of remuneration will be paid to the public node.
[0128] A5. Transaction confirmation and data upload:
[0129] After the transaction is completed, the contract is responsible for uploading the transaction data to the chain;
[0130] A6. Contract Execution:
[0131] The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
[0132] By initializing the first smart contract, the embodiment of the present invention can set the government supervision node address as the contract deployer, set the initial parameters, and grant the government supervision node management authority, including adding or deleting nodes; such initial parameter setting and management authority control can ensure the security and controllability of the contract and prevent interference and attacks from malicious nodes. Each node provides identity authentication information and registers in the contract to ensure that the identity of each node in the contract is legal and credible; identity authentication and contract registration can effectively prevent the entry and operation of malicious nodes and ensure the safe and reliable operation of the contract. Through the smart contract, the verified relative node can initiate a request to the contract to request the monitoring video and health data of a specific elderly person and pay a reward; the nursing home node collects the monitoring video and health data of a specific elderly person and uploads it to the blockchain within a preset time; during the data request and transaction process, if the data is not uploaded within the specified time, the early warning function will be triggered to send an alarm to the relevant nodes; this automated execution can ensure the timeliness and integrity of the data and avoid human delays and tampering. After the public welfare node supervises once, the public node and the relative node conduct a second supervision on the supervision results, initiate a dissenting vote, and upload the dissenting supervision results to the blockchain; this multi-party supervision and feedback mechanism can ensure the fairness and accuracy of supervision and prevent unilateral misjudgment and abuse of power. After all transactions are completed, the contract is responsible for uploading the transaction data to the chain to ensure the security and credibility of the data; the immutability and distributed storage characteristics of the blockchain can effectively prevent data tampering and loss, and improve the credibility of the data.
[0133] In a preferred embodiment of the present invention, the content of the second smart contract is:
[0134] B1. Contract initialization:
[0135] Set the government supervision node address as the contract deployer and set the initial parameters;
[0136] Define task counters and task structures;
[0137] B2. Publish public welfare donations:
[0138] The contract has a regular donation release function and allows each node to donate funds to a specific account, where the specific account is also used to receive rewards;
[0139] B3. Release supervision tasks:
[0140] According to the funds in a specific account, a random elderly supervision task is issued by calling the create task function, and a nursing home elderly person is randomly assigned to be supervised;
[0141] After the task is created, the task created event is triggered;
[0142] B4. Perform supervisory tasks:
[0143] The nursing home node collects surveillance videos and health data of random elderly people and uploads them to the blockchain; if the data is not uploaded within the specified time, the early warning function is triggered to send an alarm to the relative node, public welfare node, government supervision node and media node;
[0144] The public welfare node conducts a supervision of the surveillance video and health data, and uploads the disputed supervision results to the blockchain;
[0145] After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain;
[0146] B5. Execution Rewards:
[0147] Obtain on-site verification results of disputed primary and / or secondary surveillance results;
[0148] If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be retained and the second proportion of remuneration will be paid to the public node.
[0149] B6. Transaction confirmation and data upload:
[0150] Call the task completion function to mark the task as completed. After the transaction is completed, the contract is responsible for uploading the transaction data to the chain.
[0151] B7. Contract Execution:
[0152] The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
[0153] The embodiment of the present invention establishes a regular public welfare donation release function and task release mechanism through the second smart contract; each node can donate the donation funds to a specific account by calling the corresponding function, and trigger the function of creating a supervision task, thereby realizing the effective use of public welfare funds and the regular release of supervision tasks. The contract sets a function for creating a supervision task, and releases random elderly supervision tasks according to the funds in a specific account, thereby realizing random supervision of the elderly in the nursing home; the randomness of the supervision task can ensure the fairness and objectivity of the supervision, and avoid favoritism or discrimination against specific elderly people. The nursing home node collects the monitoring video and health data of random elderly people, and uploads them to the blockchain; the public welfare node conducts a primary supervision of the monitoring video and health data, and uploads the disputed supervision results to the blockchain; after the primary supervision, the public node and the relative node conduct a secondary supervision of the supervision results, and initiate a vote on the disputed results, and upload the disputed secondary supervision results to the blockchain; this supervision and voting mechanism ensures the objectivity and fairness of the supervision results, and effectively prevents misjudgment and abuse of power. According to the authenticity of the supervision results and the normal situation of the elderly care services, the contract executes the reward mechanism and pays the corresponding proportion of remuneration to the nursing home nodes and public nodes; this reward mechanism encourages the nursing home nodes and public nodes to actively participate in the supervision activities and promotes the improvement of elderly care services. The contract is responsible for uploading the transaction data to the chain, ensuring the security and credibility of the transaction. The process of transaction confirmation and data uploading to the chain is coded to ensure the automatic execution of the contract and prevent human errors and malicious tampering.
[0154] In a preferred embodiment of the present invention, the nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, specifically including:
[0155] The nursing home node collects video data of the target area of the nursing home and the individual rooms of the elderly through pre-set camera equipment, transmits the real-time video signal to the nursing home server for storage, and distinguishes between specific elderly people and / or random elderly people through face recognition;
[0156] The health data of specific and / or random elderly people are obtained through health monitoring devices and examination instruments worn by the elderly, and the data is transmitted to the nursing home server for storage, where the health data includes but is not limited to blood pressure, heart rate, body temperature, exercise steps and examination data.
[0157] In the embodiment of the present invention, the nursing home node collects video data of the target area of the nursing home and the elderly's personal room in real time through a pre-set camera device, and transmits it to the nursing home server for storage, ensuring real-time monitoring and recording of the elderly's activities, which helps to timely discover abnormal situations or emergencies and take corresponding countermeasures; the nursing home node analyzes and processes the collected monitoring video through face recognition technology, distinguishes specific elderly people and / or random elderly people, realizes accurate identification and positioning of individual elderly people, and provides technical support for personalized elderly care services; the nursing home node obtains health data of specific elderly people and / or random elderly people through health monitoring equipment and inspection instruments worn by the elderly, such as blood pressure, heart rate, body temperature, exercise steps, etc., and transmits these data to the nursing home server for storage, realizing real-time monitoring and recording of the elderly's health status, and providing data support for timely intervention and medical care; the nursing home node stores the collected monitoring video and health data on the nursing home server, and uploads them to the blockchain for evidence storage in the manner specified by the first smart contract and the second smart contract; ensuring the safe and reliable storage of data, and realizing the traceability and non-tamperability of data, providing basic support for subsequent data analysis and supervision.
[0158] In a preferred embodiment of the present invention, the public welfare node supervises the monitoring video and health data once, specifically including:
[0159] The surveillance video is obtained for tampering detection. If a tampering record is detected, the abnormal video data is marked as abnormal, and an abnormal video report is generated. The supervision is stopped and a disputed supervision result is directly generated. The abnormal video report includes a description and timestamp information of the abnormal video;
[0160] If no tampering record is detected, the health data of the specific elderly and / or random elderly are obtained and compared with the preset health range. If there is an abnormality, the abnormal data is marked as abnormal and an abnormal health report is generated, which includes a description of the abnormal health and timestamp information;
[0161] In addition, the surveillance video data is transmitted to the face recognition module to extract the facial feature information of the elderly, and the extracted facial features are matched with the pre-stored facial features of the elderly to confirm the identity of the specific elderly and / or random elderly;
[0162] Extract the video data related to specific elderly people and / or random elderly people from the surveillance video data, and transmit it to the action recognition module for action recognition and analysis to identify whether there is abnormal behavior;
[0163] If there is no abnormal behavior, the behavior is marked as abnormal and an abnormal behavior report is generated, wherein the abnormal behavior report includes a description of the abnormal behavior and timestamp information;
[0164] Generate controversial primary supervision results based on abnormal health reports and abnormal behavior reports;
[0165] If there is no abnormality, a supervision result without objection is generated.
[0166] The public welfare node of the embodiment of the present invention performs tampering detection on the acquired surveillance video. If there is a tampering record, the abnormal video data is marked as abnormal, and an abnormal video report is generated, including the description and timestamp information of the abnormal video, thereby realizing integrity verification and abnormality detection of the surveillance data, and ensuring the reliability and authenticity of the data; the public welfare node obtains the health data of a specific elderly person and / or a random elderly person, and compares it with a preset health range. If there is an abnormality, the abnormal data is marked as abnormal, and an abnormal health report is generated, including the description and timestamp information of the abnormal health, thereby realizing monitoring and abnormality detection of the health status of the elderly, and facilitating timely discovery and treatment of health problems; the public welfare node transmits the surveillance video data to a face recognition module, extracts the facial feature information of the elderly, and matches it with the pre-stored facial features of the elderly, confirms the identity of the specific elderly person and / or the random elderly person, and at the same time, transmits the video data to a motion recognition module, performs motion recognition and analysis, and identifies whether there is abnormal behavior, thereby realizing confirmation of the identity of the elderly person and monitoring of abnormal behavior, and improving the ability to protect the safety and health of the elderly; a controversial primary supervision result is generated based on the abnormal health report and the abnormal behavior report. If there are no abnormalities, a supervision result without objection will be generated, realizing a comprehensive analysis and evaluation of the monitoring data, providing a basis and reference for subsequent supervision and processing.
[0167] In addition, it should be noted that when uploading and sharing surveillance videos and health data of the elderly, it is necessary to strictly abide by privacy protection laws to ensure the security of the elderly's personal information. For example, nursing homes need to cooperate with the elderly to sign a notice of informed consent and make it public. For the elderly who have not signed the notice of informed consent, the data will not be made public after face recognition, or the face will be blocked before sharing.
[0168] In a preferred embodiment of the present invention, the acquisition of surveillance video for tampering detection specifically includes:
[0169] Preprocessing the acquired surveillance video, wherein the preprocessing includes removing noise, adjusting image contrast and brightness, histogram equalization and adaptive histogram equalization;
[0170] Extract visual features from video frames using a local feature descriptor algorithm;
[0171] Based on the extracted visual features, a tampering detection convolutional neural network model is constructed, and the model is trained using a dataset containing a large amount of real video data and different types of tampering data. The dataset is divided into training set, validation set, and test set with a ratio of 8:1:1;
[0172] The architecture of the tampering detection convolutional neural network model includes: using ResNet as the basic network, adopting the ResNet-50 structure, including 50 convolutional layers and fully connected layers, using pre-trained ImageNet weights to initialize network parameters, applying the self-attention mechanism in the Transformer after each residual block output of ResNet, adding residual connections between the input and output of each residual block, and generating adversarial networks using the DCGAN structure, including generators and discriminators, applying attention weighted averaging after the features obtained from ResNet and DCGAN, connecting the fully connected layer for classification after the output of the fusion module, and the fully connected layer outputs the final classification result of the model; the training process adopts the cross entropy loss function and the Adam optimizer, the learning rate is 0.001, the training process adopts the random batch gradient descent method, each batch contains 32 samples, and a total of 100 cycles of training are performed;
[0173] Among them, the generator is responsible for generating adversarial samples. The structure of the generator is: Deconvolution layer 1: converts the input 100-dimensional noise vector into a feature map of size 512x4x4, Deconvolution layer 2: converts the feature map of 512 channels into a feature map of 256 channels, size 256x8x8, Deconvolution layer 3: converts the feature map of 256 channels into a feature map of 128 channels, size 128x16x16, Deconvolution layer 4: converts the feature map of 128 channels into a feature map of 64 channels, size 64x32x32, Deconvolution layer 5: converts the feature map of 64 channels into a feature map of 3 channels, size 3x64x64; batch normalization and ReLU activation function are used in each layer;
[0174] The discriminator is responsible for distinguishing between real samples and generated samples. The structure of the discriminator is as follows: Convolutional layer 1: converts the input 3-channel image into a 64-channel feature map of size 64x32x32, Convolutional layer 2: converts the 64-channel feature map into a 128-channel feature map of size 128x16x16, Convolutional layer 3: converts the 128-channel feature map into a 256-channel feature map of size 256x8x8, Convolutional layer 4: converts the 256-channel feature map into a 512-channel feature map of size 512x4x4, Convolutional layer 5: converts the 512-channel feature map into a 1-channel feature map of size 1x1x1; batch normalization and LeakyReLU activation function are used in each layer;
[0175] The surveillance video data is input into the trained tamper detection convolutional neural network model for analysis to identify whether there is any tampering behavior;
[0176] The detected tampering behavior is located, the time point and specific location of the tampering are determined, and a tampering record is generated.
[0177] The embodiment of the present invention preprocesses the acquired surveillance video, including removing noise, adjusting image contrast and brightness, histogram equalization and adaptive histogram equalization, and extracting visual features in the video frame using a local feature descriptor algorithm, which helps to improve the accuracy and robustness of the subsequent tampering detection model. A tampering detection convolutional neural network model is constructed based on the extracted visual features. The model uses ResNet-50 as the basic network structure, contains residual connections and self-attention mechanisms to better capture key information in the video, and improves the generalization ability and detection accuracy of the model by training with real video data and tampered data. The model is trained and optimized using the cross entropy loss function and the Adam optimizer, and the random batch gradient descent method is used to ensure the stability and convergence of the model during the training process. The performance and robustness of the model are improved through 100 cycles of training. The generator is responsible for generating adversarial samples, and the discriminator is responsible for distinguishing between real samples and generated samples. The generator and discriminator structures use deconvolution layers and convolution layers, combined with batch normalization and activation functions, to achieve effective generation and distinction of tampered data. The surveillance video data is input into the trained tampering detection convolutional neural network model for analysis to identify whether there is tampering, locate the detected tampering, determine the time and specific location of the tampering, and generate a tampering record, thus realizing tampering detection and location of surveillance video data and ensuring the integrity and authenticity of the data.
[0178] The method of acquiring surveillance video for tampering detection provides effective tampering detection and protection for the implementation of smart elderly care methods through technical effects in preprocessing, feature extraction, model construction, training optimization, generator and discriminator structure, tampering detection and record generation, and improves the credibility and security of the monitoring system.
[0179] The inventors also evaluated the performance of the tampering detection convolutional neural network model on the test set, including accuracy, recall, precision and F1 score. The tampering detection convolutional neural network model had an accuracy of 95%, a recall of 94%, a precision of 96% and an F1 score of 95% on the test set, and the model effect was good.
[0180] In a preferred embodiment of the present invention, the specific elderly and / or random elderly-related video data in the monitoring video data are extracted and transmitted to the action recognition module to perform action recognition and analysis to identify whether there is abnormal behavior, specifically including:
[0181] Extracting video clips related to specific elderly people and / or random elderly people from surveillance video data, and performing inter-frame difference on the video to obtain a difference image;
[0182] Thresholding the difference image to obtain a binary image, in which the moving area is marked as foreground and the non-moving area is marked as background;
[0183] Use contour detection algorithm to confirm the contour of the moving area and calculate its shape characteristics;
[0184] The pixel displacement between adjacent frames is calculated through the optical flow estimation algorithm to obtain the motion trajectory and speed information of the moving person;
[0185] Using the background modeling method, the moving person is separated from the static background to obtain the motion information of the moving person;
[0186] Analyze the extracted motion information, and extract and analyze the temporal features of the action based on the characteristic patterns of the specific action;
[0187] Defining a set of abnormal actions, and setting an abnormal range for the abnormal actions in the set, wherein the abnormal range includes a preset range value of posture, action frequency, amplitude, and duration;
[0188] The action features extracted by the detection are matched with the preset abnormal action set. If the match is successful, it is determined to be abnormal behavior.
[0189] The embodiments of the present invention extract video clips related to specific elderly people and / or random elderly people in the surveillance video, and perform frame difference on the video to obtain a difference image, which helps to highlight the motion area in the video and provides a basis for subsequent action recognition. The contour detection algorithm is used to confirm the contour of the moving area and calculate its shape characteristics. By analyzing the contour, the shape information of the moving area can be extracted, providing data support for subsequent action analysis; the optical flow estimation algorithm is used to calculate the pixel displacement between adjacent frames to obtain the motion trajectory and speed information of the moving person, which helps to capture the dynamic characteristics of the motion and provides a basis for the identification of abnormal behavior; the background modeling method is used to separate the moving person from the static background to obtain the motion information of the moving person, analyze the extracted motion information, and extract and analyze the timing characteristics of the action based on the characteristic pattern of the specific action, which helps to effectively distinguish the motion behavior from the background and conduct a detailed analysis of the action; define a set of abnormal actions, and set an abnormal range for the abnormal actions in the set, including the range values of preset posture, action frequency, amplitude and duration, match the extracted action features with the preset set of abnormal actions, and if the match is successful, it is determined to be abnormal behavior, which realizes the effective identification and positioning of abnormal behavior and provides reliability support for the security of the smart elderly care system.
[0190] The action recognition and analysis process of the present invention provides effective abnormal behavior monitoring and identification functions for the smart elderly care system through technical effects in video data extraction, feature calculation, motion information extraction, action analysis and abnormal action recognition, thereby improving the quality and safety of elderly care services.
[0191] In a preferred embodiment of the present invention, the public node and the relative node perform secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, and initiate an objection vote on the secondary supervision result, and upload the objectionable secondary supervision result to the blockchain, specifically including:
[0192] The public node and the relative node perform secondary supervision on the monitoring video and health data according to the first smart contract and the second smart contract, wherein the secondary supervision is manual supervision;
[0193] Initiate a dissenting vote on the secondary supervision result through a preset voting smart contract, which is used to record the time and voting information of the voting, and broadcast the voting request to the entire blockchain network;
[0194] After receiving the voting request, the public nodes and relative nodes will choose to vote with or without objection to the secondary supervision results, and sign the voting results with a timestamp and send them to the blockchain network before the voting deadline;
[0195] When the voting deadline arrives, the voting smart contract verifies the identity and voting qualifications of the public nodes and relative nodes participating in the voting, and counts the voting results. The voting weight of the relative nodes is set to twice that of the public nodes, that is, the voting weight ratio of relative nodes to public nodes is 10:1. When counting the voting results, for the relative nodes, the number of votes is multiplied by 10 times the voting weight;
[0196] If the voting results show that the majority of public nodes choose to vote with objections, the voting smart contract will generate a secondary supervision result with objections. If the voting results show that the majority of public nodes choose to vote without objections, the voting smart contract will generate a secondary supervision result without objections.
[0197] The voting smart contract updates the generated secondary supervision results to the blockchain and signs them.
[0198] The embodiment of the present invention uses public nodes and relative nodes to perform manual secondary supervision on monitoring videos and health data, which can effectively improve the accuracy and reliability of supervision; compared with a single supervision mechanism, the introduction of secondary supervision of public nodes and relative nodes can more comprehensively review the quality of elderly care services and the condition of the elderly, thereby improving the level of elderly care services. The preset voting smart contract is used to initiate an objection vote on the secondary supervision result, which realizes the automation and credibility of the voting process. The voting smart contract records voting information and initiates voting requests, ensuring the openness, transparency and data security of the voting process. The voting weight of the relative node is set to twice that of the public node, so that the relative node has a higher weight in the voting process. This design takes into account the concern and responsibility of the relative node for a specific elderly person, guarantees its voice in the voting, and balances the interests of all parties through reasonable weight setting. The voting smart contract makes a judgment based on the voting results. If the majority of public nodes choose to vote with objection, a secondary supervision result with objection is generated; if the majority of public nodes choose to vote without objection, a secondary supervision result without objection is generated. This mechanism ensures the rationality and fairness of the supervision result and provides a reference for subsequent decision-making. The voting smart contract will update the generated secondary supervision results to the blockchain and sign them, ensuring the immutability and traceability of the supervision results. The on-chain storage of the supervision results ensures the security and credibility of the data, providing an important basis for subsequent supervision and evaluation.
[0199] It should be noted that secondary supervision is manual supervision. Although manual supervision is relatively time-consuming and labor-intensive, it can provide higher accuracy and reliability. Human operators can conduct more detailed analysis and evaluation of data based on their own experience and judgment.
[0200] In addition, primary supervision and secondary supervision, combined with automation technology and manual supervision, may be a more reasonable approach; this can improve the accuracy and reliability of supervision results while ensuring efficiency.
[0201] In a preferred embodiment of the present invention, the ranking of the nursing home nodes is performed by ranking value F, wherein the calculation formula of the ranking value F is:
[0202]
[0203]
[0204]
[0205] Among them, F represents the ranking value, R represents the reward value obtained by the nursing home node, L represents the historical verification value, η represents the result of this on-site verification, and Q represents a constant. N represents the number of tampering records, α, β and γ represent adjustment coefficients, θ represents the preset value, M1 represents the normal number of historical verifications of the nursing home node, M2 represents the abnormal number of historical verifications of the nursing home node, T represents the duration of historical verification, and w1 and w2 represent weights.
[0206] The embodiment of the present invention ranks the nursing home nodes through the calculation formula of the above-mentioned ranking value F, thereby achieving a reasonable ranking of the nursing homes, which can ensure that the public understands the real service level of the nursing homes, effectively improve the service quality and management level of the nursing homes, and protect the rights and safety of the elderly.
[0207] Please refer to Figure 2 , which is a blockchain-based smart elderly care system provided by an embodiment of the present invention, such as Figure 2 As shown, the blockchain-based smart elderly care system is used in a shared chain, which includes nursing home nodes, relative nodes, public welfare nodes, public nodes, government supervision nodes and media nodes. Each node of the shared chain interacts with the first smart contract and / or the second smart contract deployed on the chain.
[0208] Relatives node, used to request surveillance video and health data of a specific elderly person through the first smart contract and pay compensation;
[0209] Public welfare node, used to broadcast donation requests according to the second smart contract and broadcast random elderly supervision tasks;
[0210] The nursing home node is used to collect monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and upload them to the blockchain;
[0211] The public welfare node is used to conduct a supervision of the surveillance video and health data according to the second smart contract, and upload the disputed supervision results to the blockchain;
[0212] The public node is used to conduct secondary supervision of the monitoring video and health data according to the first smart contract and the second smart contract, initiate a dissenting vote on the secondary supervision results, and upload the dissenting secondary supervision results to the blockchain;
[0213] The government supervision nodes and / or media nodes are used to obtain on-site verification videos of nursing homes based on disputed primary and / or secondary supervision results. The government supervision nodes are also used to rank and reward or punish nursing home nodes based on the on-site verification results, and upload the on-site verification videos, nursing home node ranking lists, and reward or punishment results to the blockchain.
[0214] The blockchain-based smart elderly care system in the embodiment of the present invention establishes a comprehensive regulatory mechanism, implements an effective supervision and evaluation system, ensures data security and traceability, and improves the transparency and trust of elderly care services.
[0215] Since each unit module in this embodiment can execute Figure 1 For the method shown in the embodiment, the part not described in detail in this embodiment can be referred to Figure 1 Related instructions.
[0216] definition:
[0217] A public blockchain is a distributed ledger technology, also known as a public chain or public blockchain, which is an open blockchain network in which participants can be anonymous or have known identities.
[0218] A smart contract program is a computer program that can be executed automatically. It is itself a system participant. It responds to the information it receives, can receive and store value, and can also send information and value to the outside.
[0219] Blockchain nodes are used to store block information, contracts, consensus confirmation, and execute contract content. Contract devices can be used as one of the blockchain nodes.
[0220] Figure 3 This is a hardware diagram of a node device according to an embodiment of the present invention. Figure 3 At the hardware level, the node device includes a processor, and optionally an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the node device may also include hardware required for other services.
[0221] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0222] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0223] In one possible implementation, the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, and can also obtain the corresponding computer program from other devices to form a pricing device for electricity prices at the logical level. The processor executes the program stored in the memory to implement the node working method provided in any embodiment of the present invention through the executed program.
[0224] An embodiment of the present invention also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a node device including multiple application programs, the node device can execute the node working method provided in any embodiment of the present invention.
[0225] The method performed by the node device provided in the embodiment of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0226] The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0227] An embodiment of the present invention also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a node device including multiple application programs, the node device can execute the node working method provided in any embodiment of the present invention.
[0228] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0229] For the convenience of description, the above device is described as various units or modules according to their functions. Of course, when implementing the present invention, the functions of each unit or module can be implemented in the same or multiple software and / or hardware.
[0230] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0231] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0232] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0233] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0234] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0235] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0236] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0237] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0238] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0239] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0240] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0241] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A blockchain-based smart elderly care method, used in a shared chain, wherein the shared chain includes a nursing home node, a relative node, a public welfare node, a public node, a government supervision node, and a media node. Each node of the shared chain interacts with a first smart contract and / or a second smart contract deployed on the chain, characterized in that: The method comprises: S1. The relative node requests the monitoring video and health data of a specific elderly person through the first smart contract and pays a reward; S2. The public welfare node broadcasts the donation request according to the second smart contract and broadcasts the random elderly supervision task; S3. The nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and uploads them to the blockchain; S4. The public welfare node supervises the surveillance video and health data according to the second smart contract, and uploads the disputed supervision results to the blockchain; S5. The public node and the relative node conduct a secondary supervision of the surveillance video and health data excluding the disputed supervision results after the public welfare node conducts the primary supervision according to the first smart contract and the second smart contract, and initiates a dissenting vote on the secondary supervision results, and uploads the disputed secondary supervision results to the blockchain; S6. The government supervision node and / or media node obtains the nursing home on-site verification video based on the disputed primary and / or secondary supervision results. The government supervision node ranks and rewards or punishes the nursing home nodes based on the on-site verification results, and uploads the on-site verification video, nursing home node ranking list and reward or punishment results to the blockchain; The public welfare node supervises the monitoring video and health data, specifically including: The surveillance video is obtained for tampering detection. If a tampering record is detected, the abnormal video data is marked as abnormal, and an abnormal video report is generated. The supervision is stopped and a disputed supervision result is directly generated. The abnormal video report includes a description and timestamp information of the abnormal video; If no tampering record is detected, the health data of the specific elderly and / or random elderly are obtained and compared with the preset health range. If there is an abnormality, the abnormal data is marked as abnormal and an abnormal health report is generated, which includes a description of the abnormal health and timestamp information; In addition, the surveillance video data is transmitted to the face recognition module to extract the facial feature information of the elderly, and the extracted facial features are matched with the pre-stored facial features of the elderly to confirm the identity of the specific elderly and / or random elderly; Extract the video data related to specific elderly people and / or random elderly people from the surveillance video data, and transmit it to the action recognition module for action recognition and analysis to identify whether there is abnormal behavior; If there is abnormal behavior, the abnormal video data is marked as abnormal, and an abnormal behavior report is generated, wherein the abnormal behavior report includes a description of the abnormal behavior and timestamp information; Generate controversial primary supervision results based on abnormal health reports and abnormal behavior reports; If there is no abnormality, a supervision result without objection is generated.
2. The method according to claim 1, characterized in that The content of the first smart contract is: A1. Initialize the first smart contract: Set the government supervision node address as the contract deployer and set the initial parameters; Define the remuneration balance mapping table; A2. Participant Identity Verification: Each node provides identity verification information and registers it in the contract; A3. Permission granting process: Granting the government supervisory node management authority, including adding or deleting nodes; A4. Data request and transaction process: The verified relative node initiates a request to the contract, requesting the surveillance video and health data of a specific elderly person, and pays a reward; The nursing home node collects surveillance videos and health data of specific elderly people and uploads them to the blockchain within a preset time; If the data is not uploaded within the specified time, the warning function will be triggered to send an alert to the relative node, public welfare node, government supervision node and media node; After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain; Obtain on-site verification results of disputed primary and / or secondary surveillance results; If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be paid to the public welfare node, and the second proportion of remuneration will be paid to the public node. A5. Transaction confirmation and data upload: After the transaction is completed, the contract is responsible for uploading the transaction data to the chain; A6. Contract Execution: The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
3. The method according to claim 2, characterized in that The content of the second smart contract is: B1. Contract initialization: Set the government supervision node address as the contract deployer and set the initial parameters; Define task counters and task structures; B2. Publish public welfare donations: The contract has a regular donation release function and allows each node to donate funds to a specific account, where the specific account is also used to receive rewards; B3. Release supervision tasks: According to the funds in a specific account, a random elderly supervision task is issued by calling the create task function, and a nursing home elderly person is randomly assigned to be supervised; After the task is created, the task created event is triggered; B4. Perform supervisory tasks: The nursing home node collects surveillance videos and health data of random elderly people and uploads them to the blockchain; if the data is not uploaded within the specified time, the warning function is triggered to send an alarm to the relative node, public welfare node, government supervision node and media node; The public welfare node conducts a supervision of the surveillance video and health data, and uploads the disputed supervision results to the blockchain; After the public welfare node conducts the first supervision, the public node and the relative node conduct a second supervision on the surveillance video and health data excluding the disputed supervision results, and initiate a dissenting vote on the second supervision results, and upload the disputed second supervision results to the blockchain; B5. Execution Rewards: Obtain on-site verification results of disputed primary and / or secondary surveillance results; If the data is true and the elderly care service is normal, the first proportion of remuneration will be paid to the nursing home node, and the second proportion of remuneration will be paid to the public node. If the data is false or the elderly care service is abnormal, the first proportion of remuneration will be retained and the second proportion of remuneration will be paid to the public node. B6. Transaction confirmation and data upload: Call the task completion function to mark the task as completed. After the transaction is completed, the contract is responsible for uploading the transaction data to the chain. B7. Contract Execution: The functions and conditions in the contract are coded to ensure the automatic execution of the contract.
4. The method according to claim 1, characterized in that: The nursing home node collects monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, specifically including: The nursing home node collects video data of the target area of the nursing home and the individual rooms of the elderly through pre-set camera equipment, transmits the real-time video signal to the nursing home server for storage, and distinguishes between specific elderly people and / or random elderly people through face recognition; The health data of specific and / or random elderly people are obtained through health monitoring devices and examination instruments worn by the elderly, and the data is transmitted to the nursing home server for storage, where the health data includes but is not limited to blood pressure, heart rate, body temperature, exercise steps and examination data.
5. The method according to claim 4, characterized in that The surveillance video will be obtained for tampering detection, specifically including: Preprocessing the acquired surveillance video, wherein the preprocessing includes removing noise, adjusting image contrast and brightness, histogram equalization and adaptive histogram equalization; Extract visual features from video frames using a local feature descriptor algorithm; Based on the extracted visual features, a tampering detection convolutional neural network model is constructed, and the model is trained using a dataset containing a large amount of real video data and different types of tampering data. The dataset is divided into training set, validation set, and test set with a ratio of 8:1:1; The architecture of the tampering detection convolutional neural network model includes: using ResNet as the basic network, adopting the ResNet-50 structure, including 50 convolutional layers and fully connected layers, using pre-trained ImageNet weights to initialize network parameters, applying the self-attention mechanism in the Transformer after each residual block output of ResNet, adding residual connections between the input and output of each residual block, and generating adversarial networks using the DCGAN structure, including generators and discriminators, applying attention weighted averaging after the features obtained from ResNet and DCGAN, connecting the fully connected layer for classification after the output of the fusion module, and the fully connected layer outputs the final classification result of the model; the training process adopts the cross entropy loss function and the Adam optimizer, the learning rate is 0.001, the training process adopts the random batch gradient descent method, each batch contains 32 samples, and a total of 100 cycles of training are performed; Among them, the generator is responsible for generating adversarial samples. The structure of the generator is: Deconvolution layer 1: converts the input 100-dimensional noise vector into a feature map of size 512x4x4, Deconvolution layer 2: converts the feature map of 512 channels into a feature map of 256 channels, size 256x8x8, Deconvolution layer 3: converts the feature map of 256 channels into a feature map of 128 channels, size 128x16x16, Deconvolution layer 4: converts the feature map of 128 channels into a feature map of 64 channels, size 64x32x32, Deconvolution layer 5: converts the feature map of 64 channels into a feature map of 3 channels, size 3x64x64; batch normalization and ReLU activation function are used in each layer; The discriminator is responsible for distinguishing between real samples and generated samples. The structure of the discriminator is as follows: Convolutional layer 1: converts the input 3-channel image into a 64-channel feature map of size 64x32x32, Convolutional layer 2: converts the 64-channel feature map into a 128-channel feature map of size 128x16x16, Convolutional layer 3: converts the 128-channel feature map into a 256-channel feature map of size 256x8x8, Convolutional layer 4: converts the 256-channel feature map into a 512-channel feature map of size 512x4x4, Convolutional layer 5: converts the 512-channel feature map into a 1-channel feature map of size 1x1x1; batch normalization and LeakyReLU activation function are used in each layer; The surveillance video data is input into the trained tamper detection convolutional neural network model for analysis to identify whether there is any tampering behavior; The detected tampering behavior is located, the time point and specific location of the tampering are determined, and a tampering record is generated.
6. The method according to claim 4, characterized in that The extracting of the video data related to the specific elderly and / or random elderly in the monitoring video data and transmitting it to the action recognition module for action recognition and analysis to identify whether there is abnormal behavior specifically includes: Extracting video clips related to specific elderly people and / or random elderly people from surveillance video data, and performing inter-frame difference on the video to obtain a difference image; Thresholding the difference image to obtain a binary image, in which the moving area is marked as foreground and the non-moving area is marked as background; Use contour detection algorithm to confirm the contour of the moving area and calculate its shape characteristics; The pixel displacement between adjacent frames is calculated through the optical flow estimation algorithm to obtain the motion trajectory and speed information of the moving person; Using the background modeling method, the moving person is separated from the static background to obtain the motion information of the moving person; Analyze the extracted motion information, and extract and analyze the temporal features of the action based on the characteristic patterns of the specific action; Defining a set of abnormal actions, and setting an abnormal range for the abnormal actions in the set, wherein the abnormal range includes a preset range value of posture, action frequency, amplitude, and duration; The action features extracted by the detection are matched with the preset abnormal action set. If the match is successful, it is determined to be abnormal behavior.
7. The method according to claim 1, characterized in that The public node and the relative node conduct secondary supervision on the surveillance video and health data excluding the disputed supervision results after the public welfare node conducts the primary supervision according to the first smart contract and the second smart contract, and initiates a dissenting vote on the secondary supervision results, and uploads the disputed secondary supervision results to the blockchain, specifically including: The public node and the relative node perform secondary supervision on the monitoring video and health data excluding the disputed supervision results after the public welfare node performs primary supervision according to the first smart contract and the second smart contract, and the secondary supervision is manual supervision; Initiate a dissenting vote on the secondary supervision result through a preset voting smart contract, which is used to record the time and voting information of the voting, and broadcast the voting request to the entire blockchain network; After receiving the voting request, the public nodes and relative nodes will choose to vote with or without objection to the secondary supervision results, and sign the voting results with a timestamp and send them to the blockchain network before the voting deadline; When the voting deadline arrives, the voting smart contract verifies the identity and voting qualifications of the public nodes and relative nodes participating in the voting, and counts the voting results. The voting weight ratio of relative nodes to public nodes is 10:
1. When counting the voting results, for relative nodes, the number of votes is multiplied by 10 times the voting weight; If the voting results show that the majority of public nodes choose to vote with objections, the voting smart contract will generate a secondary supervision result with objections. If the voting results show that the majority of public nodes choose to vote without objections, the voting smart contract will generate a secondary supervision result without objections. The voting smart contract updates the generated secondary supervision results to the blockchain and signs them.
8. The method according to claim 1, characterized in that: The ranking of the nursing home nodes is performed by ranking value F, wherein the calculation formula of ranking value F is: Among them, F represents the ranking value, R represents the reward value obtained by the nursing home node, L represents the historical verification value, η represents the result of this on-site verification, and Q represents a constant. N represents the number of tampering records, α, β and γ represent adjustment coefficients, θ represents the preset value, M1 represents the normal number of historical verifications of the nursing home node, M2 represents the abnormal number of historical verifications of the nursing home node, T represents the duration of historical verification, and w1 and w2 represent weights.
9. A blockchain-based smart elderly care system, used in a shared chain, characterized in that: The shared chain includes nursing home nodes, relatives nodes, public welfare nodes, public nodes, government supervision nodes and media nodes. Each node of the shared chain interacts with the first smart contract and / or the second smart contract deployed on the chain. The relative node is used to request the monitoring video and health data of a specific elderly person through the first smart contract and pay a reward. It is also used to conduct a secondary supervision of the monitoring video and health data excluding the disputed supervision results after the first supervision of the public welfare node according to the first smart contract and the second smart contract; Public welfare node, used to broadcast donation requests according to the second smart contract and broadcast random elderly supervision tasks; The nursing home node is used to collect monitoring videos and health data of specific elderly people and / or random elderly people according to the first smart contract and the second smart contract, and upload them to the blockchain; The public welfare node is also used to conduct a supervision of the surveillance video and health data according to the second smart contract, and upload the disputed supervision results to the blockchain; The public node is used to conduct a secondary supervision of the surveillance video and health data excluding the disputed supervision results after the first supervision of the public welfare node according to the first smart contract and the second smart contract, and initiate a dissenting vote on the secondary supervision results, and upload the disputed secondary supervision results to the blockchain; Government supervision nodes and / or media nodes are used to obtain nursing home on-site verification videos based on disputed primary and / or secondary supervision results. Government supervision nodes are also used to rank and reward or punish nursing home nodes based on on-site verification results, and upload on-site verification videos, nursing home node ranking lists, and reward or punishment results to the blockchain; The public welfare node supervises the monitoring video and health data according to the second smart contract, specifically including: The surveillance video is obtained for tampering detection. If a tampering record is detected, the abnormal video data is marked as abnormal, and an abnormal video report is generated. The supervision is stopped and a disputed supervision result is directly generated. The abnormal video report includes a description and timestamp information of the abnormal video; If no tampering record is detected, the health data of the specific elderly and / or random elderly are obtained and compared with the preset health range. If there is an abnormality, the abnormal data is marked as abnormal and an abnormal health report is generated, which includes a description of the abnormal health and timestamp information; In addition, the surveillance video data is transmitted to the face recognition module to extract the facial feature information of the elderly, and the extracted facial features are matched with the pre-stored facial features of the elderly to confirm the identity of the specific elderly and / or random elderly; Extract the video data related to specific elderly people and / or random elderly people from the surveillance video data, and transmit it to the action recognition module for action recognition and analysis to identify whether there is abnormal behavior; If there is abnormal behavior, the abnormal video data is marked as abnormal, and an abnormal behavior report is generated, wherein the abnormal behavior report includes a description of the abnormal behavior and timestamp information; Generate controversial primary supervision results based on abnormal health reports and abnormal behavior reports; If there is no abnormality, a supervision result without objection is generated.
