Data transmission method and device, electronic equipment and storage medium
The base station-based data transmission method and device solve the activation and data upload challenges of health monitoring devices by managing connections and ensuring continuous data transfer in environments where users lack mobile terminals or have operational issues.
Patent Information
- Application Number
- CN202411126158.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-24
AI Technical Summary
Health monitoring devices in scenarios like hospitals or nursing homes face activation and data upload failures due to users lacking mobile phones or not knowing how to operate the applications, and communication disconnections leading to non-continuous real-time data upload.
A data transmission method and device that utilize a base station to activate health monitoring devices and manage connections, enabling real-time data upload without relying on the monitored object's mobile terminal, by detecting and connecting with devices within its coverage area and ensuring signal strength and authentication.
Enables activation and continuous real-time data upload of health monitoring data by using a base station to manage device connections and data transfer, addressing the issues of user access and communication disconnections.
Smart Images

Figure CN119183086A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a data transmission method, device, electronic device and storage medium. Background Art
[0002] Health monitoring equipment is increasingly widely used in public places such as hospitals and nursing homes. The health monitoring equipment worn by the monitored object can collect the monitored object's physiological, biochemical, and physical signs health monitoring data in real time or regularly to monitor the monitored object's health status. In the related technology, the transmission process of the data collected by the health monitoring equipment is as follows: a health monitoring application (Application, APP) is installed on the mobile terminal of the monitored object, the health monitoring equipment is connected to the health monitoring application in the mobile terminal through Bluetooth communication, the health monitoring equipment is activated through the health monitoring application in the mobile terminal, and the health monitoring data of the monitored object monitored by the health monitoring equipment is collected, and then the health monitoring application in the mobile terminal uploads the collected health monitoring data of the monitored object to the server, and the server provides personalized health management and auxiliary diagnosis services for the monitored object based on the received health data.
[0003] However, in scenarios such as hospitals or nursing homes, some users may not have mobile phones or other mobile terminal devices, or some elderly users do not know how to operate health monitoring applications, and thus cannot complete the activation of health monitoring devices and the upload of health monitoring data. In addition, in places such as hospitals or nursing homes, as the location of the monitored subject wearing the health monitoring device moves, the communication connection between the monitored subject's mobile terminal and the health monitoring device worn may be disconnected, making it impossible to continuously upload the monitored subject's health monitoring data in real time. Summary of the invention
[0004] In order to solve the problem in the prior art of failure in activating health monitoring devices and uploading health monitoring data, and the problem of failure in continuous real-time uploading of the health monitoring data of the monitored subject due to the disconnection of the communication connection between the mobile terminal of the monitored subject and the health monitoring device worn by the monitored subject, the embodiments of the present application provide a data transmission method, device, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method implemented by a server side, comprising:
[0006] receiving activation success information of a health monitoring device, and marking the state of the health monitoring device as an activated state, wherein the activation success information of the health monitoring device is sent by the health monitoring device after the health monitoring device is activated by a designated mobile terminal, or is sent by a base station after the health monitoring device is activated;
[0007] Receiving association information of a candidate health monitoring device to be connected sent by a base station, where the candidate health monitoring device to be connected is a health monitoring device to be connected that is detected by the base station and can be connected within its coverage area;
[0008] If it is determined that the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected, a message indicating connection to the candidate health monitoring device to be connected is returned to the base station, so that the base station is connected to the candidate health monitoring device to be connected;
[0009] The receiving base station sends health monitoring data obtained from each health monitoring device connected to it.
[0010] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0011] Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes:
[0012] Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected;
[0013] If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection of the candidate health monitoring device to be connected with the first base station when it was last connected to it, it is determined that the connection condition is met.
[0014] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0015] Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes:
[0016] Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected;
[0017] If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0018] In one embodiment, the message indicating the connection to the candidate health monitoring device to be connected includes the authentication information of the candidate health monitoring device to be connected, so that the base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information and connect after successful authentication.
[0019] In one implementation, the authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
[0020] In one embodiment, before receiving the association information of the candidate health monitoring device to be connected sent by the base station, the method further includes:
[0021] receiving a login request sent by the base station, wherein the login request includes identification information and login key information of the base station;
[0022] The identification information and login key information of the base station are verified, and if it is determined that the verification passes, the login token information is returned to the base station, so that the base station carries the login token information when sending data.
[0023] In a second aspect, an embodiment of the present application provides a data transmission device implemented on a server side, including:
[0024] a first receiving unit, configured to receive activation success information of a health monitoring device, and mark the state of the health monitoring device as an activated state, wherein the activation success information of the health monitoring device is sent by the health monitoring device after the health monitoring device is activated by a designated mobile terminal, or is sent by a base station after the health monitoring device is activated;
[0025] A second receiving unit is configured to receive association information of a candidate health monitoring device to be connected sent by a base station, wherein the candidate health monitoring device to be connected is a health monitoring device to be connected that is detected by the base station and can be connected within its coverage range;
[0026] a returning unit, configured to return a message indicating connection to the candidate health monitoring device to be connected to the base station if it is determined that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected, so that the base station is connected to the candidate health monitoring device to be connected;
[0027] The third receiving unit is used to receive the health monitoring data sent by the base station and obtained from each health monitoring device connected to the base station.
[0028] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0029] The return unit is specifically used to search for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; if it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection of the candidate health monitoring device to be connected with the first base station when it was last connected to it, it is determined that the connection condition is met.
[0030] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0031] The return unit is specifically used to search for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; if it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0032] In one embodiment, the message indicating the connection to the candidate health monitoring device to be connected includes the authentication information of the candidate health monitoring device to be connected, so that the base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information and connect after successful authentication.
[0033] In one implementation, the authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
[0034] In one embodiment, the device further comprises:
[0035] a fourth receiving unit, configured to receive a login request sent by the base station before receiving the association information of the candidate health monitoring device to be connected sent by the base station, wherein the login request includes identification information and login key information of the base station;
[0036] The verification unit is used to verify the identification information and login key information of the base station. If it is determined that the verification passes, the login token information is returned to the base station so that the base station carries the login token information when sending data.
[0037] In a third aspect, an embodiment of the present application provides a data transmission method implemented by a base station side, including:
[0038] After activating the health monitoring device to be activated, sending activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state;
[0039] Sending the detected association information of the candidate health monitoring device to be connected that can be connected within the coverage area to the server, so that the server determines whether the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected;
[0040] When it is determined that a message returned by the server indicating connection to the candidate health monitoring device to be connected is received, connecting to the candidate health monitoring device to be connected;
[0041] Receive health monitoring data reported by each connected health monitoring device, and send the health monitoring data reported by each health monitoring device to the server.
[0042] In one embodiment, the health monitoring device to be activated is activated in the following manner:
[0043] Receiving a Bluetooth broadcast data packet sent by the health monitoring device to be activated, where the Bluetooth broadcast data packet is sent after the health monitoring device to be activated is awakened by a designated mobile terminal;
[0044] Acquire identification information of the health monitoring device to be activated from the health monitoring device to be activated;
[0045] Sending the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification information of the health monitoring device to be activated;
[0046] receiving authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after verifying the identification information of the health monitoring device to be activated;
[0047] Perform bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and activate the health monitoring device to be activated after successful authentication.
[0048] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0049] Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes:
[0050] Generate a first public key and a first private key according to a preset key agreement algorithm;
[0051] Select any first key from the key set, and generate first signature information using a hash algorithm according to the selected first key, first time information and the first public key;
[0052] Sending a first authentication request to the health monitoring device to be activated, where the first authentication request carries identification information of the first key, the first time information, the first public key, and the first signature information, so that the health monitoring device to be activated generates second signature information using the hash algorithm according to the key corresponding to the identification of the first key, the first time information, and the first public key, to verify whether the second signature information is consistent with the first signature information;
[0053] receiving a second authentication request sent by the health monitoring device to be activated when determining that the second signature information is consistent with the first signature information, wherein the second authentication request carries identification information of a second key, second time information, a second public key, and third signature information, wherein the third signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected second key, the second time information, and the second public key, and the second public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm;
[0054] Generate fourth signature information by using the Hash algorithm according to the key corresponding to the identifier of the second key, the second time information, and the second public key;
[0055] If it is determined that the fourth signature information is consistent with the third signature information, then the authentication is determined to be successful.
[0056] In a fourth aspect, an embodiment of the present application provides a data transmission device implemented on a base station side, including:
[0057] A first sending unit, configured to send activation success information of the health monitoring device to the server after activating the health monitoring device to be activated, so that the server marks the state of the health monitoring device as an activated state;
[0058] A second sending unit, configured to send the detected association information of the candidate health monitoring device to be connected that can be connected within the coverage area to the server, so that the server determines whether the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected;
[0059] a processing unit, configured to connect to the candidate health monitoring device to be connected when it is determined that a message returned by the server indicating connection to the candidate health monitoring device to be connected is received;
[0060] The third sending unit is used to receive the health monitoring data reported by each connected health monitoring device, and send the health monitoring data reported by each health monitoring device to the server.
[0061] In one embodiment, the device further comprises:
[0062] An activation unit is used to activate the health monitoring device to be activated in the following manner: receiving a Bluetooth broadcast data packet sent by the health monitoring device to be activated, wherein the Bluetooth broadcast data packet is sent by the health monitoring device to be activated after being awakened by a designated mobile terminal; obtaining identification information of the health monitoring device to be activated from the health monitoring device to be activated; sending the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification information of the health monitoring device to be activated; receiving authentication information of the health monitoring device to be activated sent by the server, wherein the authentication information of the health monitoring device to be activated is sent by the server after the identification information of the health monitoring device to be activated is verified; performing two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and activating the health monitoring device to be activated after successful authentication.
[0063] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0064] The activation unit is specifically configured to generate a first public key and a first private key according to a preset key agreement algorithm; select any first key from the key set, and generate first signature information using a hash algorithm according to the selected first key, the first time information and the first public key; send a first authentication request to the health monitoring device to be activated, wherein the first authentication request carries the identification information of the first key, the first time information, the first public key and the first signature information, so that the health monitoring device to be activated generates second signature information using the hash algorithm according to the key corresponding to the identification of the first key, the first time information and the first public key, so as to verify whether the second signature information is consistent with the first signature information; receive the health monitoring device to be activated; The second authentication request sent by the activated health monitoring device when it is determined that the second signature information is consistent with the first signature information, the second authentication request carries the identification information of the second key, the second time information, the second public key and the third signature information, the third signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected second key, the second time information and the second public key, and the second public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm; the fourth signature information is generated using the hash algorithm according to the key corresponding to the identification of the second key, the second time information and the second public key; if it is determined that the fourth signature information is consistent with the third signature information, it is determined that the authentication is successful.
[0065] In a fifth aspect, an embodiment of the present application provides a data transmission method implemented by a designated mobile terminal side, including:
[0066] Waking up the health monitoring device to be activated, and obtaining identification information of the health monitoring device to be activated;
[0067] Sending the identification information of the health monitoring device to be activated to a server, so that the server verifies the identification of the health monitoring device to be activated;
[0068] receiving authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after verifying the identity of the health monitoring device to be activated;
[0069] Performing two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and connecting with the health monitoring device to be activated after successful authentication, to activate the health monitoring device to be activated;
[0070] Sending activation success information of the health monitoring device to the server so that the server marks the state of the health monitoring device as an activated state; and disconnecting the connection with the health monitoring device.
[0071] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0072] Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes:
[0073] Generate a third public key and a third private key according to a preset key agreement algorithm;
[0074] Select any third key from the key set, and generate fifth signature information using a hash algorithm according to the selected third key, third time information and the third public key;
[0075] Sending a third authentication request to the health monitoring device to be activated, wherein the third authentication request carries the identification information of the third key, the third time information, the third public key, and the fifth signature information, so that the health monitoring device to be activated generates sixth signature information using the hash algorithm according to the key corresponding to the identification of the third key, the third time information, and the third public key, to verify whether the sixth signature information is consistent with the fifth signature information;
[0076] receiving a fourth authentication request sent by the health monitoring device to be activated when determining that the sixth signature information is consistent with the fifth signature information, the fourth authentication request carrying identification information of a fourth key, fourth time information, a fourth public key and seventh signature information, the seventh signature information being generated by the health monitoring device to be activated using the hash algorithm according to the selected fourth key, the fourth time information and the fourth public key, and the fourth public key being generated by the health monitoring device to be activated according to the preset key agreement algorithm;
[0077] Generate eighth signature information using the Hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information, and the fourth public key;
[0078] If it is determined that the eighth signature information is consistent with the seventh signature information, then it is determined that the authentication is successful.
[0079] In one embodiment, before sending the identification information of the health monitoring device to be activated to the server, the method further includes:
[0080] Sending a login request to the server, wherein the login request includes login information;
[0081] Receive access token information returned by the server, where the access token is generated by the server after successfully verifying the login information.
[0082] In a sixth aspect, an embodiment of the present application provides a data transmission device implemented by a designated mobile terminal side, including:
[0083] A wake-up unit, used to wake up the health monitoring device to be activated and obtain identification information of the health monitoring device to be activated;
[0084] A first sending unit, configured to send the identification information of the health monitoring device to be activated to a server, so that the server verifies the identification of the health monitoring device to be activated;
[0085] A first receiving unit, configured to receive authentication information of the health monitoring device to be activated sent by the server, wherein the authentication information of the health monitoring device to be activated is sent by the server after the identification of the health monitoring device to be activated is verified;
[0086] an authentication unit, configured to perform bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and connect with the health monitoring device to be activated after successful authentication, so as to activate the health monitoring device to be activated;
[0087] The second sending unit is used to send activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state; and disconnect the connection with the health monitoring device.
[0088] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0089] The authentication unit is specifically used to generate a third public key and a third private key according to a preset key agreement algorithm; select any third key from the key set, and generate fifth signature information using a hash algorithm according to the selected third key, third time information and the third public key; send a third authentication request to the health monitoring device to be activated, wherein the third authentication request carries the identification information of the third key, the third time information, the third public key and the fifth signature information, so that the health monitoring device to be activated generates sixth signature information using the hash algorithm according to the key corresponding to the identification of the third key, the third time information and the third public key, so as to verify whether the sixth signature information is consistent with the fifth signature information; receive the health monitoring device to be activated. The fourth authentication request sent by the activated health monitoring device when it is determined that the sixth signature information is consistent with the fifth signature information, the fourth authentication request carries the identification information of the fourth key, the fourth time information, the fourth public key and the seventh signature information, the seventh signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected fourth key, the fourth time information and the fourth public key, and the fourth public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm; the eighth signature information is generated using the hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information and the fourth public key; if it is determined that the eighth signature information is consistent with the seventh signature information, it is determined that the authentication is successful.
[0090] In one embodiment, the device further comprises:
[0091] A third sending unit is used to send a login request to the server before sending the identification information of the health monitoring device to be activated to the server, wherein the login request includes login information;
[0092] The second receiving unit is used to receive access token information returned by the server, where the access token is generated by the server after successfully verifying the login information.
[0093] In a seventh aspect, an embodiment of the present application provides a data transmission method implemented by a health monitoring device, including:
[0094] receiving a request for obtaining identification information of a health monitoring device sent by a designated mobile terminal or a base station, wherein the request for obtaining identification information of the health monitoring device is sent by the designated mobile terminal or the base station after the health monitoring device is awakened by the designated mobile terminal;
[0095] Returning the identification information of the health monitoring device to the designated mobile terminal or the base station, so that the designated mobile terminal or the base station activates the health monitoring device according to the identification information of the health monitoring device;
[0096] After being activated, sending the associated information of the health monitoring device to a connectable base station, so that the base station sends the associated information of the health monitoring device to the server, so that the server determines whether a connection condition is met based on the associated information of the health monitoring device and the state of the health monitoring device;
[0097] After connecting with the base station, the collected health monitoring data is reported to the base station so that the base station sends the health monitoring data to the server, wherein the health monitoring device is connected to the base station after the base station receives a message returned by the server indicating the connection to the health monitoring device.
[0098] In one embodiment, the message indicating connection to the health monitoring device includes authentication information of the health monitoring device;
[0099] Before establishing a connection with the base station, the method further includes:
[0100] performing bidirectional authentication with the base station based on the authentication information of the health monitoring device;
[0101] Confirm that the two-way authentication is successful.
[0102] In one implementation, performing bidirectional authentication with the base station based on the authentication information of the health monitoring device specifically includes:
[0103] receiving a fifth authentication request sent by the base station, the fifth authentication request carrying identification information of a fifth key, fifth time information, a fifth public key, and ninth signature information, the fifth public key being generated by the base station according to a preset key agreement algorithm, the fifth key being selected by the base station from a key set in the authentication information of the health monitoring device returned by the server, and the ninth signature information being generated by the base station using a hash algorithm according to the fifth key, the fifth event information, and the fifth public key;
[0104] Generate tenth signature information using the Hash algorithm according to the key corresponding to the identifier of the fifth key, the fifth time information, and the fifth public key;
[0105] If it is determined that the tenth signature information is consistent with the ninth signature information, generating a sixth public key and a sixth private key according to the preset key agreement algorithm;
[0106] Select any sixth key from the locally stored key set, and generate an eleventh signature information using the Hash algorithm according to the selected sixth key, the sixth time information and the sixth public key;
[0107] The sixth authentication request sent to the base station carries the identification information of the sixth key, the sixth time information, the sixth public key and the eleventh signature information, so that the base station generates the twelfth signature information according to the key corresponding to the identification of the sixth key, the sixth time information and the sixth public key using the hash algorithm to verify whether the twelfth signature information is consistent with the eleventh signature information.
[0108] In one implementation, if it is determined that the two-way authentication is successful, the method further includes:
[0109] Generate a shared key with the base station using the preset key agreement algorithm based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key;
[0110] Sending the shared key to the server so that the server stores the corresponding relationship between the identification information of the health monitoring device and the shared key; and
[0111] Reporting the collected health monitoring data to the base station so that the base station sends the health monitoring data to the server specifically includes:
[0112] Encrypting the health monitoring data according to the shared key and a preset encryption algorithm to generate encrypted health monitoring data;
[0113] The encrypted health monitoring data is sent to the server, so that the server decrypts the encrypted health monitoring data according to the shared key.
[0114] In an eighth aspect, an embodiment of the present application provides a data transmission device implemented on a health monitoring device side, including:
[0115] a receiving unit, configured to receive a request for obtaining identification information of a health monitoring device sent by a designated mobile terminal or a base station, wherein the request for obtaining identification information of the health monitoring device is sent by the designated mobile terminal or the base station after the health monitoring device is awakened by the designated mobile terminal;
[0116] a returning unit, configured to return the identification information of the health monitoring device to the designated mobile terminal or the base station, so that the designated mobile terminal or the base station activates the health monitoring device according to the identification information of the health monitoring device;
[0117] a first sending unit, configured to send the associated information of the health monitoring device to a connectable base station after being activated, so that the base station sends the associated information of the health monitoring device to the server, so that the server determines whether a connection condition is met based on the associated information of the health monitoring device and a state of the health monitoring device;
[0118] A reporting unit is used to report the collected health monitoring data to the base station after connecting to the base station, so that the base station sends the health monitoring data to the server, wherein the health monitoring device is connected to the base station after the base station receives a message returned by the server indicating the connection to the health monitoring device.
[0119] In one embodiment, the message indicating connection to the health monitoring device includes authentication information of the health monitoring device;
[0120] The device further comprises:
[0121] an authentication unit, configured to perform a two-way authentication with the base station based on the authentication information of the health monitoring device before establishing a connection with the base station;
[0122] The determination unit is used to determine whether the two-way authentication is successful.
[0123] In one embodiment, the authentication unit is specifically used to receive a fifth authentication request sent by the base station, the fifth authentication request carrying identification information of a fifth key, fifth time information, a fifth public key and ninth signature information, the fifth public key is generated by the base station according to a preset key negotiation algorithm, the fifth key is selected by the base station from a key set in the authentication information of the health monitoring device returned by the server, and the ninth signature information is generated by the base station using a hash algorithm based on the fifth key, the fifth event information and the fifth public key; the tenth signature information is generated using the hash algorithm according to the key corresponding to the identification of the fifth key, the fifth time information and the fifth public key; if the tenth signature information is determined If the information is consistent with the ninth signature information, a sixth public key and a sixth private key are generated according to the preset key agreement algorithm; any sixth key is selected from the locally stored key set, and the eleventh signature information is generated by using the hash algorithm according to the selected sixth key, the sixth time information and the sixth public key; a sixth authentication request is sent to the base station, and the sixth authentication request carries the identification information of the sixth key, the sixth time information, the sixth public key and the eleventh signature information, so that the base station generates a twelfth signature information by using the hash algorithm according to the key corresponding to the identification of the sixth key, the sixth time information and the sixth public key, so as to verify whether the twelfth signature information is consistent with the eleventh signature information.
[0124] In one embodiment, it further includes:
[0125] a key negotiation unit, configured to, if it is determined that the two-way authentication is successful, generate a shared key with the base station using the preset key negotiation algorithm based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key;
[0126] A second sending unit, configured to send the shared key to the server, so that the server stores the corresponding relationship between the identification information of the health monitoring device and the shared key;
[0127] The reporting unit is specifically used to encrypt the health monitoring data according to the shared key and a preset encryption algorithm to generate encrypted health monitoring data; and send the encrypted health monitoring data to the server so that the server decrypts the encrypted health monitoring data according to the shared key.
[0128] In a ninth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data transmission method described in the present application when executing the program.
[0129] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps in the data transmission method described in the present application are implemented.
[0130] The beneficial effects of this application are as follows:
[0131] The data transmission method, device, electronic device and storage medium provided in the embodiments of the present application activate the health monitoring device by specifying a mobile terminal or a base station. When the health monitoring device is successfully activated, the activation success information of the health monitoring device is sent to the server. The server marks the state of the health monitoring device as an activated state. The base station detects the monitoring device to be connected that can be connected within its coverage area, takes the monitoring device to be connected as a candidate health monitoring device to be connected, and sends the associated information of the candidate health monitoring device to be connected to the server. If the server determines that the connection condition is met based on the associated information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected, it returns a message indicating the connection of the candidate health monitoring device to be connected to the base station. The base station connects with the candidate health monitoring device to be connected, and the base station sends the health monitoring data obtained from each health monitoring device connected to it to the server. In the embodiments of the present application, it is not necessary to use the mobile terminal of the monitored object to activate the health monitoring device and upload the health monitoring data monitored by the health monitoring device to the server. Instead, a designated mobile terminal ( For example, a medical staff's mobile terminal, or an independent mobile terminal) or a base station can be used to activate the health monitoring device, and the base station detects the candidate health monitoring devices to be connected that can be connected within its coverage range. The server determines whether the candidate health monitoring device to be connected meets the connection conditions, and the base station connects to the candidate health monitoring device to be connected that meets the connection conditions. The base station can upload the health monitoring data obtained from the health monitoring device to the server in real time. In this way, the problem of being unable to complete the activation of the health monitoring device and the uploading of the health monitoring data due to the monitored object not having a mobile phone or other mobile terminal, or not being able to operate the health monitoring application in its mobile terminal is avoided. In addition, the base station provided by the embodiment of the present application can detect the health monitoring devices that can be connected within its coverage range in real time. When the position of the monitored object wearing the health monitoring device moves and the health monitoring device is disconnected from the connected base station, it will be detected in time by the base station that can cover the current position of the health monitoring device, so as to connect to the qualified base station and continue to complete the real-time uploading of the health monitoring data.
[0132] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0133] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0134] Figure 1 A schematic diagram of an application scenario of the data transmission method provided in an embodiment of the present application;
[0135] Figure 2 A schematic diagram of an implementation process of activating a health monitoring device through a base station provided in an embodiment of the present application;
[0136] Figure 3 A schematic diagram of the implementation process of two-way authentication between a base station and a health monitoring device to be activated provided in an application embodiment;
[0137] Figure 4 A schematic diagram of an implementation process of activating a health monitoring device through a designated mobile terminal provided in an embodiment of the present application;
[0138] Figure 5 A schematic diagram of the implementation process of two-way authentication between a designated mobile terminal and a health monitoring device to be activated provided in an application embodiment;
[0139] Figure 6 A schematic diagram of a scenario in which a health monitoring device provided in an embodiment of the application is in a disconnected state;
[0140] Figure 7 A schematic diagram of an implementation flow of a data transmission method provided in an embodiment of the present application;
[0141] Figure 8 A schematic diagram of an implementation process of two-way authentication between a base station and a candidate health monitoring device to be connected provided in an embodiment of the present application;
[0142] Fig. 9 A schematic diagram of an implementation flow of a data transmission method implemented on a server side provided in an embodiment of the present application;
[0143] Fig.10 A schematic diagram of the structure of a data transmission device implemented on the server side provided in an embodiment of the present application;
[0144] Fig.11 A schematic diagram of an implementation flow of a data transmission method implemented by a base station side provided in an embodiment of the present application;
[0145] Fig.12 A schematic diagram of the structure of a data transmission device implemented on a base station side provided in an embodiment of the present application;
[0146] Fig.13 A schematic diagram of an implementation flow of a data transmission method implemented on a designated mobile terminal side provided in an embodiment of the present application;
[0147] Fig.14 A schematic diagram of the structure of a data transmission device implemented on a designated mobile terminal side provided in an embodiment of the present application;
[0148] Fig.15 A schematic diagram of an implementation flow of a data transmission method implemented on a health monitoring device side provided in an embodiment of the present application;
[0149] Fig.16 A schematic diagram of the structure of a data transmission device implemented on the health monitoring device side provided in an embodiment of the present application;
[0150] Fig.17 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0151] In order to solve the problem in the prior art of failure in activating health monitoring devices and uploading health monitoring data, and the problem of failure in continuous real-time uploading of the health monitoring data of the monitored subject due to the disconnection of the communication connection between the mobile terminal of the monitored subject and the health monitoring device worn by the monitored subject, the embodiments of the present application provide a data transmission method, device, electronic device and storage medium.
[0152] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0153] First reference Figure 1, which is a schematic diagram of an application scenario of the data transmission method provided in an embodiment of the present application, and may include a designated mobile terminal 11, a base station 12, a health monitoring device 13 and a server 14. The designated mobile terminal 11 may be a mobile terminal of a medical staff member or an independent mobile terminal, and the designated mobile terminal 11 is used to wake up the health monitoring device 13, or to wake up and activate the health monitoring device 13. The base station 12 can be set up in places such as hospitals or nursing homes according to needs, such as setting a base station 12 every few rooms. The embodiment of the present application does not limit this. Different from the base station in the prior art, the base station 12 provided in the embodiment of the present application can be used to activate the health detection device 13 after the designated mobile terminal 11 wakes up the health monitoring device 13, and detect the health monitoring devices 13 within its coverage area, and connect with the health monitoring devices 13 that meet the connection conditions, obtain the health monitoring data of the monitored object monitored by the health monitoring device 13, and upload the health monitoring data to the server 14. The base station 12 can also be used to detect the health monitoring devices 13 within its coverage area after the designated mobile terminal 11 wakes up and activates the health monitoring device 13, and connect with the health monitoring devices 13 that meet the connection conditions, obtain the health monitoring data of the monitored object monitored by the health monitoring device 13, and upload the health monitoring data to the server 14. The base station 13 provided in the embodiment of the present application is equivalent to a data relay forwarding device. The base station 13 may include the following modules: a first communication module, a processor, a second communication module and a memory. The first communication module, the second communication module and the memory are respectively connected to the processor. The first communication module may be a Bluetooth communication module, the second communication module may be a WiFi communication module, or may be a 4G (4th Generation Mobile Communication Technology) communication module or a 5G (5th Generation Mobile Communication Technology) communication module, etc. The embodiment of the present application does not limit this.The base station 12 is communicatively connected to the health monitoring device 13 through the first communication module. The first communication module supports simultaneous connection to multiple health monitoring devices 13. The number of health monitoring devices 13 that the base station 12 can connect to can be pre-set. For example, it can be but is not limited to being set to 10. The embodiment of the present application does not limit this. The base station 12 is communicatively connected to the server 14 through the second communication module. If the second communication module adopts a WiFi communication module, the WiFi communication module can be responsible for the communication and data transmission between the base station 12 and the server 14 by accessing WiFi. If the second communication module adopts a 4G communication module or a 5G communication module, the 4G communication module or the 5G communication module can be responsible for the communication and data transmission between the base station 12 and the server 14 by means of a built-in ESIM (Embedded-Subscriber Identity Module) card. The processor is used to complete the overall process control and task scheduling, and the memory is used to store the authentication information for the health monitoring device 13, the connection information of the health monitoring device, and the temporary storage of the health monitoring data reported by the health monitoring device.
[0154] In the embodiment of the present application, the designated mobile terminal 11 may be, but is not limited to, a smart phone, a tablet computer, a PDA (Personal Digital Assistant), a laptop computer, a desktop computer and other devices, and the server 14 may be an independent physical server or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, and cloud storage, which is not limited in the embodiment of the present application.
[0155] Based on the above application scenarios, the following will refer to the attached Figures 2 to 4 The exemplary embodiments of the present application are described in more detail. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in any way. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0156] The data transmission method provided in the embodiment of the present application may include two stages: activation of the health monitoring device and uploading of the health monitoring data.
[0157] When the health monitoring device is used for the first time, it needs to be activated first. In one embodiment, the health monitoring device can be woken up by a designated mobile terminal, and then activated by the base station. The health monitoring data reported by the health monitoring device is then uploaded to the server by the base station.
[0158] Among them, the implementation process of the base station activating the health monitoring equipment is as follows Figure 2As shown, this stage involves interaction between the specified mobile terminal, the health monitoring device, the base station and the server, and may include the following steps:
[0159] S21. The base station sends a login request to the server, where the login request includes identification information and login key information of the base station.
[0160] In specific implementation, when the base station leaves the factory, the manufacturer pre-sets an identifier and a login key for the base station. The identifier is used to uniquely identify the base station, and the login key is used by the server to authenticate the identity when the base station logs in to the server. The server pre-stores the corresponding relationship between the base station identifier and the login key. When the base station logs in to the server for the first time, the base station carries its identifier information and login key information in the login request and sends it to the server.
[0161] S22. The server verifies the identification information and login key information of the base station. If it is determined that the verification passes, step S23 is executed. Otherwise, a login failure message is returned to the base station.
[0162] During the specific implementation, the server verifies the base station identifier and login key in the login request sent by the base station according to the stored correspondence between the base station identifier and the login key. If the login key in the login request is consistent with the login key corresponding to the base station identifier in the stored correspondence between the base station identifier and the login key, the verification passes and the base station successfully logs in to the server.
[0163] S23. The server returns login token information to the base station.
[0164] During specific implementation, when the server passes the verification of the base station's identification and login key, it generates a corresponding login token for the base station, stores the correspondence between the base station's identification and its login token, and returns the login token information to the base station. In this way, when the base station subsequently sends data to the server, it can carry the login token information. The server searches for the login token corresponding to the base station's identification from the stored correspondence between the base station's identification and the access token to verify the login token sent by the base station. If the two are consistent, the verification is successful, thereby improving the security of data transmission between the base station and the server.
[0165] S24. The designated mobile terminal sends a login request to the server, where the login request includes login information.
[0166] Among them, the login information may include a user name and password, and the login information may also include a mobile phone number and a verification code, which is not limited in the embodiments of the present application.
[0167] S25. The server verifies the login information of the designated mobile terminal. If the verification is successful, step S26 is executed. Otherwise, a login failure message is returned to the designated mobile terminal.
[0168] The server pre-stores the login information when the mobile terminal registers: user name and password, or mobile phone number. When a login request sent by a designated mobile terminal is received, if the login request contains a user name and password, the user name and password in the login request are compared with the user name and password stored in the mobile terminal. If they are consistent, the verification passes. If the login request contains the mobile phone number used by the user when registering, a verification code is sent to the mobile phone number. If the verification code in the received login request is consistent with the verification code sent by the server, the verification passes and the designated mobile terminal successfully logs in to the server.
[0169] S26. The server returns access token information to the designated mobile terminal.
[0170] In specific implementation, when the server verifies the login information of the designated mobile terminal, it generates a corresponding access token for the designated mobile terminal, stores the corresponding relationship between the identifier of the designated mobile terminal and the access token, and returns the access token information to the designated mobile terminal. In this way, when the designated mobile terminal subsequently sends data to the server, it can carry the access token. The server searches for the access token corresponding to the identifier of the designated mobile terminal from the stored corresponding relationship between the identifier of the mobile terminal and the access token to verify the access token sent by the designated mobile terminal. If the two are consistent, the verification is passed, thereby improving the security of data transmission between the designated mobile terminal and the server.
[0171] S27. Designate the mobile terminal to wake up the health monitoring device to be activated.
[0172] During specific implementation, the designated mobile terminal may, but is not limited to, wake up the health monitoring device to be activated through near field communication.
[0173] S28. After the activated health monitoring device is awakened, a Bluetooth data packet is sent outward.
[0174] In this step, after the activated health monitoring device is awakened by the designated mobile terminal, it continues to send Bluetooth broadcast data packets within a set time period, wherein the set time period can be set according to needs, and the embodiment of the present application does not limit this.
[0175] S29. The base station receives a Bluetooth data packet sent by the health monitoring device to be activated, and obtains identification information of the health monitoring device to be activated from the health monitoring device to be activated.
[0176] In specific implementation, the identification information of the health monitoring device can be the MAC address (Media Access Control Address, physical address) information used for Bluetooth interaction. The base station receives the Bluetooth data packet sent by the health monitoring device to be activated, and reads the MAC address information of the health monitoring device to be activated from the health monitoring device to be activated.
[0177] S210. The base station sends identification information of the health monitoring device to be activated to the server.
[0178] During specific implementation, the base station sends the MAC address information of the health monitoring device to be activated to the server.
[0179] S211. The server verifies the identification information of the health monitoring device to be activated. After the verification is passed, step S212 is executed. If the verification fails, the health monitoring device to be activated is determined to be invalid, and a verification failure message is returned to the base station.
[0180] During the specific implementation, the server pre-stores the identification information (i.e. MAC address information) and the validity period information of the health monitoring device. When the server receives the MAC address information of the health monitoring device to be activated sent by the base station, it checks whether the MAC address information of the health monitoring device to be activated is stored locally. If so, and the current time is within the validity period of the health monitoring device to be activated, the verification passes.
[0181] S212. The server returns the authentication information of the health monitoring device to be activated to the base station.
[0182] In specific implementation, when the health monitoring device leaves the factory, the manufacturer sets a set of key sets for each health monitoring device. The key set includes multiple keys and key identifiers corresponding to each key. The server stores the key set of each health monitoring device as authentication information.
[0183] After the server verifies the identification information of the health monitoring device to be activated, it returns a key set corresponding to the health monitoring device to be activated to the base station. The key set includes each key and key identification corresponding to the health monitoring device to be activated.
[0184] S213. The base station performs bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and executes step S214 after the authentication is successful. If the authentication fails, the base station returns authentication failure information to the server.
[0185] In specific implementation, the base station and the health monitoring device to be activated can be as follows: Figure 3 The process shown in the figure performs two-way authentication, which may include the following steps:
[0186] S2131. The base station generates a first public key and a first private key according to a preset key negotiation algorithm.
[0187] During specific implementation, the base station can generate a public key and a corresponding private key according to the ECDH (Elliptic Curve Diffie-Hellman keyExchange) key negotiation algorithm, which can be respectively recorded as the first public key and the first private key, or use any other key negotiation algorithm to generate the first public key and the first private key. The embodiment of the present application is not limited to this. The embodiment of the present application only takes the ECDH key negotiation algorithm as an example for illustration.
[0188] S2132. The base station selects any first key from the key set in the authentication information of the health monitoring device to be activated, and generates first signature information using a hash algorithm according to the selected first key, the first time information and the first public key.
[0189] During specific implementation, after the base station receives the authentication information of the health monitoring device to be activated returned by the server, it selects any one key from the key set of the health monitoring device to be activated contained in the authentication information of the health monitoring device to be activated, which can be recorded as the first key, and uses a hash algorithm to sign and generate signature information based on the first key, the first time information and the first public key, which can be recorded as the first signature information, wherein the first time information can be the current time information.
[0190] S2133. The base station sends a first authentication request to the health monitoring device to be activated, where the first authentication request carries identification information of a first key, first time information, a first public key, and first signature information.
[0191] S2134. The health monitoring device to be activated generates second signature information using a hash algorithm according to the key corresponding to the identifier of the first key, the first time information and the first public key, and verifies whether the second signature information is consistent with the first signature information. If it is determined that the second signature information is consistent with the first signature information, execute step S2135; otherwise, the verification fails and returns verification failure information to the base station.
[0192] During specific implementation, the health monitoring device to be activated searches for a key corresponding to the identifier of the first key in a locally stored key set according to the identifier of the first key sent by the base station, generates second signature information using a hash algorithm according to the found key, the first time information sent by the base station, and the first public key, and verifies whether the second signature information is consistent with the first signature information sent by the base station. If it is determined that the second signature information is consistent with the first signature information, then the one-way authentication is successful. If it is determined that the second signature information is inconsistent with the first signature information, then the authentication fails, and the authentication failure information is returned to the base station. The base station reports the authentication failure information with the health monitoring device to be activated to the server.
[0193] S2135. The health monitoring device to be activated generates a second public key and a second private key according to a preset key negotiation algorithm, and generates third signature information using a hash algorithm according to the selected second key, the second time information and the second public key.
[0194] During specific implementation, the health monitoring device to be activated generates a public key and a corresponding private key according to the ECDH key agreement algorithm, which can be recorded as the second public key and the second private key respectively. The health monitoring device to be activated selects any key from the locally stored key set, which can be recorded as the second key, and generates third signature information using a hash algorithm based on the selected second key, the second time information and the second public key, wherein the second time information can be the current time information.
[0195] S2136. The health monitoring device to be activated sends a second authentication request to the base station, where the second authentication request carries identification information of the second key, second time information, a second public key, and third signature information.
[0196] S2137. The base station generates fourth signature information using a hash algorithm according to the key corresponding to the identifier of the second key, the second time information, and the second public key. If it is determined that the fourth signature information is consistent with the third signature information, the authentication is determined to be successful.
[0197] During specific implementation, the base station searches for a key corresponding to the identifier of the second key from the key set of the health monitoring device to be activated contained in the authentication information of the health monitoring device to be activated returned by the server, generates fourth signature information using a hash algorithm based on the key corresponding to the identifier of the found second key, the second time information sent by the base station, and the second public key, and verifies whether the fourth signature information is consistent with the third signature information sent by the health monitoring device to be activated. If it is determined that the fourth signature information is consistent with the third signature information, it is determined that the two-way authentication between the base station and the health monitoring device to be activated is successful. If it is determined that the fourth signature information is inconsistent with the third signature information, it is determined that the authentication has failed, and the authentication failure information with the health monitoring device to be activated is returned to the server.
[0198] S214. The base station activates the health monitoring device to be activated.
[0199] In specific implementation, after the base station and the health monitoring device to be activated are successfully bidirectionally authenticated, the base station receives the Bluetooth data packet sent by the health monitoring device to be activated, connects with the health monitoring device to be activated, and activates the health monitoring device to be activated.
[0200] S215. The activated health monitoring device returns activation success information to the base station.
[0201] In this step, after being activated, the health monitoring device to be activated returns activation success information to the base station.
[0202] S216. The base station reports the activation success information of the health monitoring device to the server.
[0203] In this step, the base station reports the activation success information of the activated health monitoring device to the server.
[0204] S217: The server updates the status of the health monitoring device to an activated status.
[0205] In this step, the server updates the status of the activated health monitoring device to an activated status and saves it.
[0206] In one embodiment, after waking up the health monitoring device to be activated, the designated mobile terminal can also send the MAC address information of the health monitoring device to be activated to the server and subscribe to the information of the health monitoring device to be activated. After the server receives the activation success information of the health monitoring device, it can also push the activation success information of the health monitoring device to the designated mobile terminal, so that the designated mobile terminal can record the status of the health monitoring device, so that medical staff and other personnel can view the status of the health monitoring device through the designated mobile terminal.
[0207] S218. The server returns an upload result notification to the base station.
[0208] Thus, the activation process of the health monitoring device is completed.
[0209] In one implementation, the health monitoring device may be awakened by a designated mobile terminal, and after the health monitoring device is activated, the health monitoring data reported by the health monitoring device may be uploaded to the server through the base station.
[0210] Among them, the implementation process of the mobile terminal activating the health monitoring device is as follows: Figure 4 As shown, this stage involves interaction between the specified mobile terminal, the health monitoring device and the server, and may include the following steps:
[0211] S31. The designated mobile terminal sends a login request to the server, where the login request includes login information.
[0212] Among them, the login information may include a user name and password, and the login information may also include a mobile phone number and a verification code, which is not limited in the embodiments of the present application.
[0213] S32. The server verifies the login information of the designated mobile terminal. If the verification is successful, step S33 is executed. Otherwise, a login failure message is returned to the designated mobile terminal.
[0214] The server pre-stores the login information when the mobile terminal registers: user name and password, or mobile phone number. When a login request sent by a designated mobile terminal is received, if the login request contains a user name and password, the user name and password in the login request are compared with the user name and password stored in the mobile terminal. If they are consistent, the verification passes. If the login request contains the mobile phone number used by the user when registering, a verification code is sent to the mobile phone number. If the verification code in the received login request is consistent with the verification code sent by the server, the verification passes and the designated mobile terminal successfully logs in to the server.
[0215] S33. The server returns access token information to the designated mobile terminal.
[0216] In specific implementation, when the server verifies the login information of the designated mobile terminal, it generates a corresponding access token for the designated mobile terminal, stores the corresponding relationship between the identifier of the designated mobile terminal and the access token, and returns the access token information to the designated mobile terminal. In this way, when the designated mobile terminal subsequently sends data to the server, it can carry the access token. The server searches for the access token corresponding to the identifier of the designated mobile terminal from the stored corresponding relationship between the identifier of the mobile terminal and the access token to verify the access token sent by the designated mobile terminal. If the two are consistent, the verification is passed, thereby improving the security of data transmission between the designated mobile terminal and the server.
[0217] S34. The designated mobile terminal wakes up the health monitoring device to be activated and obtains identification information of the health monitoring device to be activated.
[0218] During specific implementation, the designated mobile terminal may, but is not limited to, wake up the health monitoring device to be activated through near field communication, and read the MAC address information of the health monitoring device from the health monitoring device to be activated.
[0219] S35, after the activated health monitoring device is awakened, a Bluetooth data packet is sent outward.
[0220] In this step, after the activated health monitoring device is awakened by the designated mobile terminal, it continues to send Bluetooth broadcast data packets within a set time period, wherein the set time period can be set according to needs, and the embodiment of the present application does not limit this.
[0221] S36. The designated mobile terminal receives the Bluetooth data packet sent by the health monitoring device to be activated, and connects to the health monitoring device to be activated.
[0222] During specific implementation, the designated mobile terminal receives a Bluetooth data packet sent by the health monitoring device to be activated, and establishes a Bluetooth connection with the health monitoring device to be activated.
[0223] S37. The designated mobile terminal sends the identification information of the health monitoring device to be activated to the server.
[0224] During specific implementation, the designated mobile terminal sends the MAC address information of the health monitoring device to be activated to the server.
[0225] S38. The server verifies the identification information of the health monitoring device to be activated. After the verification is passed, step S39 is executed. If the verification fails, the health monitoring device to be activated is determined to be invalid, and a verification failure message is returned to the designated mobile terminal.
[0226] During the specific implementation, the server pre-stores the identification information (i.e. MAC address information) and the validity period information of the health monitoring device. When the server receives the MAC address information of the health monitoring device to be activated sent by the base station, it checks whether the MAC address information of the health monitoring device to be activated is stored locally. If so, and the current time is within the validity period of the health monitoring device to be activated, the verification passes.
[0227] S39. The server returns the authentication information of the health monitoring device to be activated to the designated mobile terminal.
[0228] In specific implementation, when the health monitoring device leaves the factory, the manufacturer sets a set of key sets for each health monitoring device. The key set includes multiple keys and key identifiers corresponding to each key. The server stores the key set of each health monitoring device as authentication information.
[0229] After the server verifies the identification information of the health monitoring device to be activated, it returns a key set corresponding to the health monitoring device to be activated to the base station. The key set includes each key and key identification corresponding to the health monitoring device to be activated.
[0230] S310, the designated mobile terminal performs two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and executes step S214 after the authentication is successful. If the authentication fails, the authentication failure information is returned to the server.
[0231] In specific implementation, the designated mobile terminal and the health monitoring device to be activated can be as follows: Figure 5 The process shown in the figure performs two-way authentication, which may include the following steps:
[0232] S3101. Specify a mobile terminal to generate a third public key and a third private key according to a preset key agreement algorithm.
[0233] During specific implementation, the designated mobile terminal can generate a public key and a corresponding private key according to the ECDH key agreement algorithm, which can be respectively recorded as the third public key and the third private key. It can also use any other key agreement algorithm to generate the third public key and the third private key. The embodiment of the present application is not limited to this. The embodiment of the present application only takes the ECDH key agreement algorithm as an example for illustration.
[0234] S3102. The designated mobile terminal selects any third key from the key set in the authentication information of the health monitoring device to be activated, and generates fifth signature information using a hash algorithm according to the selected third key, third time information and third public key.
[0235] During specific implementation, after the designated mobile terminal receives the authentication information of the health monitoring device to be activated returned by the server, any one key is selected from the key set of the health monitoring device to be activated contained in the authentication information of the health monitoring device to be activated, which can be recorded as the third key. The signature information is generated by signing using a hash algorithm based on the third key, the third time information and the third public key, which can be recorded as the fifth signature information, wherein the third time information can be the current time information.
[0236] S3103. The designated mobile terminal sends a third authentication request to the health monitoring device to be activated. The third authentication request carries identification information of a third key, third time information, a third public key, and fifth signature information.
[0237] S3104. The health monitoring device to be activated generates sixth signature information using a hash algorithm according to the key corresponding to the identifier of the third key, the third time information and the third public key, and verifies whether the sixth signature information is consistent with the fifth signature information. If it is determined that the sixth signature information is consistent with the fifth signature information, execute step S3105; otherwise, the verification fails and returns verification failure information to the base station.
[0238] During specific implementation, the health monitoring device to be activated searches for a key corresponding to the identifier of the third key in a locally stored key set according to the identifier of the third key sent by the designated mobile terminal, generates sixth signature information using a hash algorithm according to the found key, the third time information sent by the designated mobile terminal, and the third public key, and verifies whether the sixth signature information is consistent with the fifth signature information sent by the base station. If it is determined that the sixth signature information is consistent with the fifth signature information, it is determined that the one-way authentication is successful. If it is determined that the sixth signature information is inconsistent with the fifth signature information, it is determined that the authentication has failed, and the authentication failure information is returned to the designated mobile terminal. The designated mobile terminal reports the authentication failure information with the health monitoring device to be activated to the server.
[0239] S3105. The health monitoring device to be activated generates a fourth public key and a fourth private key according to a preset key negotiation algorithm, and generates seventh signature information using a hash algorithm according to the selected fourth key, fourth time information and fourth public key.
[0240] During specific implementation, the health monitoring device to be activated generates a public key and a corresponding private key according to the ECDH key agreement algorithm, which can be recorded as the fourth public key and the fourth private key respectively. The health monitoring device to be activated selects any key from the locally stored key set, which can be recorded as the fourth key, and generates the seventh signature information using the hash algorithm according to the selected fourth key, fourth time information and fourth public key, wherein the fourth time information can be the current time information.
[0241] S3106. The health monitoring device to be activated sends a fourth authentication request to the designated mobile terminal. The fourth authentication request carries identification information of a fourth key, fourth time information, a fourth public key and seventh signature information.
[0242] S3107. The designated mobile terminal generates eighth signature information using a hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information and the fourth public key. If it is determined that the eighth signature information is consistent with the seventh signature information, the authentication is determined to be successful.
[0243] During specific implementation, the designated mobile terminal searches for a key corresponding to the identifier of the fourth key from the key set of the health monitoring device to be activated contained in the authentication information of the health monitoring device to be activated returned from the server, generates eighth signature information using a hash algorithm based on the key corresponding to the identifier of the fourth key found, the fourth time information sent by the health monitoring device to be activated, and the fourth public key, and verifies whether the eighth signature information is consistent with the seventh signature information sent by the health monitoring device to be activated. If it is determined that the eighth signature information is consistent with the seventh signature information, it is determined that the two-way authentication between the designated mobile terminal and the health monitoring device to be activated is successful. If it is determined that the eighth signature information is inconsistent with the seventh signature information, it is determined that the authentication has failed, and the authentication failure information with the health monitoring device to be activated is returned to the server.
[0244] S311. Designate a mobile terminal to activate the health monitoring device to be activated.
[0245] In specific implementation, after the designated mobile terminal and the health monitoring device to be activated are successfully bidirectionally authenticated, the designated mobile terminal receives the Bluetooth data packet sent by the health monitoring device to be activated, establishes a Bluetooth connection with the health monitoring device to be activated, and activates the health monitoring device to be activated.
[0246] S312: The activated health monitoring device returns activation success information to the designated mobile terminal.
[0247] In this step, after being activated, the health monitoring device to be activated returns activation success information to the designated mobile terminal.
[0248] S313. The designated mobile terminal reports activation success information of the health monitoring device to the server.
[0249] In this step, the designated mobile terminal reports the activation success information of the activated health monitoring device to the server.
[0250] S314. The server updates the status of the health monitoring device to an activated status.
[0251] In this step, the server updates the status of the activated health monitoring device to an activated status and saves it.
[0252] S315. The server returns an upload result notification to the designated mobile terminal.
[0253] S316: The designated mobile terminal disconnects the Bluetooth connection with the activated health monitoring device.
[0254] Then, the health monitoring device returns a successful disconnection notification to the designated mobile terminal, thus completing the activation process of the health monitoring device.
[0255] The disconnected state of health monitoring equipment can be used in the following two scenarios:
[0256] One application scenario of the disconnected state of the health monitoring device is: after the health monitoring device is activated, it is not connected to any base station to upload the health monitoring data of the monitored object and is in a disconnected state; another application scenario of the disconnected state of the health monitoring device is: the health monitoring device is connected to the base station and uploads the health monitoring data of the monitored object to the base station, but the position of the monitored object wearing the health monitoring device moves and is disconnected from the currently connected base station, and is in a disconnected state, such as Figure 6 In the application scenario shown, health monitoring device 1, health monitoring device 2, health monitoring device 3 and health monitoring device 4 are connected to base station 1, and upload their respective health monitoring data to the server through base station 1. The monitored object wearing health monitoring device 4 moves from the area covered by base station 1 to the area covered by base station 2, thereby disconnecting from base station 1.
[0257] Based on the disconnected state of the above two health monitoring devices, the health monitoring device can continuously send out Bluetooth data packets to connect to the best nearby connectable base station, and upload the health monitoring data of the monitored object to the base station.
[0258] like Figure 7 As shown, it is a schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application, which may include the following steps:
[0259] S41. The base station obtains association information of candidate health monitoring devices to be connected that can be connected within its coverage area.
[0260] During specific implementation, the base station receives the associated information of the candidate health monitoring device to be connected sent by the candidate health monitoring device to be connected within its coverage range via Bluetooth, wherein the associated information of the candidate health monitoring device to be connected may include but is not limited to the following information: identification information of the candidate health monitoring device to be connected, signal strength information between the candidate health monitoring device to be connected and the base station, wherein the signal strength information between the candidate health monitoring device to be connected and the base station may be but is not limited to an RSSI (Received Signal Strength Indication) indicator.
[0261] In one embodiment, the association information of the candidate health monitoring device to be connected may also include the service quality capability information of the candidate health monitoring device to be connected, wherein the service quality capability information may include the manufacturer information of the candidate health monitoring device to be connected, the model information of the health monitoring device to be connected, and other information, which is not limited to this embodiment of the present application.
[0262] S42. The base station sends the associated information of the candidate health monitoring device to be connected to the server.
[0263] During implementation, if the base station is interacting with the server for the first time, the base station will send the association information of the candidate health monitoring device to be connected to the server after logging into the server.
[0264] The specific process of the base station logging into the server can be referred to steps S21 to S23, which will not be repeated here.
[0265] S43. The server determines whether the connection condition is met based on the associated information of the candidate health monitoring device to be connected and the status of the candidate health monitoring device to be connected. If it is determined that the connection condition is met, step S44 is executed; otherwise, a notification message is returned to the base station that the candidate health monitoring device to be connected does not meet the connection condition.
[0266] In a specific implementation, in one embodiment, it can be determined that the candidate health monitoring device to be connected meets the connection condition in the following manner:
[0267] The server searches for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected. If it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection from the first base station to which it was last connected, it is determined that the connection condition is met.
[0268] Specifically, when any health monitoring device successfully connects to any base station to upload health monitoring data, after the health monitoring device is disconnected from the base station, the base station uploads the signal strength (i.e., RSSI indicator) between the health monitoring device and the base station at the time of disconnection to the server, and the server stores the signal strength and disconnection time information between the health monitoring device and the base station.
[0269] During implementation, when the server receives the association information of the candidate health monitoring device to be connected sent by the base station, the server can search whether the status of the candidate health monitoring device to be connected is activated according to the identifier of the candidate health monitoring device to be connected, and compare the RSSI index between the candidate health monitoring device to be connected and the base station at the current moment, and the RSSI index between the candidate health monitoring device to be connected and the first base station at the time of disconnection from the last connected first base station. If it is determined that the status of the candidate health monitoring device to be connected is activated, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the time of disconnection from the last connected first base station, it is determined that the candidate health monitoring device to be connected meets the connection conditions.
[0270] Alternatively, you can also determine whether the connection conditions are met in the following ways:
[0271] The server searches for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected. If it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0272] Specifically, the server can search whether the status of the candidate health monitoring device to be connected is an activated state according to the identification of the candidate health monitoring device to be connected, and compare the RSSI index between the candidate health monitoring device to be connected and the base station at the current moment, and the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station. If it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the candidate health monitoring device to be connected meets the connection conditions.
[0273] In one implementation, the server may also store information that can measure the service quality capabilities of the health monitoring device, such as set manufacturer information, set model information of the health monitoring device, and the like. The embodiment of the present application may also determine whether the connection conditions are met in the following manner:
[0274] The server searches for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected. If it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the manufacturer of the candidate health monitoring device to be connected is the set manufacturer (or the model of the candidate health monitoring device to be connected is the set model), and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection from the first base station to which it was last connected, it is determined that the connection condition is met.
[0275] Alternatively, you can also determine whether the connection conditions are met in the following ways:
[0276] The server searches for the status of the candidate health monitoring device to be connected based on the identification of the candidate health monitoring device to be connected. If it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the manufacturer of the candidate health monitoring device to be connected is the set manufacturer (or the model of the candidate health monitoring device to be connected is the set model), and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0277] S44. The server returns a message to the base station indicating connection with the candidate health monitoring device to be connected, where the message indicating connection with the candidate health monitoring device to be connected includes authentication information of the candidate health monitoring device to be connected.
[0278] During the transmission of health monitoring data of the monitored object collected by the health monitoring device, if the health monitoring data is leaked or tampered with, it may cause serious impact on the life, property and health of the monitored object. In order to improve the security of data transmission, before the base station establishes a connection with the candidate health monitoring device to be connected that meets the connection conditions, the base station and the candidate health monitoring device to be connected can first perform two-way authentication and generate a shared key. The shared key is used for encrypted transmission during the subsequent transmission of the health monitoring data.
[0279] In a specific implementation, the authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set of the candidate health monitoring device to be connected includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
[0280] S45. The base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information of the candidate health monitoring device to be connected.
[0281] In specific implementation, the base station and the candidate health monitoring device to be connected can be as follows: Figure 8 The process shown in the figure performs two-way authentication, which may include the following steps:
[0282] S451. The base station generates a fifth public key and a fifth private key according to a preset key negotiation algorithm.
[0283] During specific implementation, the base station can generate a public key and a corresponding private key based on the ECDH key negotiation algorithm, which can be recorded as the fifth public key and the fifth private key respectively. It can also use any other key negotiation algorithm to generate the fifth public key and the fifth private key. The embodiment of the present application is not limited to this. The embodiment of the present application only takes the ECDH key negotiation algorithm as an example for illustration.
[0284] S452: The base station selects any fifth key from the key set in the authentication information of the candidate health monitoring device to be connected, and generates ninth signature information using a hash algorithm according to the selected fifth key, fifth time information and fifth public key.
[0285] During specific implementation, after the base station receives the authentication information of the candidate health monitoring device to be connected returned by the server, it selects any one key from the key set of the candidate health monitoring device to be connected contained in the authentication information of the candidate health monitoring device to be connected, which can be recorded as the fifth key, and uses a hash algorithm to sign according to the fifth key, the fifth time information and the fifth public key to generate signature information, which can be recorded as the ninth signature information, where the fifth time information can be the current time information.
[0286] S453. The base station sends a fifth authentication request to the candidate health monitoring device to be connected. The fifth authentication request carries identification information of a fifth key, fifth time information, a fifth public key, and ninth signature information.
[0287] S454. The candidate health monitoring device to be connected generates the tenth signature information using a hash algorithm according to the key corresponding to the identifier of the fifth key, the fifth time information and the fifth public key, and verifies whether the tenth signature information is consistent with the ninth signature information. If it is determined that the tenth signature information is consistent with the ninth signature information, execute step S455; otherwise, the verification fails and returns verification failure information to the base station.
[0288] During specific implementation, the candidate health monitoring device to be connected searches for the key corresponding to the identifier of the fifth key in the locally stored key set according to the identifier of the fifth key sent by the base station, generates the tenth signature information by using a hash algorithm according to the found key, the fifth time information sent by the base station, and the fifth public key, and verifies whether the tenth signature information is consistent with the ninth signature information sent by the base station. If it is determined that the tenth signature information is consistent with the ninth signature information, it is determined that the one-way authentication is successful. If it is determined that the tenth signature information is inconsistent with the ninth signature information, it is determined that the authentication has failed, and the authentication failure information is returned to the base station. The base station reports the authentication failure information with the candidate health monitoring device to be connected to the server.
[0289] S455. The candidate health monitoring device to be connected generates a sixth public key and a sixth private key according to a preset key agreement algorithm, and generates an eleventh signature information using a hash algorithm according to the selected sixth key, the sixth time information and the sixth public key.
[0290] During specific implementation, the candidate health monitoring device to be connected generates a public key and a corresponding private key according to the ECDH key agreement algorithm, which can be recorded as the sixth public key and the sixth private key respectively. The candidate health monitoring device to be connected selects any one key from the locally stored key set, which can be recorded as the sixth key. The eleventh signature information is generated using a hash algorithm based on the selected sixth key, the sixth time information and the sixth public key, where the sixth time information can be the current time information.
[0291] S456. The candidate health monitoring device to be connected sends a sixth authentication request to the base station, where the sixth authentication request carries identification information of a sixth key, sixth time information, a sixth public key, and an eleventh signature information.
[0292] S457. The base station generates twelfth signature information using a hash algorithm according to the key corresponding to the identifier of the sixth key, the sixth time information and the sixth public key. If it is determined that the twelfth signature information is consistent with the eleventh signature information, it is determined that the authentication is successful.
[0293] During specific implementation, the base station searches for the key corresponding to the identifier of the sixth key from the key set of the candidate health monitoring device to be connected contained in the authentication information of the candidate health monitoring device to be connected returned by the server, and generates the twelfth signature information using a hash algorithm according to the key corresponding to the identifier of the found sixth key, the fourth time information sent by the candidate health monitoring device to be connected, and the fourth public key, and verifies whether the twelfth signature information is consistent with the eleventh signature information sent by the candidate health monitoring device to be connected. If it is determined that the twelfth signature information is consistent with the eleventh signature information, it is determined that the two-way authentication between the base station and the candidate health monitoring device to be connected is successful. If it is determined that the twelfth signature information is inconsistent with the eleventh signature information, it is determined that the authentication has failed, and the base station returns the authentication failure information with the candidate health monitoring device to be connected to the server.
[0294] Furthermore, if it is determined that the two-way authentication is successful, the following may also be included:
[0295] The candidate health monitoring device to be connected and the base station generate a shared key based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key using a preset key negotiation algorithm, and send the shared key to the server, which stores the correspondence between the identification information of the health monitoring device and the shared key.
[0296] In specific implementation, after the base station and the candidate health monitoring device to be connected have successfully undergone two-way authentication, the base station and the candidate health monitoring device to be connected also use the ECDH key agreement algorithm to generate a shared key based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key.
[0297] Specifically, the base station generates a key based on the fifth public key, the sixth private key and the ECDH key negotiation algorithm, and the candidate health monitoring device to be connected generates a key based on the sixth public key, the fifth private key and the ECDH key negotiation algorithm. The two keys are the same, namely, the shared key. Then, the base station sends the shared key to the server. After receiving the shared key sent by the base station, the server stores the correspondence between the identification information of the candidate health monitoring device to be connected (that is, the MAC address information of the health monitoring device to be activated) and the shared key.
[0298] S46. After the two-way authentication is successful, the base station connects to the candidate health monitoring device to be connected.
[0299] In this step, after the base station and the candidate health monitoring device to be connected have successfully undergone two-way authentication, a Bluetooth connection is established.
[0300] S47. After the health monitoring device is successfully connected to the base station, a connection success message is returned to the base station.
[0301] S48. The health monitoring device reports the collected health monitoring data to the base station.
[0302] In a specific implementation, the health monitoring device encrypts the real-time collected health monitoring data according to the shared key and preset encryption algorithm negotiated with the base station to generate encrypted health monitoring data, and sends the encrypted health monitoring data to the base station. Among them, the preset encryption algorithm can be, but is not limited to, a symmetric encryption algorithm, such as the AES (Advanced Encryption Standard) encryption algorithm, which is not limited in the embodiment of the present application.
[0303] S49. The base station sends the health monitoring data uploaded by the health monitoring device to the server.
[0304] During specific implementation, the base station receives the encrypted health monitoring data uploaded by the health monitoring device, and uploads the encrypted health monitoring data to the server.
[0305] When the base station receives the encrypted health monitoring data uploaded by the health monitoring device, it can also use the shared key negotiated with the health monitoring device to decrypt it based on the preset encryption algorithm, and perform certain processing on the decrypted health monitoring data, such as processing the format of the health monitoring data into a data format supported by the server, and then encrypting the processed health monitoring data according to the shared key and the preset encryption algorithm and uploading it to the server.
[0306] S410. The server stores the health monitoring data uploaded by the base station.
[0307] In specific implementation, the encrypted health monitoring data uploaded by the base station to the server also includes the identification information of the health monitoring device. The server searches for the corresponding shared key based on the identification of the health monitoring device, decrypts the encrypted health monitoring data based on the shared key, and stores the decrypted health monitoring data.
[0308] S411. The server returns a notification of successful data upload to the base station.
[0309] Therefore, after the health monitoring data is uploaded to the server, medical staff can use a designated mobile terminal to log in to the server to view and download the health monitoring data of the monitored object in real time, thereby realizing real-time viewing and monitoring of the health monitoring data.
[0310] The data transmission method provided in the embodiment of the present application activates the health monitoring device by specifying a mobile terminal or a base station. When the health monitoring device is successfully activated, the activation success information of the health monitoring device is sent to the server. The server marks the status of the health monitoring device as an activated status. The base station detects the monitoring device to be connected that can be connected within its coverage area, and uses the monitoring device to be connected as a candidate health monitoring device to be connected. The associated information of the candidate health monitoring device to be connected is sent to the server. If the server determines that the connection condition is met based on the associated information of the candidate health monitoring device to be connected and the status of the candidate health monitoring device to be connected, a message indicating the connection of the candidate health monitoring device to be connected is returned to the base station. The base station connects with the candidate health monitoring device to be connected, and the base station sends the health monitoring data obtained from each health monitoring device connected to it to the server. In the embodiment of the present application, there is no need to use the mobile terminal of the monitored object to activate the health monitoring device and upload the health monitoring data monitored by the health monitoring device to the server. Instead, a designated mobile terminal (such as a medical device) is used. The health monitoring device is activated by a mobile terminal of a health care worker, or an independent mobile terminal) or a base station, and the base station detects the candidate health monitoring devices to be connected that can be connected within its coverage range. The server determines whether the candidate health monitoring devices to be connected meet the connection conditions, and the base station connects to the candidate health monitoring devices to be connected that meet the connection conditions. The base station can upload the health monitoring data obtained from the health monitoring device to the server in real time. In this way, the problem of being unable to complete the activation of the health monitoring device and the uploading of the health monitoring data due to the monitored object not having a mobile phone or other mobile terminal, or not being able to operate the health monitoring application in its mobile terminal is avoided. In addition, the base station provided by the embodiment of the present application can detect the health monitoring devices that can be connected within its coverage range in real time. When the position of the monitored object wearing the health monitoring device moves and the health monitoring device is disconnected from the connected base station, it will be detected in time by the base station that can cover the current position of the health monitoring device, thereby connecting to the qualified base station and continuing to complete the real-time uploading of the health monitoring data.
[0311] Based on the same inventive concept, an embodiment of the present application also provides a data transmission method implemented on the server side. Since the principle of solving the problem by the data transmission method implemented on the server side is similar to that of the data transmission method, the implementation of the data transmission method implemented on the server side can refer to the implementation of the data transmission method, and the repeated parts will not be repeated.
[0312] like Fig. 9 As shown, it is a schematic diagram of the implementation flow of the data transmission method implemented by the server side provided in an embodiment of the present application, which may include the following steps:
[0313] S51. The server receives activation success information of the health monitoring device and marks the status of the health monitoring device as an activated status. The activation success information of the health monitoring device is sent by the health monitoring device after the designated mobile terminal activates the health monitoring device, or is sent by the base station after the health monitoring device is activated.
[0314] S52: Receive association information of a candidate health monitoring device to be connected sent by the base station, where the candidate health monitoring device to be connected is a health monitoring device to be connected that is detected by the base station and is connectable within its coverage.
[0315] S53. If the connection condition is determined to be met based on the association information of the candidate health monitoring device to be connected and the status of the candidate health monitoring device to be connected, a message indicating connection to the candidate health monitoring device to be connected is returned to the base station so that the base station is connected to the candidate health monitoring device to be connected.
[0316] S54: Receive health monitoring data sent by the base station and obtained from each health monitoring device connected to the base station.
[0317] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0318] Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes:
[0319] Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected;
[0320] If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection of the candidate health monitoring device to be connected with the first base station when it was last connected to it, it is determined that the connection condition is met.
[0321] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0322] Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes:
[0323] Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected;
[0324] If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0325] In one embodiment, the message indicating the connection to the candidate health monitoring device to be connected includes the authentication information of the candidate health monitoring device to be connected, so that the base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information and connect after successful authentication.
[0326] In one implementation, the authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
[0327] In one embodiment, before receiving the association information of the candidate health monitoring device to be connected sent by the base station, the method further includes:
[0328] receiving a login request sent by the base station, wherein the login request includes identification information and login key information of the base station;
[0329] The identification information and login key information of the base station are verified, and if it is determined that the verification passes, the login token information is returned to the base station, so that the base station carries the login token information when sending data.
[0330] Based on the same inventive concept, an embodiment of the present application also provides a data transmission device implemented on the server side. Since the principle of solving the problem by the data transmission device implemented on the server side is similar to the above-mentioned data transmission method, the implementation of the data transmission device implemented on the server side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0331] like Fig.10 As shown, it is a structural diagram of a data transmission device implemented on the server side provided in an embodiment of the present application, which may include:
[0332] a first receiving unit 61, configured to receive activation success information of a health monitoring device, and mark the state of the health monitoring device as an activated state, wherein the activation success information of the health monitoring device is sent by the health monitoring device after the health monitoring device is activated by a designated mobile terminal, or is sent by a base station after the health monitoring device is activated;
[0333] A second receiving unit 62 is configured to receive association information of a candidate health monitoring device to be connected sent by the base station, wherein the candidate health monitoring device to be connected is a health monitoring device to be connected that is detected by the base station and can be connected within its coverage area;
[0334] a returning unit 63, configured to return a message indicating connection to the candidate health monitoring device to be connected to the base station if it is determined that the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected, so that the base station is connected to the candidate health monitoring device to be connected;
[0335] The third receiving unit 64 is configured to receive health monitoring data sent by the base station and acquired from each health monitoring device connected thereto.
[0336] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0337] The return unit 63 is specifically used to search for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; if it is determined that the status of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection from the first base station to which it was last connected, it is determined that the connection condition is met.
[0338] In one embodiment, the association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station;
[0339] The return unit 63 is specifically used to search for the state of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; if it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
[0340] In one embodiment, the message indicating the connection to the candidate health monitoring device to be connected includes the authentication information of the candidate health monitoring device to be connected, so that the base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information and connect after successful authentication.
[0341] In one implementation, the authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
[0342] In one embodiment, the device further comprises:
[0343] a fourth receiving unit, configured to receive a login request sent by the base station before receiving the association information of the candidate health monitoring device to be connected sent by the base station, wherein the login request includes identification information and login key information of the base station;
[0344] The verification unit is used to verify the identification information and login key information of the base station. If it is determined that the verification passes, the login token information is returned to the base station so that the base station carries the login token information when sending data.
[0345] Based on the same inventive concept, an embodiment of the present application also provides a data transmission method implemented on the base station side. Since the principle of solving the problem by the data transmission method implemented on the base station side is similar to that of the above-mentioned data transmission method, the implementation of the data transmission method implemented on the base station side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0346] like Fig.11 As shown, it is a schematic diagram of an implementation flow of a data transmission method implemented by a base station side provided in an embodiment of the present application, which may include the following steps:
[0347] S71. After activating the health monitoring device to be activated, the base station sends activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state.
[0348] S72. Send the detected association information of the candidate health monitoring device to be connected that is connectable within the coverage area to the server, so that the server determines whether the connection condition is met based on the association information of the candidate health monitoring device to be connected and the status of the candidate health monitoring device to be connected.
[0349] S73: When it is determined that a message indicating connection with the candidate health monitoring device to be connected is received from the server, a connection is established with the candidate health monitoring device to be connected.
[0350] S74: Receive health monitoring data reported by each connected health monitoring device, and send the health monitoring data reported by each health monitoring device to the server.
[0351] In one embodiment, the health monitoring device to be activated is activated in the following manner:
[0352] Receiving a Bluetooth broadcast data packet sent by the health monitoring device to be activated, where the Bluetooth broadcast data packet is sent after the health monitoring device to be activated is awakened by a designated mobile terminal;
[0353] Acquire identification information of the health monitoring device to be activated from the health monitoring device to be activated;
[0354] Sending the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification information of the health monitoring device to be activated;
[0355] receiving authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after verifying the identification information of the health monitoring device to be activated;
[0356] Perform bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and activate the health monitoring device to be activated after successful authentication.
[0357] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0358] Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes:
[0359] Generate a first public key and a first private key according to a preset key agreement algorithm;
[0360] Select any first key from the key set, and generate first signature information using a hash algorithm according to the selected first key, first time information and the first public key;
[0361] Sending a first authentication request to the health monitoring device to be activated, where the first authentication request carries identification information of the first key, the first time information, the first public key, and the first signature information, so that the health monitoring device to be activated generates second signature information using the hash algorithm according to the key corresponding to the identification of the first key, the first time information, and the first public key, to verify whether the second signature information is consistent with the first signature information;
[0362] receiving a second authentication request sent by the health monitoring device to be activated when determining that the second signature information is consistent with the first signature information, wherein the second authentication request carries identification information of a second key, second time information, a second public key, and third signature information, wherein the third signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected second key, the second time information, and the second public key, and the second public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm;
[0363] Generate fourth signature information by using the Hash algorithm according to the key corresponding to the identifier of the second key, the second time information, and the second public key;
[0364] If it is determined that the fourth signature information is consistent with the third signature information, then the authentication is determined to be successful.
[0365] Based on the same inventive concept, an embodiment of the present application also provides a data transmission device implemented on the base station side. Since the principle of solving the problem by the data transmission device implemented on the base station side is similar to the above-mentioned data transmission method, the implementation of the data transmission device implemented on the base station side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0366] like Fig.12 As shown, it is a structural schematic diagram of a data transmission device implemented on the base station side provided in an embodiment of the present application, which may include:
[0367] A first sending unit 81 is used to send activation success information of the health monitoring device to the server after activating the health monitoring device to be activated, so that the server marks the state of the health monitoring device as an activated state;
[0368] A second sending unit 82 is used to send the detected association information of the candidate health monitoring device to be connected that can be connected within the coverage area to the server, so that the server determines whether the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected;
[0369] The processing unit 83 is configured to connect to the candidate health monitoring device to be connected when it is determined that a message indicating that the candidate health monitoring device to be connected is received and returned by the server;
[0370] The third sending unit 84 is used to receive the health monitoring data reported by each connected health monitoring device, and send the health monitoring data reported by each health monitoring device to the server.
[0371] In one embodiment, the device further comprises:
[0372] An activation unit is used to activate the health monitoring device to be activated in the following manner: receiving a Bluetooth broadcast data packet sent by the health monitoring device to be activated, wherein the Bluetooth broadcast data packet is sent by the health monitoring device to be activated after being awakened by a designated mobile terminal; obtaining identification information of the health monitoring device to be activated from the health monitoring device to be activated; sending the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification information of the health monitoring device to be activated; receiving authentication information of the health monitoring device to be activated sent by the server, wherein the authentication information of the health monitoring device to be activated is sent by the server after the identification information of the health monitoring device to be activated is verified; performing two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and activating the health monitoring device to be activated after successful authentication.
[0373] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0374] The activation unit is specifically configured to generate a first public key and a first private key according to a preset key agreement algorithm; select any first key from the key set, and generate first signature information using a hash algorithm according to the selected first key, the first time information and the first public key; send a first authentication request to the health monitoring device to be activated, wherein the first authentication request carries the identification information of the first key, the first time information, the first public key and the first signature information, so that the health monitoring device to be activated generates second signature information using the hash algorithm according to the key corresponding to the identification of the first key, the first time information and the first public key, so as to verify whether the second signature information is consistent with the first signature information; receive the health monitoring device to be activated; The second authentication request sent by the activated health monitoring device when it is determined that the second signature information is consistent with the first signature information, the second authentication request carries the identification information of the second key, the second time information, the second public key and the third signature information, the third signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected second key, the second time information and the second public key, and the second public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm; the fourth signature information is generated using the hash algorithm according to the key corresponding to the identification of the second key, the second time information and the second public key; if it is determined that the fourth signature information is consistent with the third signature information, it is determined that the authentication is successful.
[0375] Based on the same inventive concept, an embodiment of the present application also provides a data transmission method implemented on a designated mobile terminal side. Since the principle of solving the problem by the data transmission method implemented on the designated mobile terminal side is similar to that of the above-mentioned data transmission method, the implementation of the data transmission method implemented on the designated mobile terminal side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0376] like Fig.13 As shown, it is a schematic diagram of an implementation flow of a data transmission method implemented on a designated mobile terminal side provided in an embodiment of the present application, which may include the following steps:
[0377] S91. Designate a mobile terminal to wake up the health monitoring device to be activated and obtain identification information of the health monitoring device to be activated.
[0378] S92. Send the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification of the health monitoring device to be activated.
[0379] S93. Receive authentication information of the health monitoring device to be activated sent by the server. The authentication information of the health monitoring device to be activated is sent by the server after the identification of the health monitoring device to be activated is verified.
[0380] S94: Perform bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and connect with the health monitoring device to be activated after successful authentication to activate the health monitoring device to be activated.
[0381] S95. Send activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state; and disconnect the connection with the health monitoring device.
[0382] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0383] Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes:
[0384] Generate a third public key and a third private key according to a preset key agreement algorithm;
[0385] Select any third key from the key set, and generate fifth signature information using a hash algorithm according to the selected third key, third time information and the third public key;
[0386] Sending a third authentication request to the health monitoring device to be activated, wherein the third authentication request carries the identification information of the third key, the third time information, the third public key, and the fifth signature information, so that the health monitoring device to be activated generates sixth signature information using the hash algorithm according to the key corresponding to the identification of the third key, the third time information, and the third public key, to verify whether the sixth signature information is consistent with the fifth signature information;
[0387] receiving a fourth authentication request sent by the health monitoring device to be activated when determining that the sixth signature information is consistent with the fifth signature information, the fourth authentication request carrying identification information of a fourth key, fourth time information, a fourth public key and seventh signature information, the seventh signature information being generated by the health monitoring device to be activated using the hash algorithm according to the selected fourth key, the fourth time information and the fourth public key, and the fourth public key being generated by the health monitoring device to be activated according to the preset key agreement algorithm;
[0388] Generate eighth signature information using the Hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information, and the fourth public key;
[0389] If it is determined that the eighth signature information is consistent with the seventh signature information, then it is determined that the authentication is successful.
[0390] In one embodiment, before sending the identification information of the health monitoring device to be activated to the server, the method further includes:
[0391] Sending a login request to the server, wherein the login request includes login information;
[0392] Receive access token information returned by the server, where the access token is generated by the server after successfully verifying the login information.
[0393] Based on the same inventive concept, an embodiment of the present application also provides a data transmission device implemented on a designated mobile terminal side. Since the principle of solving the problem by the data transmission device implemented on the designated mobile terminal side is similar to the above-mentioned data transmission method, the implementation of the data transmission device implemented on the designated mobile terminal side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0394] like Fig.14 As shown, it is a structural schematic diagram of a data transmission device implemented on a designated mobile terminal side provided in an embodiment of the present application, which may include:
[0395] A wake-up unit 101 is used to wake up the health monitoring device to be activated and obtain identification information of the health monitoring device to be activated;
[0396] A first sending unit 102 is used to send the identification information of the health monitoring device to be activated to a server, so that the server verifies the identification of the health monitoring device to be activated;
[0397] A first receiving unit 103 is used to receive the authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after the identification of the health monitoring device to be activated is verified;
[0398] The authentication unit 104 is used to perform two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and connect with the health monitoring device to be activated after successful authentication to activate the health monitoring device to be activated;
[0399] The second sending unit 105 is used to send activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state; and disconnect the connection with the health monitoring device.
[0400] In one embodiment, the authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated;
[0401] The authentication unit 104 is specifically configured to generate a third public key and a third private key according to a preset key agreement algorithm; select any third key from the key set, and generate fifth signature information using a hash algorithm according to the selected third key, third time information and the third public key; send a third authentication request to the health monitoring device to be activated, wherein the third authentication request carries the identification information of the third key, the third time information, the third public key and the fifth signature information, so that the health monitoring device to be activated generates sixth signature information using the hash algorithm according to the key corresponding to the identification of the third key, the third time information and the third public key, so as to verify whether the sixth signature information is consistent with the fifth signature information; receive the The fourth authentication request sent by the health monitoring device to be activated when it is determined that the sixth signature information is consistent with the fifth signature information, the fourth authentication request carries the identification information of the fourth key, the fourth time information, the fourth public key and the seventh signature information, the seventh signature information is generated by the health monitoring device to be activated according to the selected fourth key, the fourth time information and the fourth public key using the hash algorithm, and the fourth public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm; the eighth signature information is generated by the hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information and the fourth public key; if it is determined that the eighth signature information is consistent with the seventh signature information, it is determined that the authentication is successful.
[0402] In one embodiment, the device further comprises:
[0403] A third sending unit is used to send a login request to the server before sending the identification information of the health monitoring device to be activated to the server, wherein the login request includes login information;
[0404] The second receiving unit is used to receive access token information returned by the server, where the access token is generated by the server after successfully verifying the login information.
[0405] Based on the same inventive concept, an embodiment of the present application also provides a data transmission method implemented on the health monitoring device side. Since the principle of solving the problem by the data transmission method implemented on the health monitoring device side is similar to the above-mentioned data transmission method, the implementation of the data transmission method implemented on the health monitoring device side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0406] like Fig.15 As shown, it is a schematic diagram of the implementation flow of the data transmission method implemented on the health monitoring device side provided in the embodiment of the present application, which may include the following steps:
[0407] S111. The health monitoring device receives a request for obtaining identification information of the health monitoring device sent by a designated mobile terminal or a base station. The request for obtaining identification information of the health monitoring device is sent by the designated mobile terminal or the base station after the health monitoring device is awakened by the designated mobile terminal.
[0408] S112: Return identification information of the health monitoring device to the designated mobile terminal or base station, so that the designated mobile terminal or base station activates the health monitoring device according to the identification information of the health monitoring device.
[0409] S113. After being activated, the associated information of the health monitoring device is sent to the connectable base station, so that the base station sends the associated information of the health monitoring device to the server, and the server determines whether the connection condition is met based on the associated information of the health monitoring device and the status of the health monitoring device.
[0410] S114. After connecting to the base station, report the collected health monitoring data to the base station so that the base station sends the health monitoring data to the server, wherein the health monitoring device is connected to the base station after the base station receives a message returned by the server indicating the connection to the health monitoring device.
[0411] In one embodiment, the message indicating connection to the health monitoring device includes authentication information of the health monitoring device;
[0412] Before establishing a connection with the base station, the method further includes:
[0413] performing bidirectional authentication with the base station based on the authentication information of the health monitoring device;
[0414] Confirm that the two-way authentication is successful.
[0415] In one implementation, performing bidirectional authentication with the base station based on the authentication information of the health monitoring device specifically includes:
[0416] receiving a fifth authentication request sent by the base station, the fifth authentication request carrying identification information of a fifth key, fifth time information, a fifth public key, and ninth signature information, the fifth public key being generated by the base station according to a preset key agreement algorithm, the fifth key being selected by the base station from a key set in the authentication information of the health monitoring device returned by the server, and the ninth signature information being generated by the base station using a hash algorithm according to the fifth key, the fifth event information, and the fifth public key;
[0417] Generate tenth signature information using the Hash algorithm according to the key corresponding to the identifier of the fifth key, the fifth time information, and the fifth public key;
[0418] If it is determined that the tenth signature information is consistent with the ninth signature information, generating a sixth public key and a sixth private key according to the preset key agreement algorithm;
[0419] Select any sixth key from the locally stored key set, and generate an eleventh signature information using the Hash algorithm according to the selected sixth key, the sixth time information and the sixth public key;
[0420] The sixth authentication request sent to the base station carries the identification information of the sixth key, the sixth time information, the sixth public key and the eleventh signature information, so that the base station generates the twelfth signature information according to the key corresponding to the identification of the sixth key, the sixth time information and the sixth public key using the hash algorithm to verify whether the twelfth signature information is consistent with the eleventh signature information.
[0421] In one implementation, if it is determined that the two-way authentication is successful, the method further includes:
[0422] Generate a shared key with the base station using the preset key agreement algorithm based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key;
[0423] Sending the shared key to the server so that the server stores the corresponding relationship between the identification information of the health monitoring device and the shared key; and
[0424] Reporting the collected health monitoring data to the base station so that the base station sends the health monitoring data to the server specifically includes:
[0425] Encrypting the health monitoring data according to the shared key and a preset encryption algorithm to generate encrypted health monitoring data;
[0426] The encrypted health monitoring data is sent to the server, so that the server decrypts the encrypted health monitoring data according to the shared key.
[0427] Based on the same inventive concept, an embodiment of the present application also provides a data transmission device implemented on the health monitoring device side. Since the principle of solving the problem by the data transmission device implemented on the health monitoring device side is similar to the above-mentioned data transmission method, the implementation of the data transmission device implemented on the health monitoring device side can refer to the implementation of the above-mentioned data transmission method, and the repeated parts will not be repeated.
[0428] like Fig.16 As shown, it is a structural schematic diagram of a data transmission device implemented on the health monitoring device side provided by an embodiment of the present application, which may include:
[0429] A receiving unit 121 is configured to receive a request for obtaining identification information of a health monitoring device sent by a designated mobile terminal or a base station, where the request for obtaining identification information of the health monitoring device is sent by the designated mobile terminal or the base station after the health monitoring device is awakened by the designated mobile terminal;
[0430] A returning unit 122 is configured to return the identification information of the health monitoring device to the designated mobile terminal or the base station, so that the designated mobile terminal or the base station activates the health monitoring device according to the identification information of the health monitoring device;
[0431] A first sending unit 123 is configured to send the associated information of the health monitoring device to a connectable base station after being activated, so that the base station sends the associated information of the health monitoring device to the server, so that the server determines whether a connection condition is met based on the associated information of the health monitoring device and the state of the health monitoring device;
[0432] The reporting unit 124 is used to report the collected health monitoring data to the base station after connecting to the base station, so that the base station sends the health monitoring data to the server, wherein the health monitoring device is connected to the base station after the base station receives a message returned by the server indicating the connection to the health monitoring device.
[0433] In one embodiment, the message indicating connection to the health monitoring device includes authentication information of the health monitoring device;
[0434] The device further comprises:
[0435] an authentication unit, configured to perform a two-way authentication with the base station based on the authentication information of the health monitoring device before establishing a connection with the base station;
[0436] The determination unit is used to determine whether the two-way authentication is successful.
[0437] In one embodiment, the authentication unit is specifically used to receive a fifth authentication request sent by the base station, the fifth authentication request carrying identification information of a fifth key, fifth time information, a fifth public key and ninth signature information, the fifth public key is generated by the base station according to a preset key negotiation algorithm, the fifth key is selected by the base station from a key set in the authentication information of the health monitoring device returned by the server, and the ninth signature information is generated by the base station using a hash algorithm based on the fifth key, the fifth event information and the fifth public key; the tenth signature information is generated using the hash algorithm according to the key corresponding to the identification of the fifth key, the fifth time information and the fifth public key; if the tenth signature information is determined If the information is consistent with the ninth signature information, a sixth public key and a sixth private key are generated according to the preset key agreement algorithm; any sixth key is selected from the locally stored key set, and the eleventh signature information is generated by using the hash algorithm according to the selected sixth key, the sixth time information and the sixth public key; a sixth authentication request is sent to the base station, and the sixth authentication request carries the identification information of the sixth key, the sixth time information, the sixth public key and the eleventh signature information, so that the base station generates a twelfth signature information by using the hash algorithm according to the key corresponding to the identification of the sixth key, the sixth time information and the sixth public key, so as to verify whether the twelfth signature information is consistent with the eleventh signature information.
[0438] In one embodiment, it further includes:
[0439] a key negotiation unit, configured to, if it is determined that the two-way authentication is successful, generate a shared key with the base station using the preset key negotiation algorithm based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key;
[0440] A second sending unit, configured to send the shared key to the server, so that the server stores the corresponding relationship between the identification information of the health monitoring device and the shared key;
[0441] The reporting unit 124 is specifically used to encrypt the health monitoring data according to the shared key and a preset encryption algorithm to generate encrypted health monitoring data; and send the encrypted health monitoring data to the server so that the server decrypts the encrypted health monitoring data according to the shared key.
[0442] Based on the same technical concept, the present application embodiment also provides an electronic device 130, referring to Fig.17As shown, the electronic device 130 is used to implement the data transmission method recorded in the above method embodiment. The electronic device 130 of this embodiment may include: a memory 131, a processor 132, and a computer program stored in the memory and executable on the processor, such as a data transmission program. When the processor executes the computer program, the steps in the above data transmission method embodiments are implemented.
[0443] The specific connection medium between the memory 131 and the processor 132 is not limited in the embodiment of the present application. Fig.17 The memory 131 and the processor 132 are connected via a bus 133. Fig.17 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 133 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.17 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0444] The memory 131 may be a volatile memory, such as a random-access memory (RAM); the memory 131 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 131 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 131 may be a combination of the above memories.
[0445] The processor 132 is used to implement the data transmission method provided in the embodiment of the present application.
[0446] An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.
[0447] In some possible implementations, various aspects of the data transmission method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the data transmission method according to various exemplary implementations of the present application described above in this specification.
[0448] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.) that contain computer-usable program code.
[0449] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0450] 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 including 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.
[0451] 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 The steps for the functions specified in one or more boxes.
[0452] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0453] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data transmission method performed by a server, characterized in that: include: receiving activation success information of a health monitoring device, and marking the state of the health monitoring device as an activated state, wherein the activation success information of the health monitoring device is sent by the health monitoring device after the health monitoring device is activated by a designated mobile terminal, or is sent by a base station after the health monitoring device is activated; Receiving association information of a candidate health monitoring device to be connected sent by a base station, where the candidate health monitoring device to be connected is a health monitoring device to be connected that is detected by the base station and can be connected within its coverage area; If it is determined that the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected, a message indicating connection to the candidate health monitoring device to be connected is returned to the base station, so that the base station is connected to the candidate health monitoring device to be connected; The receiving base station sends health monitoring data obtained from each health monitoring device connected to it.
2. The method according to claim 1, characterized in that The association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station; Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes: Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and the first base station at the moment of disconnection of the candidate health monitoring device to be connected with the first base station when it was last connected to it, it is determined that the connection condition is met.
3. The method according to claim 1, characterized in that The association information of the candidate health monitoring device to be connected includes identification information of the candidate health monitoring device to be connected and signal strength information between the candidate health monitoring device to be connected and the base station; Determining that a connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected specifically includes: Searching for the status of the candidate health monitoring device to be connected based on the identifier of the candidate health monitoring device to be connected; If it is determined that the state of the candidate health monitoring device to be connected is an activated state, and the signal strength between the candidate health monitoring device to be connected and the base station at the current moment is greater than the signal strength between the candidate health monitoring device to be connected and each second base station adjacent to the base station, it is determined that the connection condition is met.
4. The method according to claim 1, characterized in that The message indicating the connection to the candidate health monitoring device to be connected includes the authentication information of the candidate health monitoring device to be connected, so that the base station and the candidate health monitoring device to be connected perform two-way authentication based on the authentication information and connect after successful authentication; The authentication information of the candidate health monitoring device to be connected includes a key set corresponding to the candidate health monitoring device to be connected, and the key set includes each key and key identifier corresponding to the candidate health monitoring device to be connected.
5. The method according to claim 1, characterized in that Before receiving the association information of the candidate health monitoring device to be connected sent by the base station, the method further includes: receiving a login request sent by the base station, wherein the login request includes identification information and login key information of the base station; The identification information and login key information of the base station are verified, and if it is determined that the verification passes, the login token information is returned to the base station, so that the base station carries the login token information when sending data.
6. A data transmission method performed by a base station, characterized in that: include: After activating the health monitoring device to be activated, sending activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state; Sending the detected association information of the candidate health monitoring device to be connected that can be connected within the coverage area to the server, so that the server determines whether the connection condition is met based on the association information of the candidate health monitoring device to be connected and the state of the candidate health monitoring device to be connected; When it is determined that a message returned by the server indicating connection to the candidate health monitoring device to be connected is received, connecting to the candidate health monitoring device to be connected; Receive health monitoring data reported by each connected health monitoring device, and send the health monitoring data reported by each health monitoring device to the server.
7. The method according to claim 6, characterized in that Activate the health monitoring device to be activated in the following manner: receiving a Bluetooth broadcast data packet sent by the health monitoring device to be activated, wherein the Bluetooth broadcast data packet is sent after the health monitoring device to be activated is awakened by a designated mobile terminal; Acquire identification information of the health monitoring device to be activated from the health monitoring device to be activated; Sending the identification information of the health monitoring device to be activated to the server, so that the server verifies the identification information of the health monitoring device to be activated; receiving authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after verifying the identification information of the health monitoring device to be activated; Perform bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and activate the health monitoring device to be activated after successful authentication.
8. The method according to claim 7, characterized in that The authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated; Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes: Generate a first public key and a first private key according to a preset key agreement algorithm; Select any first key from the key set, and generate first signature information using a hash algorithm according to the selected first key, first time information and the first public key; Sending a first authentication request to the health monitoring device to be activated, where the first authentication request carries identification information of the first key, the first time information, the first public key, and the first signature information, so that the health monitoring device to be activated generates second signature information using the hash algorithm according to the key corresponding to the identification of the first key, the first time information, and the first public key, to verify whether the second signature information is consistent with the first signature information; receiving a second authentication request sent by the health monitoring device to be activated when determining that the second signature information is consistent with the first signature information, wherein the second authentication request carries identification information of a second key, second time information, a second public key, and third signature information, wherein the third signature information is generated by the health monitoring device to be activated using the hash algorithm according to the selected second key, the second time information, and the second public key, and the second public key is generated by the health monitoring device to be activated according to the preset key agreement algorithm; Generate fourth signature information by using the Hash algorithm according to the key corresponding to the identifier of the second key, the second time information, and the second public key; If it is determined that the fourth signature information is consistent with the third signature information, then the authentication is determined to be successful.
9. A data transmission method performed by a designated mobile terminal, characterized in that: include: Waking up the health monitoring device to be activated, and obtaining identification information of the health monitoring device to be activated; Sending the identification information of the health monitoring device to be activated to a server, so that the server verifies the identification of the health monitoring device to be activated; receiving authentication information of the health monitoring device to be activated sent by the server, where the authentication information of the health monitoring device to be activated is sent by the server after verifying the identity of the health monitoring device to be activated; Performing two-way authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated, and connecting with the health monitoring device to be activated after successful authentication, to activate the health monitoring device to be activated; Sending activation success information of the health monitoring device to the server, so that the server marks the state of the health monitoring device as an activated state; And disconnect the connection with the health monitoring device.
10. The method according to claim 9, characterized in that The authentication information of the health monitoring device to be activated includes a key set corresponding to the health monitoring device to be activated, and the key set includes each key and key identifier corresponding to the health monitoring device to be activated; Performing bidirectional authentication with the health monitoring device to be activated based on the authentication information of the health monitoring device to be activated specifically includes: Generate a third public key and a third private key according to a preset key agreement algorithm; Select any third key from the key set, and generate fifth signature information using a hash algorithm according to the selected third key, third time information and the third public key; Sending a third authentication request to the health monitoring device to be activated, wherein the third authentication request carries the identification information of the third key, the third time information, the third public key, and the fifth signature information, so that the health monitoring device to be activated generates sixth signature information using the hash algorithm according to the key corresponding to the identification of the third key, the third time information, and the third public key, to verify whether the sixth signature information is consistent with the fifth signature information; receiving a fourth authentication request sent by the health monitoring device to be activated when determining that the sixth signature information is consistent with the fifth signature information, the fourth authentication request carrying identification information of a fourth key, fourth time information, a fourth public key and seventh signature information, the seventh signature information being generated by the health monitoring device to be activated using the hash algorithm according to the selected fourth key, the fourth time information and the fourth public key, and the fourth public key being generated by the health monitoring device to be activated according to the preset key agreement algorithm; Generate eighth signature information using the Hash algorithm according to the key corresponding to the identifier of the fourth key, the fourth time information, and the fourth public key; If it is determined that the eighth signature information is consistent with the seventh signature information, then it is determined that the authentication is successful.
11. The method according to claim 9, characterized in that Before sending the identification information of the health monitoring device to be activated to the server, the method further includes: Sending a login request to the server, wherein the login request includes login information; Receive access token information returned by the server, where the access token is generated by the server after successfully verifying the login information.
12. A data transmission method performed by a health monitoring device, characterized in that: include: receiving a request for obtaining identification information of a health monitoring device sent by a designated mobile terminal or a base station, wherein the request for obtaining identification information of the health monitoring device is sent by the designated mobile terminal or the base station after the health monitoring device is awakened by the designated mobile terminal; Returning the identification information of the health monitoring device to the designated mobile terminal or the base station, so that the designated mobile terminal or the base station activates the health monitoring device according to the identification information of the health monitoring device; After being activated, sending the associated information of the health monitoring device to a connectable base station, so that the base station sends the associated information of the health monitoring device to the server, so that the server determines whether a connection condition is met based on the associated information of the health monitoring device and the state of the health monitoring device; After connecting with the base station, the collected health monitoring data is reported to the base station so that the base station sends the health monitoring data to the server, wherein the health monitoring device is connected to the base station after the base station receives a message returned by the server indicating the connection to the health monitoring device.
13. The method according to claim 12, characterized in that The message indicating connection to the health monitoring device includes authentication information of the health monitoring device; Before establishing a connection with the base station, the method further includes: performing bidirectional authentication with the base station based on the authentication information of the health monitoring device; Confirm that the two-way authentication is successful; The bidirectional authentication with the base station based on the authentication information of the health monitoring device specifically includes: receiving a fifth authentication request sent by the base station, the fifth authentication request carrying identification information of a fifth key, fifth time information, a fifth public key, and ninth signature information, the fifth public key being generated by the base station according to a preset key agreement algorithm, the fifth key being selected by the base station from a key set in the authentication information of the health monitoring device returned by the server, and the ninth signature information being generated by the base station using a hash algorithm according to the fifth key, the fifth event information, and the fifth public key; Generate tenth signature information using the Hash algorithm according to the key corresponding to the identifier of the fifth key, the fifth time information, and the fifth public key; If it is determined that the tenth signature information is consistent with the ninth signature information, generating a sixth public key and a sixth private key according to the preset key agreement algorithm; Select any sixth key from the locally stored key set, and generate an eleventh signature information using the Hash algorithm according to the selected sixth key, the sixth time information and the sixth public key; The sixth authentication request sent to the base station carries the identification information of the sixth key, the sixth time information, the sixth public key and the eleventh signature information, so that the base station generates the twelfth signature information according to the key corresponding to the identification of the sixth key, the sixth time information and the sixth public key using the hash algorithm to verify whether the twelfth signature information is consistent with the eleventh signature information.
14. The method according to claim 13, characterized in that If it is determined that the two-way authentication is successful, the method further includes: Generate a shared key with the base station using the preset key agreement algorithm based on the fifth public key, the fifth private key corresponding to the fifth public key, the sixth public key and the sixth private key; Sending the shared key to the server so that the server stores the corresponding relationship between the identification information of the health monitoring device and the shared key; and Reporting the collected health monitoring data to the base station so that the base station sends the health monitoring data to the server specifically includes: Encrypting the health monitoring data according to the shared key and a preset encryption algorithm to generate encrypted health monitoring data; The encrypted health monitoring data is sent to the server, so that the server decrypts the encrypted health monitoring data according to the shared key.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data transmission method according to any one of claims 1 to 14 is implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 14 are implemented.
