A kind of the weight reducing cloud data encryption storage system and method for intelligent terminalTechnical field
The present invention relates to a kind of weight reducing cloud data encryption of technical field of data processing, in particular to intelligent terminal storages to beSystem and method.
Background technique
With the development of society, the theory of data sharing has become more and more popular.The visitor that multiple users pass through oneselfThe upload and downloading of data, and the available data uploaded to other people may be implemented in the interaction at family end and cloud server,To realize more based on the application of big data.However, in the data sharing epoch, while data acquisition is convenient, data peaceFull property can not also be ignored.
Body-building process is recorded during weight reducing now with some users selection, obtains video data.However it regardsFrequency often mixes with some other video of user, can not Classification Management, and do not closed well with other dataConnection gets up.
Summary of the invention
The present invention provides the weight reducing cloud data encryption storage systems and method of a kind of intelligent terminal, and its object is to overcomeDefect in the prior art, workout data and video are associated, and are by the video that time and user identity judgement are recordedNo is body-building video, realizes the management of body-building visual classification and the associate management with workout data.
To achieve the goals above, the present invention has following constitute:
The weight reducing cloud data encryption storage system of the intelligent terminal, is set in intelligent terminal, the system comprises:
Image capture module, for obtaining the video of shooting from camera;
Picture recognition module, for extracting user's face image from the video that shooting is completed, by user's face image andThe video capture time is sent to Cloud Server, receives identity ID corresponding to the user's face image that Cloud Server returns, and sentenceWhether the identity ID that disconnected Cloud Server returns and the identity ID that intelligent terminal is bound are consistent, if unanimously, storing camera batThe video and shooting time taken the photograph;
Weight reducing data acquisition module is used for acquiring user's heart rate data from Intelligent bracelet in real time and acquiring from Intelligent braceletFamily speed data, and the identity ID and weight testing number for receiving the weight detection data of batheroom scale, and intelligent terminal being boundAccording to being uploaded to Cloud Server;
Exercise position judgment module, for judging whether user is in fortune according to user's heart rate data and user velocity dataDynamic state judges whether current time is gym time set by user if user is kept in motion, if it is,It determines that user is currently at exercise position, records the gym time of user, and the gym time of user is sent to Cloud Server;
Body-building video judgment module judges whether the video capture time is user when for there is new video capture to completeGym time, and the identity ID of user's face image is consistent with the identity ID that intelligent terminal is bound in video, if it is, reallyFixed new video is body-building video;
Key production module is used to generate public key and private key every predetermined period, public key is sent to Cloud Server, andWhen judgement has new body-building video, random key is generated, stores the ID of random key and video;
First encrypting module, for, to body-building video-encryption, obtaining encrypted body-building video using random key;
Second encrypting module, for gym time of the private key to user, the heart rate in the user for body-building time using userData, speed data and encrypted body-building video are encrypted, and encryption weight reducing data are obtained;
Data transmission blocks, for the identity ID of encryption weight reducing data and intelligent terminal binding to be sent to the cloud serviceDevice.
Optionally, it after the Cloud Server receives encryption weight reducing data, is inquired according to the identity ID of intelligent terminal bindingThe public key of user is decrypted encryption weight reducing data using public key, after the completion of decryption, obtains gym time, the user of userHeart rate data, speed data and encrypted body-building video in gym time;
The gym time of the user that Cloud Server judgement decryption obtains with received from exercise position judgment moduleWhether the gym time of user is consistent, if unanimously, the Cloud Server determines subscriber authentication success;
After the Cloud Server determines subscriber authentication success, obtained user for body-building time, Yong Hujian are decrypted in storageHeart rate data and speed data in the body time as public data, and store encrypted body-building video.
Optionally, described to judge whether user is kept in motion according to user's heart rate data and user velocity data, packetInclude following steps:
Determine whether average heart rate of the user in default measurement period is greater than the first preset threshold and user surveys defaultWhether the average speed in the amount period is greater than the second preset threshold, if it is, user is kept in motion, otherwise, user is notIt is kept in motion.
Optionally, the system also includes:
Data inquiry module obtains the identity of inquiry from Cloud Server for sending data inquiry request to Cloud ServerWorkout data of the ID in query time section, if the data inquiry request of data inquiry module does not include asking for video dataIt asks, then the data inquiry request of the data inquiry module includes the identity ID and query time section of inquiry, if data queryThe data inquiry request of module includes the request of video data, then data inquiry module arranges intelligent terminal and Cloud ServerReserved packet is encrypted using private key, obtains demand file packet, and the data inquiry request includes the identity ID of inquiry, looks intoAsk period and demand file packet.
Optionally, when the Cloud Server receives data inquiry request, judge the data inquiry request whether includeDemand file packet is decrypted if it is, the Cloud Server is decrypted the demand file packet using the public key of userTo reserved packet, reserved packet that the Cloud Server obtains the reserved packet of the user itself stored and decryption intoRow compares, if comparing consistent, subscriber authentication success;
If subscriber authentication success, body-building of the Cloud Server by the identity ID of inquiry in query time sectionData and body-building video are sent to intelligent terminal;
If the data inquiry request does not include demand file packet or subscriber authentication failure, the Cloud ServerWorkout data of the identity ID of inquiry in query time section is sent to intelligent terminal, the workout data includes user for body-buildingTime, the heart rate data in the user for body-building time and speed data.
Optionally, the Cloud Server also sets the data entry limit value that each intelligent terminal is inquired daily, if intelligenceThe identity ID of terminal request inquiry is the identity ID bound with intelligent terminal, then the inquiry of intelligent terminal is not by data entry limit valueLimitation, if intelligent terminal request inquiry identity ID be not with intelligent terminal binding identity ID, the Cloud ServerStatistics returns to the data entry quantity of intelligent terminal, and when data entry quantity reaches data entry limit value, refuses the intelligenceThe data inquiry request of energy terminal, wherein each data entry includes the gym time of the one-time continuous of user, user in the companyHeart rate data and speed data in continuous gym time.
The embodiment of the present invention also provides a kind of weight reducing cloud data encryption storage method of intelligent terminal, using the intelligenceThe weight reducing cloud data encryption storage system of terminal, described method includes following steps:
The video of shooting is obtained from camera;
User's face image is extracted from the video that shooting is completed, and user's face image and video capture time are sent toCloud Server receives identity ID corresponding to the user's face image that Cloud Server returns, and judges the body that Cloud Server returnsWhether part ID and the identity ID that intelligent terminal is bound are consistent, if unanimously, storing the video and shooting time of camera shooting;
User's heart rate data is acquired from Intelligent bracelet in real time and acquires user velocity data, and receiving body from Intelligent braceletThe weight detection data of restatement, and the identity ID of intelligent terminal binding and weight detection data are uploaded to Cloud Server;
Judge whether user is kept in motion according to user's heart rate data and user velocity data, if user is in fortuneDynamic state, then judge whether current time is gym time set by user, if it is, determining that user is currently at body-building shapeState records the gym time of user, and the gym time of user is sent to Cloud Server;
When thering is new video capture to complete, judge whether the video capture time is the gym time of user, and use in videoThe identity ID of family face-image is consistent with the identity ID that intelligent terminal is bound, if it is, determining that new video is body-building video;
Public key and private key are generated every predetermined period, public key is sent to Cloud Server, and judgement has new body-building viewWhen frequency, random key is generated, stores the ID of random key and video;
Using random key to body-building video-encryption, encrypted body-building video is obtained;
To the gym time of user, the heart rate data in the user for body-building time, speed data and added using the private key of userBody-building video after close is encrypted, and encryption weight reducing data are obtained;
The identity ID of encryption weight reducing data and intelligent terminal binding is sent to the Cloud Server.
Optionally, the method also includes following steps:
After the Cloud Server receives encryption weight reducing data, according to the public affairs of the identity ID inquiry user of intelligent terminal bindingKey is decrypted encryption weight reducing data using public key, after the completion of decryption, obtains gym time, the user for body-building time of userInterior heart rate data, speed data and encrypted body-building video;
The gym time of the user that Cloud Server judgement decryption obtains with received from exercise position judgment moduleWhether the gym time of user is consistent, if unanimously, the Cloud Server determines subscriber authentication success;
After the Cloud Server determines subscriber authentication success, obtained user for body-building time, Yong Hujian are decrypted in storageHeart rate data and speed data in the body time as public data, and store encrypted body-building video;
If the Cloud Server determines subscriber authentication failure, the Cloud Server send authentication failed notify toThe intelligent terminal, and abandon the encryption weight reducing data this time received.
Using the weight reducing cloud data encryption storage system and method for the intelligent terminal in the invention, have following beneficial to effectFruit:
(1) workout data and video are associated, identification view is realized by picture recognition module and Cloud Server networkingThe identity of user in frequency judges whether the video recorded is body-building video by time and user identity, realizes body-building video pointClass management and associate management with workout data;
(2) body-building video and workout data are respectively set to encipherment protection and public data, workout data can be for himPeople ensures the privacy and safety of body-building video with while oneself freely checking reference, and random key only has intelligent terminalIt is stored with, also just only intelligent terminal can check encrypted body-building video, without maliciously being stolen and being utilized by other people, mentionAlso the safety of privacy of user is ensured while high user's ease of use.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the weight reducing cloud data encryption storage system of intelligent terminal of the invention;
Fig. 2 is the flow chart of the weight reducing cloud data encryption storage method of intelligent terminal of the invention;
Fig. 3 is the flow chart that Cloud Server of the invention is verified workout data and stored.
Specific embodiment
It is further to carry out combined with specific embodiments below in order to more clearly describe technology contents of the inventionDescription.
As shown in Figure 1, being set to intelligence the present invention provides a kind of weight reducing cloud data encryption storage system of intelligent terminalIn terminal, the system comprises:
Image capture module M100, for obtaining the video of shooting from camera, this camera can be intelligent terminal certainlyThe camera of band, or pass through the external camera wirelessly or non-wirelessly connecting with intelligent terminal;
Picture recognition module M200, for extracting user's face image from the video that shooting is completed, by user's face figurePicture and video capture time are sent to Cloud Server, receive identity ID corresponding to the user's face image that Cloud Server returns,And whether the identity ID for judging that identity ID and intelligent terminal that Cloud Server returns are bound is consistent, if unanimously, storing camera shootingThe video and shooting time of head shooting;Cloud Server can carry out image using existing image-recognizing method in the prior artIdentification, for example, by using trained machine learning model, such as active shape model, convolutional neural networks model etc.Deng according to the identity of face-image recognition training person;Trainer need the photo that multiple multiple and different angles are provided first come intoThe training of row machine learning model improves the accuracy rate of machine learning model;
Reduce weight data acquisition module M300, for acquiring user's heart rate data from Intelligent bracelet in real time and adopting from Intelligent braceletCollect user velocity data, and receive the weight detection data of batheroom scale, and the identity ID of intelligent terminal binding and weight are examinedMeasured data is uploaded to Cloud Server;Wherein, it also needs together to upload the time of measuring of user when weight detection data uploads, bodyRe-detection data and time of measuring can be used as public data, and other users can also check, can also be set according to userIt is set to the private data that only this user can check;
Exercise position judgment module M400, for judging whether user locates according to user's heart rate data and user velocity dataIn motion state, if user is kept in motion, judge whether current time is gym time set by user, ifIt is, it is determined that user is currently at exercise position, records the gym time of user, and the gym time of user is sent to cloud clothesBusiness device;
Body-building video judgment module M500, when for there is new video capture to complete, judge the video capture time whether beThe gym time of user, and the identity ID of user's face image is consistent with the identity ID that intelligent terminal is bound in video, if so,Then determine that new video is body-building video;
Key production module M600, for every predetermined period generation public key and private key, public key to be sent to Cloud Server,And when judging to have new body-building video, random key is generated, stores the ID of random key and video;
First encrypting module M700, for, to body-building video-encryption, obtaining encrypted body-building video using random key;Encryption method can be using Encryption Algorithm in the prior art, such as common symmetric encipherment algorithm herein: DES, 3DES,DESX, Blowfish, IDEA, RC4, RC5, RC6 and AES etc.;
Second encrypting module M800, for the private key using user to the gym time of user, in the user for body-building timeHeart rate data, speed data and encrypted body-building video are encrypted, and encryption weight reducing data are obtained;Encryption method can be with hereinUsing Encryption Algorithm in the prior art, such as common rivest, shamir, adelman: RSA, ECC, Diffie-Hellman, ElGamal, DSA etc.;Using the content of the private key encryption of user, could only be decrypted using corresponding public key;
Data transmission blocks M900, for the identity ID of encryption weight reducing data and intelligent terminal binding to be sent to the cloudServer.
As shown in Fig. 2, the embodiment of the present invention also provides a kind of weight reducing cloud data encryption storage method of intelligent terminal, useThe weight reducing cloud data encryption storage system of the intelligent terminal, described method includes following steps:
The video of shooting is obtained from camera;
User's face image is extracted from the video that shooting is completed, and user's face image and video capture time are sent toCloud Server receives identity ID corresponding to the user's face image that Cloud Server returns, and judges the body that Cloud Server returnsWhether part ID and the identity ID that intelligent terminal is bound are consistent, if unanimously, storing the video and shooting time of camera shooting;
User's heart rate data is acquired from Intelligent bracelet in real time and acquires user velocity data, and receiving body from Intelligent braceletThe weight detection data of restatement, and the identity ID of intelligent terminal binding and weight detection data are uploaded to Cloud Server;
Judge whether user is kept in motion according to user's heart rate data and user velocity data, if user is in fortuneDynamic state, then judge whether current time is gym time set by user, if it is, determining that user is currently at body-building shapeState records the gym time of user, and the gym time of user is sent to Cloud Server;
When thering is new video capture to complete, judge whether the video capture time is the gym time of user, and use in videoThe identity ID of family face-image is consistent with the identity ID that intelligent terminal is bound, if it is, determining that new video is body-building video;
Public key and private key are generated every predetermined period, public key is sent to Cloud Server, and judgement has new body-building viewWhen frequency, random key is generated, stores the ID of random key and video;
Using random key to body-building video-encryption, encrypted body-building video is obtained;
To the gym time of user, the heart rate data in the user for body-building time, speed data and added using the private key of userBody-building video after close is encrypted, and encryption weight reducing data are obtained;
The identity ID of encryption weight reducing data and intelligent terminal binding is sent to the Cloud Server.
As shown in figure 3, in this embodiment, after the Cloud Server receives encryption weight reducing data, according to intelligent terminalThe public key of the identity ID inquiry user of binding is decrypted encryption weight reducing data using public key, after the completion of decryption, obtains userGym time, the heart rate data in the user for body-building time, speed data and encrypted body-building video;
The gym time of the user that Cloud Server judgement decryption obtains with received from exercise position judgment moduleWhether the gym time of user is consistent, if unanimously, the Cloud Server determines subscriber authentication success, if differentIt causes, it may be possible to be distorted in data transmission procedure by people, can also can have other people that user is pretended to be to upload data;
After the Cloud Server determines subscriber authentication success, obtained user for body-building time, Yong Hujian are decrypted in storageHeart rate data and speed data in the body time as public data, and store encrypted body-building video.
If the Cloud Server determines subscriber authentication failure, the Cloud Server send authentication failed notify toThe intelligent terminal, and abandon the encryption weight reducing data this time received
In this embodiment, described to judge whether user is in movement shape according to user's heart rate data and user velocity dataState includes the following steps:
Determine whether average heart rate of the user in default measurement period is greater than the first preset threshold and user surveys defaultWhether the average speed in the amount period is greater than the second preset threshold, if it is, user is kept in motion, otherwise, user is notIt is kept in motion.
In this embodiment, the system also includes:
Data inquiry module obtains the identity of inquiry from Cloud Server for sending data inquiry request to Cloud ServerWorkout data of the ID in query time section, if the data inquiry request of data inquiry module does not include asking for video dataIt asks, then the data inquiry request of the data inquiry module includes the identity ID and query time section of inquiry, if data queryThe data inquiry request of module includes the request of video data, then data inquiry module arranges intelligent terminal and Cloud ServerReserved packet is encrypted using private key, obtains demand file packet, and the data inquiry request includes the identity ID of inquiry, looks intoAsk period and demand file packet.
In this embodiment, when the Cloud Server receives data inquiry request, judge that the data inquiry request isNo includes demand file packet, if it is, the Cloud Server is decrypted the demand file packet using the public key of user,Decryption obtains reserved packet, the reserved letter that the Cloud Server obtains the reserved packet of the user itself stored and decryptionBreath packet is compared, if comparing consistent, subscriber authentication success;
If subscriber authentication success, body-building of the Cloud Server by the identity ID of inquiry in query time sectionData and body-building video are sent to intelligent terminal;
If the data inquiry request does not include demand file packet or subscriber authentication failure, the Cloud ServerWorkout data of the identity ID of inquiry in query time section is sent to intelligent terminal, the workout data includes user for body-buildingTime, the heart rate data in the user for body-building time and speed data.
Therefore, which not only encrypts body-building video, only intelligent terminal be stored with encryption with secretKey can be according to the ID or strong of body-building video when intelligent terminal downloads the body-building video with the identity ID of oneself bindingThe body time inquires the random key encrypted at that time, and then video is decrypted and is looked into using the random key inquiredIt sees.For other users, not only without random key, but also it can not be inquired and foradownloaded video, avoids regarding from sourceFrequency is leaked to other people.Each user can check oneself all workout data and video, and can check other usersDisclosed workout data, but can not check the body-building video of other users, thus while ensureing that workout data is shared,The privacy and safety of body-building video are ensured.
In this embodiment, the Cloud Server also sets the data entry limit value that each intelligent terminal is inquired daily, such asThe identity ID of fruit intelligent terminal request inquiry is the identity ID bound with intelligent terminal, then the inquiry of intelligent terminal is not by data stripThe limitation of mesh limit value, if the identity ID of intelligent terminal request inquiry is not the identity ID with intelligent terminal binding, the cloudServer statistics return to the data entry quantity of intelligent terminal, and when data entry quantity reaches data entry limit value, refuseThe data inquiry request of the exhausted intelligent terminal, wherein each data entry includes the gym time of the one-time continuous of user, userHeart rate data and speed data in the continuous gym time.Therefore, which shares same in realization workout dataWhen, the abuse of search access right is also avoided, user's malice has been avoided to check data.
Compared with prior art, using the weight reducing cloud data encryption storage system of the intelligent terminal in the invention and sideMethod has the following beneficial effects:
(1) workout data and video are associated, identification view is realized by picture recognition module and Cloud Server networkingThe identity of user in frequency judges whether the video recorded is body-building video by time and user identity, realizes body-building video pointClass management and associate management with workout data;
(2) body-building video and workout data are respectively set to encipherment protection and public data, workout data can be for himPeople ensures the privacy and safety of body-building video with while oneself freely checking reference, and random key only has intelligent terminalIt is stored with, also just only intelligent terminal can check encrypted body-building video, without maliciously being stolen and being utilized by other people, mentionAlso the safety of privacy of user is ensured while high user's ease of use.
In this description, the present invention is described with reference to its specific embodiment.But it is clear that can still makeVarious modifications and alterations are without departing from the spirit and scope of the invention.Therefore, the description and the appended drawings should be considered as illustrativeAnd not restrictive.