Data transmission method and communication system

By establishing a Bluetooth transmission channel between Bluetooth Low Energy devices and terminals, and automatically transmitting data to the server using pre-stored identifiers, the cumbersome operation problem in existing technologies is solved, and automatic transmission of device data and simplified operation are achieved.

CN116170784BActive Publication Date: 2025-11-28HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111417993.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-11-28
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing Bluetooth Low Energy devices cannot automatically transmit data to the server, requiring manual operation by the user, which is cumbersome.

Method used

By establishing a Bluetooth transmission channel between Bluetooth Low Energy devices and terminals, usage record data is automatically transmitted to the server using pre-stored identifiers, avoiding the need for additional BLE gateway devices.

Benefits of technology

This enables low-power Bluetooth devices to automatically transmit data to the server without the user's awareness, simplifying the operation process and avoiding the energy consumption and connection inconvenience issues of BLE gateways.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116170784B_ABST
    Figure CN116170784B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method and a communication system. The method comprises the following steps: in response to receiving a first user input, a first household device sends a first message in a Bluetooth manner. A first terminal acquires a first identifier carried in the first message, and establishes a Bluetooth transmission channel with the first household device. The first household device sends usage record data to the first terminal through the Bluetooth transmission channel. The first terminal sends the usage record data to a server. In the whole data transmission process, the user only needs to start the first household device. In the working process of the first household device, the first household device automatically establishes a Bluetooth transmission channel with the first terminal, and the first household device automatically transmits data to the first terminal without additional user operation. The household device automatically transmits data to the server, thereby improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication, and in particular, to a data transmission method and a communication system. BACKGROUND

[0002] With the rapid development of the Internet of Things, more and more Internet of Things devices appear in smart home devices. With the demand of the Internet of Things devices sensitive to power consumption, more and more Bluetooth Low Energy (BLE) devices have emerged. For example, smart toothbrushes, smart water bottles, smart pillows, etc. However, the BLE device cannot connect to the server, so the data generated by the BLE device cannot be transmitted to the server.

[0003] In order to transmit the data generated by the BLE device to the server, the existing data transmission method usually requires the user to manually complete the connection between the BLE device and the terminal on the application of the terminal after using the BLE device. After the terminal and the BLE device establish a connection, the BLE device transmits data to the terminal, and the terminal uploads the data transmitted by the BLE device to the server. It can be seen that when the BLE device needs to transmit data to the server, the user needs to repeat the above operation. Therefore, the existing data transmission method requires the user to perform tedious operations to transmit the data on the BLE device to the server, which is tedious. SUMMARY

[0004] The data transmission method and the communication system provided by the embodiments of the present application can automatically transmit the data of the BLE device to the server and simplify the operation.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions.

[0006] In a first aspect, the embodiments of the present application provide a data transmission method, which is applied to a communication system, the communication system comprising a first home device, a first terminal and a server, the first home device comprising a Bluetooth Low Energy module or having a Bluetooth Low Energy communication function. The method can comprise: in response to receiving a first user input, the first home device sends a first message in a Bluetooth manner, the first message comprising a first identifier, the first identifier being pre-stored in the first terminal and the first home device, the first identifier being generated according to a first account, the first account corresponding to the first terminal and the first home device. In response to receiving the first message, the first terminal acquires the first identifier and establishes a Bluetooth transmission channel with the first home device. The first home device sends a second message to the first terminal through the Bluetooth transmission channel, the second message comprising first data, the first data comprising usage record data of the first home device in a first historical time period and the first identifier, the first data being used to feed back usage record data of the first account in the first historical time period. In response to receiving the second message, the first terminal sends the first data to the server.

[0007] Optionally, the first user input is one user input.

[0008] That is, in response to the first user input, the first home device starts to work, and the first home device sends the first message in a Bluetooth manner. The first terminal acquires the first identifier carried in the first message and automatically establishes a Bluetooth transmission channel with the first home device. The first home device sends the use record data of the first home device in the first historical time length to the first terminal through the Bluetooth transmission channel. The first terminal sends the use record data to the server. It can be seen that in the whole data transmission process, the user only needs to start the first home device to work. In the process of working of the first home device (that is, in the process of using the first home device by the user), the first home device will automatically establish a Bluetooth transmission channel with the first terminal, and the first home device will automatically transmit the first data to the first terminal. The whole process does not need the user to specially and tediously operate the data upload server. The operation is simplified. In the case that the user is unaware, the home device can automatically transmit the data to the server.

[0009] In addition, in the embodiment of the present application, the first home device also does not need to transmit data to the server through the Bluetooth low energy gateway (BLE gateway), and does not need to additionally purchase the BLE gateway. In this way, a series of problems existing in the use of the BLE gateway are avoided, such as the BLE gateway still consumes energy when there is no data transmission, the BLE gateway uses a plug-in power supply mode which is not convenient for moving, the BLE device in the home cannot keep connected with the BLE gateway, and the like. Therefore, the scheme provided in the embodiment of the present application is more practical.

[0010] In some possible implementation manners, the communication system further includes a second terminal, and the method can further include: in response to receiving the second user input, the first home device sends a third message in a Bluetooth manner, the third message includes a second identifier, the second identifier is pre-stored in the second terminal and the first home device, and the second identifier is generated according to a second user account, the second user account corresponds to the second terminal and the first home device. In response to receiving the third message, the terminal obtains the second identifier, and establishes a Bluetooth transmission channel with the first home device. The first home device sends a fourth message to the second terminal through the Bluetooth transmission channel, the fourth message includes second data, the second data includes usage record data of the first home device in a second historical time length and the second identifier, and the second data is used to feed back usage record data of the second user account in the second historical time length. In response to receiving the fourth message, the second terminal sends the second data to the server. In this way, the first home device can identify different users. For different users, the first home device can transmit the data used by the user to the terminal of the user, and then the terminal of each user transmits the data to the server, so that the data transmission task can be shared by the terminals, and the loss of a single terminal can be effectively avoided.

[0011] Optionally, the second user input is one user input.

[0012] In some possible implementation manners, the first account corresponds to the first terminal in a one-to-one manner, and corresponds to the first home device in a one-to-one manner.

[0013] In a specific possible implementation manner, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically: in response to receiving the first user input, the first home device sends the first message in a Bluetooth low energy manner.

[0014] In a specific possible implementation manner, the first user input includes any one of the following: a turn-on operation of the first user on the first home device, an off operation of the first user on the first home device, a pressing operation of the first user on the first home device, and a touch operation of the first user on the first home device.

[0015] In a specific possible implementation manner, the first home device includes an identity recognition unit, and the identity recognition unit is configured to obtain a human body biological feature of a user. In response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically: in response to an operation of the first user on the identity recognition unit, the first home device determines the first user corresponding to the first account according to the human body biological feature of the first user obtained by the identity recognition unit. The first home device sends the first message in a Bluetooth manner.

[0016] In a specific implementation manner, the first home device includes any one of a smart toothbrush, a smart water cup and a smart pillow.

[0017] In a specific implementation manner, the first home device includes a smart toothbrush, and the first data includes one or more of a brushing duration, a brushing mode, a brushing start, a brushing strength and a brushing score.

[0018] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically, in response to receiving an operation of a start key of the smart toothbrush by the first user, the smart toothbrush sends the first message in a Bluetooth manner.

[0019] In a specific implementation manner, the first home device includes a smart water cup, and the first data includes one or more of a daily water consumption of the user, an average water consumption in a week, and a water consumption target.

[0020] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically, in response to receiving an operation of opening a cup cover of the smart water cup by the first user, the smart water cup sends the first message in a Bluetooth manner.

[0021] In a specific implementation manner, the first home device includes a smart pillow, and the first data includes one or more of a sleep time, a sleep duration, a sleep habit, a sleep score, a sleep problem analysis and a sleep improvement suggestion.

[0022] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically, in response to receiving a pressing operation of the head of the first user on the smart pillow, the smart pillow sends the first message in a Bluetooth manner.

[0023] In some possible implementation manners, before the first home device sends the first message in the Bluetooth manner in response to receiving the first user input, the method further includes: in response to receiving a third user input, the first home device sends a fifth message in the Bluetooth manner, the fifth message comprising device information of the first home device. In response to receiving the fifth message, the first terminal acquires the device information of the first home device. The first terminal sends a first request to the server, the first request being used to request the server to register the first home device by using the device information of the first home device, and the device information of the first home device being carried in the first request. The server registers the first home device according to the first request, and generates registration completion information after the registration is completed, and sends the registration completion information to the first terminal. The first terminal receives the registration completion information sent by the server. It can be seen that the first terminal can request the server to register on behalf of the first home device. In the registration process of the first home device, the registration can be completed without user intervention, and automatic registration is implemented.

[0024] In a specific possible implementation manner, the device information of the first home device comprises one or more of a device type, a physical address, and a serial number.

[0025] In some possible implementation manners, after the server registers the first home device according to the first request, the method further includes: the server generates a first identifier according to the first account. The server sends the first identifier to the first terminal. The first terminal receives the first identifier and stores the first identifier. The first terminal sends the first identifier to the first home device. The first home device receives the first identifier and stores the first identifier.

[0026] In some possible implementation manners, after the server registers the first home device according to the first request, the method further includes: the server allocates a first access credential to the first terminal and the first home device. The server sends the first access credential to the first terminal. The first terminal receives the first access credential and sends the first access credential to the first home device.

[0027] In some possible implementation manners, before the first home device sends the second message to the first terminal through the Bluetooth transmission channel, the method further includes: the first home device encrypts the to-be-sent message by using the first access credential, to obtain the second message. Before the first terminal sends the first data to the server in response to receiving the second message, the method further includes: the first terminal receives the second message sent by the first home device through the Bluetooth transmission channel. The first terminal decrypts the second message by using the first access credential, to obtain the first data. In the embodiment of the application, the transmission data is encrypted, so that the communication between the first terminal and the first home device is more secure, and the security is higher.

[0028] In a specific implementation manner, in response to receiving the first message, the first terminal acquires the first identifier and establishes the Bluetooth transmission channel with the first home device, specifically: the first terminal establishes the Bluetooth transmission channel with the first home device according to the first identifier and the fact that the first terminal and the first home device satisfy the first condition.

[0029] In a specific implementation manner, the first condition can include: a distance between the first terminal and the first home device is less than or equal to a first preset distance; or, the distance between the first terminal and the first home device is less than or equal to the first preset distance, and there is no obstacle between the first terminal and the first home device.

[0030] In some implementation manners, after the first terminal sends the first data to the server in response to receiving the second message, the first terminal can further disconnect the Bluetooth transmission channel with the first home device.

[0031] In a second aspect, an embodiment of the present application provides a data transmission method applied to a first home device, the first home device including a low-power Bluetooth module or having a low-power Bluetooth communication function, the method including: in response to receiving a first user input, the first home device sends a first message in a Bluetooth manner, the first message including a first identifier, the first identifier being pre-stored in a first terminal and the first home device, the first identifier being generated according to a first account, the first account corresponding to the first terminal and the first home device; after the first terminal establishes a Bluetooth transmission channel with the first home device according to the first identifier, the first home device sends a second message to the first terminal through the Bluetooth transmission channel, the second message including first data, the first data including usage record data of the first home device in a first historical time length and the first identifier, the first data being used to feed back usage record data of the first account in the first historical time length; and the first terminal is configured to send the first data to a server in response to receiving the second message.

[0032] In some implementation manners, the first user input includes any one of a first user's opening operation on the first home device, a first user's closing operation on the first home device, a first user's pressing operation on the first home device, and a first user's touching operation on the first home device.

[0033] In some implementation manners, the first account corresponds to the first terminal one by one and corresponds to the first home device one by one.

[0034] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, specifically: in response to receiving the first user input, the first home device sends the first message in a low-power Bluetooth manner.

[0035] In a specific implementation manner, the first home device comprises an identity recognition unit, and the identity recognition unit is configured to acquire a human body biological feature of the user. In response to receiving the first user input, the first home device sends the first message in a Bluetooth manner. Specifically, in response to the operation of the first user on the identity recognition unit, the first home device determines the first user to correspond to the first account according to the human body biological feature of the first user acquired by the identity recognition unit, and sends the first message in the Bluetooth manner.

[0036] In a specific implementation manner, the first home device comprises any one of a smart toothbrush, a smart water cup and a smart pillow.

[0037] In a specific implementation manner, the first home device comprises the smart toothbrush, and the first data comprises one or more of a brushing time length, a brushing mode, a brushing start, a brushing strength and a brushing score.

[0038] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in the Bluetooth manner. Specifically, in response to receiving the operation of the first user on a start key of the smart toothbrush, the smart toothbrush sends the first message in the Bluetooth manner.

[0039] In a specific implementation manner, the first home device comprises the smart water cup, and the first data comprises one or more of a daily water consumption of the user, an average water consumption in a week and a water consumption target.

[0040] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in the Bluetooth manner. Specifically, in response to receiving the operation of the first user on a cup cover of the smart water cup, the smart water cup sends the first message in the Bluetooth manner.

[0041] In a specific implementation manner, the first home device comprises the smart pillow, and the first data comprises one or more of a sleep time, a sleep time length, a sleep habit, a sleep score, a sleep problem analysis and a sleep improvement suggestion.

[0042] In a specific implementation manner, in response to receiving the first user input, the first home device sends the first message in the Bluetooth manner. Specifically, in response to receiving the pressing operation of the head of the first user on the smart pillow, the smart pillow sends the first message in the Bluetooth manner.

[0043] In a specific implementation manner, the device information of the first home device comprises one or more of a device type, a physical address and a serial number.

[0044] In some possible implementation manners, before the first home device sends the second message to the first terminal through the Bluetooth transmission channel, the method further includes: the first home device encrypts the to-be-sent message by using the first access credential to obtain the second message. In the embodiment of the application, the communication between the first terminal and the first home device is more secure by encrypting the transmission data, and the security is higher.

[0045] In a third aspect, the embodiment of the application provides a data transmission method applied to a first terminal, the method comprising: in response to receiving a first message, the first terminal acquires a first identifier and establishes a Bluetooth transmission channel with a first home device; the first message is sent by the first home device in response to receiving a first user input in a Bluetooth manner, the first message comprises the first identifier, the first identifier is pre-stored in the first terminal and the first home device, the first identifier is generated according to a first account, and the first account corresponds to the first terminal and the first home device; receiving a second message sent by the first home device through the Bluetooth transmission channel, the second message comprising first data, the first data comprising usage record data of the first home device in a first historical time length and the first identifier, and the first data being used to feed back usage record data of the first account in the first historical time length; and in response to receiving the second message, the first terminal sends the first data to a server.

[0046] In some possible implementation manners, the first account corresponds to the first terminal in a one-to-one manner and corresponds to the first home device in a one-to-one manner.

[0047] In a specific possible implementation manner, the first user input comprises any one of an opening operation of the first user on the first home device, a closing operation of the first user on the first home device, a pressing operation of the first user on the first home device, and a touching operation of the first user on the first home device.

[0048] In some possible implementation manners, before the first terminal acquires the first identifier and establishes the Bluetooth transmission channel with the first home device in response to receiving the first message, the method further includes: in response to receiving a fifth message, the first terminal acquires device information of the first home device. The first terminal sends a first request to a server, the first request being used to request the server to register the first home device by using the device information of the first home device, and the device information of the first home device being carried in the fifth message, the fifth message being sent by the first home device in response to receiving a third user input in a Bluetooth manner. The first terminal receives registration completion information sent by the server. The registration completion information is generated by the server after registering the first home device according to the first request. It can be seen that the first terminal can request the server to register on behalf of the first home device. In the registration process of the first home device, the registration can be completed without user intervention, and automatic registration is achieved.

[0049] In some possible implementation manners, after the server registers the first home device according to the first request, the method further includes: the server generates a first identifier according to the first account. The server sends the first identifier to the first terminal. The first terminal receives the first identifier and stores the first identifier. The first terminal sends the first identifier to the first home device. The first home device receives the first identifier and stores the first identifier.

[0050] In some possible implementation manners, after the server registers the first home device according to the first request, the method further includes: the server allocates a first access credential for the first terminal and the first home device. The server sends the first access credential to the first terminal. The first terminal receives the first access credential and sends the first access credential to the first home device.

[0051] In some possible implementation manners, before the first home device sends the second message to the first terminal through the Bluetooth transmission channel, the method further includes: the first home device encrypts the to-be-sent message by using the first access credential to obtain the second message. Before the first terminal sends the first data to the server in response to receiving the second message, the method further includes: the first terminal receives the second message sent by the first home device through the Bluetooth transmission channel. The first terminal decrypts the second message by using the first access credential to obtain the first data. In the embodiment of the application, the transmission data is encrypted, so that the communication between the first terminal and the first home device is more secure and has higher security.

[0052] In a specific possible implementation manner, in response to receiving the first message, the first terminal obtains the first identifier and establishes the Bluetooth transmission channel with the first home device, specifically: the first terminal establishes the Bluetooth transmission channel with the first home device according to the first identifier and the fact that the first terminal and the first home device satisfy the first condition.

[0053] In a specific possible implementation manner, the first condition can include: the distance between the first terminal and the first home device is less than or equal to a first preset distance; or the distance between the first terminal and the first home device is less than or equal to the first preset distance, and there is no obstacle between the first terminal and the first home device.

[0054] In some possible implementation manners, after the first terminal sends the first data to the server in response to receiving the second message, the method further includes: the first terminal disconnects the Bluetooth transmission channel with the first home device.

[0055] In a fourth aspect, an embodiment of the present application provides a home device, the home device comprising a Bluetooth Low Energy module or having a Bluetooth Low Energy communication function, the home device comprising: one or more processors; and a memory having code stored therein; when the code is executed by the processor, the home device performs the method of the second aspect.

[0056] In a fifth aspect, an embodiment of the present application provides a terminal, the terminal comprising: one or more processors; and a memory having code stored therein; when the code is executed by the processor, the terminal performs the method of the third aspect.

[0057] In a sixth aspect, an embodiment of the present application provides a communication system, the communication system comprising a first home device, a first terminal and a server, the first home device comprising a Bluetooth Low Energy module or having a Bluetooth Low Energy communication function.

[0058] The first home device is configured to perform: in response to receiving a first user input, the first home device sends a first message in a Bluetooth manner, the first message comprising a first identifier, the first identifier being pre-stored in the first terminal and the first home device, the first identifier being generated according to a first account, the first account corresponding to the first terminal and the first home device; after the first terminal establishes a Bluetooth transmission channel with the first home device according to the first identifier, the first home device sends a second message to the first terminal through the Bluetooth transmission channel, the second message comprising first data, the first data comprising usage record data of the first home device in a first historical time length and the first identifier, the first data being used to feed back usage record data of the first account in the first historical time length.

[0059] The first terminal is configured to perform: in response to receiving the first message, the first terminal acquires the first identifier and establishes a Bluetooth transmission channel with the first home device; the first message being sent by the first home device in a Bluetooth manner in response to receiving the first user input, the first message comprising the first identifier, the first identifier being pre-stored in the first terminal and the first home device, the first identifier being generated according to the first account, the first account corresponding to the first terminal and the first home device; receiving the second message sent by the first home device through the Bluetooth transmission channel, the second message comprising the first data, the first data comprising usage record data of the first home device in the first historical time length and the first identifier, the first data being used to feed back usage record data of the first account in the first historical time length; in response to receiving the second message, the first terminal sends the first data to the server.

[0060] In a seventh aspect, an embodiment of the present application provides a chip system applied to an electronic device. The chip system comprises one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the interface circuit is configured to receive a signal from a memory of the electronic device and send a signal to the processor, the signal comprising computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to perform the data transmission method according to the first aspect.

[0061] In an eighth aspect, an embodiment of the present application provides a computer storage medium, characterized in that it comprises computer instructions, when the computer instructions are executed on an electronic device and a server, the electronic device is caused to perform the data transmission method according to the first aspect.

[0062] In a ninth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product is executed on a computer, the computer is caused to perform the data transmission method according to the first aspect.

[0063] The beneficial effects corresponding to the above-mentioned other aspects can be referred to the description of the beneficial effects of the method aspect, which will not be repeated here.

[0064] In the embodiment of the present application, the first home device is started to work in response to the first user input, and the first home device sends the first message in the form of Bluetooth. The first terminal acquires the first identifier carried in the first message and automatically establishes a Bluetooth transmission channel with the first home device. The first home device sends the use record data of the first home device in the first historical time length to the first terminal through the Bluetooth transmission channel. The first terminal sends the use record data to the server. It can be seen that in the whole data transmission process, the user only needs to start the first home device to work, and in the process of working of the first home device (that is, in the process of using the first home device by the user), the first home device will automatically establish a Bluetooth transmission channel with the first terminal, and the first home device will automatically transmit the first data to the first terminal. The whole process does not need the user to specially and tediously operate the data uploading server, which simplifies the operation, and in the case of no user awareness, the home device can automatically transmit the data to the server. BRIEF DESCRIPTION OF DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0066] Figure 1 It is a schematic view of an interface of a terminal;

[0067] Figure 2 schematic diagram of another interface of a terminal;

[0068] Figure 3 schematic diagram of another interface of a terminal;

[0069] Figure 4 schematic diagram of another interface of a terminal;

[0070] Figure 5 schematic diagram of another interface of a terminal;

[0071] Figure 6 schematic diagram of another interface of a terminal;

[0072] Figure 7 schematic diagram of another interface of a terminal;

[0073] Figure 8 schematic diagram of another interface of a terminal;

[0074] Figure 9 schematic diagram of another interface of a terminal;

[0075] Figure 10 schematic diagram of another interface of a terminal;

[0076] Figure 11 schematic diagram of a system provided by an embodiment of the present application;

[0077] Figure 12 schematic diagram of a terminal provided by an embodiment of the present application;

[0078] Figure 13 flowchart of a data transmission method provided by an embodiment of the present application;

[0079] Figure 14 flowchart of a data transmission method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0080] Hereinafter, the terms "first" and "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. In the description of the present embodiment, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0081] Currently, the data transmission method is usually as follows: after a user uses a home device (such as a BLE device), the user manually completes the connection between the BLE device and the terminal on the application of the terminal. After the terminal and the BLE device establish the connection, the BLE device transmits data to the terminal, and the terminal uploads the data transmitted by the BLE device to the server.

[0082] For example, after the user uses the BLE device, the user wants to upload the updated data on the BLE device to the server. The user needs to manually establish a data transmission channel between the BLE device and the terminal. For example, as shown in Figure 1 , it is a schematic diagram of a main interface of the terminal. The user clicks the application (such as a smart life application program) on the terminal 110. The smart life application program is started. The terminal 110 displays the interface 111 as shown in Figure 2 . The user inputs a user account (such as a Huawei account) and a password on the interface 111, and clicks a “login” control. The interface of the terminal 110 jumps from the interface 111 as shown in Figure 2 to the interface 112 as shown in Figure 3 . A BLE device, such as a pillow, is displayed on the interface 112. A control 1121 is also displayed on the interface 112. When the user clicks the control 1121, the terminal 110 displays the control 113 on the interface 112 as shown in Figure 4 . When the user clicks the “add device” option in the control 113, the interface 112 of the terminal 110 becomes the interface 114 as shown in Figure 5 . The interface 114 indicates that the terminal 110 is scanning the BLE device, and displays the scanned BLE device, such as a water cup and a smart toothbrush. When the user clicks the “connect” control on the smart toothbrush 1141 on the interface 114 of the terminal 110, the interface of the terminal 110 jumps from the interface 114 as shown in Figure 5 to the interface 115 as shown in Figure 6 . The connection progress of the terminal 110 and the smart toothbrush is displayed on the interface 115. When the connection between the terminal 110 and the BLE device is successful, the terminal 110 receives the data transmitted by the smart toothbrush, and uploads the data to the server. At the same time, the terminal 110 displays the interface 116 as shown in Figure 7 . After the connection between the BLE device is successful, the card of the smart toothbrush is added in the interface 112 as shown in Figure 3 , and the interface 117 as shown in Figure 8 is obtained.

[0083] In the process of transmitting data between the BLE device and the server, after the user uses the smart toothbrush, the user needs to click the application (such as a smart life application) icon as shown in Figure 1 to start the application; and the user needs to operate Figure 2The user login interface shown in the application; the user needs to click Figure 3 The control 1121 shown in the middle, and click Figure 4 The control 113 shown in the middle, to add a BLE device; the user needs to click Figure 5 The "connection" control on the smart toothbrush 1141 shown, to establish a connection between the smart toothbrush and the terminal 110. It can be seen that the user needs to participate in the whole process of data transmission between the BLE device and the server. Moreover, every time the BLE device needs to transmit data to the server, the user needs to repeat the above operation, which is relatively cumbersome. Therefore, the existing data transmission method requires the user to perform cumbersome operations to transmit data on the BLE to the server, which is relatively cumbersome.

[0084] To solve the above technical problems, in the embodiments of the present application, the first home device receives a first user input. In response to the first user input, the first home device starts to work, and the first home device sends a first message in a Bluetooth manner, the first message comprising a first identifier, the first identifier being pre-stored in the first terminal and the first home device, the first identifier being generated according to a first account, the first account corresponding to the first terminal and the first home device. In response to receiving the first message, the first terminal obtains the first identifier and establishes a Bluetooth transmission channel with the first home device. The first home device sends a second message to the first terminal through the Bluetooth transmission channel, the second message comprising first data, the first data comprising usage record data of the first home device within a first historical time length and the first identifier, the first data being used to feed back usage record data of the first account within the first historical time length. In response to receiving the second message, the first terminal sends the first data to a server.

[0085] That is, in response to the first user input, the first home device starts to work, and the first home device sends a first message in a Bluetooth manner. The first terminal obtains the first identifier carried in the first message and automatically establishes a Bluetooth transmission channel with the first home device. The first home device sends usage record data of the first home device within a first historical time length to the first terminal through the Bluetooth transmission channel. The first terminal sends the usage record data to a server. It can be seen that in the whole data transmission process, the user only needs to start the first home device to work, and in the process of the first home device working (that is, in the process of the user using the first home device), the first home device will automatically establish a Bluetooth transmission channel with the first terminal, and the first home device will automatically transmit the first data to the first terminal. The whole process does not require the user to perform cumbersome operations for data uploading to the server, simplifying the operation, and in the case of no user awareness, the home device can automatically transmit data to the server.

[0086] In addition, in the embodiment of the present application, the first home device does not need to transmit data to the server through the Bluetooth Low Energy (BLE) gateway (BLE gateway), and does not need to additionally purchase the BLE gateway. In this way, a series of problems existing in the use of the BLE gateway are avoided, such as the BLE gateway still consuming energy when there is no data transmission, the BLE gateway is inconvenient to move because it is powered by plugging in, the BLE device in the home cannot be kept connected to the BLE gateway, and the like. Therefore, the scheme provided in the embodiment of the present application is more practical.

[0087] In some embodiments, for the case that multiple people share one home device, the home device can transmit data to different terminals according to different users. Specifically, the data transmission method provided in the embodiment of the present application can further include: in response to receiving a second user input, the first home device sends a third message in a Bluetooth manner, the third message includes a second identifier, the second identifier is pre-stored in the second terminal and the first home device, and the second identifier is generated according to a second user account, the second user account corresponds to the second terminal and the first home device. In response to receiving the third message, the terminal obtains the second identifier and establishes a Bluetooth transmission channel with the first home device. The first home device sends a fourth message to the second terminal through the Bluetooth transmission channel, the fourth message includes second data, the second data includes usage record data of the first home device in a second historical time period and the second identifier, and the second data is used to feed back usage record data of the second user account in the second historical time period. In response to receiving the fourth message, the second terminal sends the second data to the server. In this way, the first home device can identify different users. For different users, the first home device can transmit the data used by the user to the terminal of the user, and then the terminal of each user transmits the data to the server, so that the data transmission task can be shared by each terminal, and the damage to a single terminal is effectively avoided.

[0088] In some embodiments, before the first home device sends the first message in the Bluetooth manner in response to receiving the first user input, the data transmission method provided by the embodiments of the present application can further include: in response to receiving a third user input, the first home device sends a fifth message in the Bluetooth manner, and the fifth message includes device information of the first home device. In response to receiving the fifth message, the first terminal acquires the device information of the first home device. The first terminal sends a first request to the server, and the first request is used to request the server to register the first home device by using the device information of the first home device. The first request carries the device information of the first home device. The server registers the first home device according to the first request, and generates registration completion information after the registration is completed, and sends the registration completion information to the first terminal. The first terminal receives the registration completion information sent by the server. The registration completion information can carry the first identifier. It can be seen that the first terminal can request the server to register on behalf of the first home device. In the registration process of the first home device, the registration can be completed without user intervention, and automatic registration is realized.

[0089] In actual application, the first home device (such as the first BLE device) can be a smart toothbrush, a smart water cup, or a smart pillow. Of course, the first home device can also be other smart devices, such as a smart yoga mat. The embodiments of the present application do not make specific limitations.

[0090] Taking the first BLE device as a smart toothbrush as an example, the smart toothbrush is bound to the first terminal (such as a mobile phone) under a first account. When the user starts the smart toothbrush to brush teeth, the smart toothbrush sends a first message (such as a Bluetooth broadcast) to the first terminal (such as a mobile phone), and the Bluetooth broadcast carries a first identifier, which is generated according to the first account. The mobile phone receives the Bluetooth broadcast and acquires the first identifier carried by the Bluetooth broadcast. The mobile phone determines that the first identifier is consistent with the stored identifier. The mobile phone establishes a connection channel (that is, a Bluetooth transmission channel) with the smart toothbrush. The smart toothbrush sends first data to the mobile phone through the connection channel. The first data can include, for example, tooth brushing duration, tooth brushing starting position, tooth brushing mode, tooth brushing force, and the like. After the mobile phone receives the above data, the mobile phone displays the above data, as shown in FIG. 6, and reports the above data to the server. In this way, in the whole data transmission process, the user only needs to start the smart toothbrush to brush teeth, and the smart toothbrush will automatically establish a Bluetooth transmission channel with the mobile phone during the user's tooth brushing process. The smart toothbrush will automatically transmit the first data to the mobile phone, and the user does not need to perform tedious operations for uploading data to the server, which simplifies the operation and enables the smart toothbrush to automatically transmit data to the server without the user's awareness. Figure 9

[0091] ​Similarly, taking the first BLE device as a smart water cup as an example, the smart water cup is bound to a terminal (such as a mobile phone) under a first account. When the user opens the cover of the smart water cup, the smart water cup sends a first message (such as a Bluetooth broadcast) to the terminal (such as the mobile phone), and the Bluetooth broadcast carries a first identifier, which is generated according to the first account. The mobile phone receives the Bluetooth broadcast and obtains the first identifier carried by the Bluetooth broadcast. The mobile phone determines that the first identifier is consistent with the stored identifier. The mobile phone establishes a connection channel (that is, a Bluetooth transmission channel) with the smart water cup. The smart water cup sends first data to the mobile phone through the connection channel. The first data may, for example, include water consumption, water temperature, and the like. After the mobile phone receives the data, the mobile phone may, for example, as shown in Figure 10 , display the data and report the data to the server. In this way, in the entire data transmission process, the user only needs to open the cover of the smart water cup, and during the user's use of the smart water cup to drink water, the smart water cup automatically establishes a Bluetooth transmission channel with the mobile phone, and the smart water cup automatically transmits the first data to the mobile phone. The user does not need to perform tedious operations to upload the data to the server throughout the entire process, which simplifies the operation and enables the smart water cup to automatically transmit the data to the server without the user's awareness.

[0092] Similarly, taking the first BLE device as a smart pillow as an example, the smart pillow is bound to a terminal (such as a mobile phone) under a first account. When the user presses the smart pillow, the smart pillow sends a first message (such as a Bluetooth broadcast) to the terminal (such as the mobile phone), and the Bluetooth broadcast carries a first identifier, which is generated according to the first account. The mobile phone receives the Bluetooth broadcast and obtains the first identifier carried by the Bluetooth broadcast. The mobile phone determines that the first identifier is consistent with the stored identifier. The mobile phone establishes a connection channel (that is, a Bluetooth transmission channel) with the smart pillow. The smart pillow sends first data to the mobile phone through the connection channel. The first data may, for example, include sleep duration, sleep quality, and the like. After the mobile phone receives the data, the mobile phone reports the data to the server. In this way, in the entire data transmission process, the user only needs to press the smart pillow, and during the user's head resting on the smart pillow, the smart pillow automatically establishes a Bluetooth transmission channel with the mobile phone, and the smart pillow automatically transmits the first data to the mobile phone. The user does not need to perform tedious operations to upload the data to the server throughout the entire process, which simplifies the operation and enables the smart pillow to automatically transmit the data to the server without the user's awareness.

[0093] It should be noted that the trigger condition for triggering the first BLE device to send a broadcast described above may be different according to the type of the BLE device, which is not limited in the embodiments of the present application. In actual implementation, the trigger condition may be set according to actual needs.

[0094] The data transmission method provided in the embodiments of the present application may be applied to the system as shown in Figure 11 . As shown in Figure 11As shown, the system 100 can include terminals 110 (such as a first terminal and a second terminal), a plurality of home devices (such as a first home device 120, a second home device 130, and a third home device 140), and a server 150.

[0095] The terminal can be a mobile phone, a tablet computer, a laptop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable terminal, or the like. The specific form of the terminal is not limited in the embodiments of the present application. For example, the terminal can be a mobile phone. Figure 11 As shown, the terminal 110 can be a mobile phone.

[0096] The home device can include a smart life device, a smart wearable device, a smart medical device, a smart vehicle-mounted device, or the like. The smart home device can include a smart toothbrush, a smart water cup, a smart pillow, or the like. The smart wearable device can include a smart watch, smart glasses, a smart bracelet, or the like. The smart medical device can include a smart thermometer, a smart sphygmomanometer, or the like. The smart vehicle-mounted device can include a vehicle-mounted camera, a vehicle-mounted sound system, or the like. The home device in the embodiments of the present application is not limited to the above-mentioned devices. For example, the home device can be a smart toothbrush. Figure 11 As shown, the first home device 120 can be a smart toothbrush, the second home device 130 can be a smart water cup, and the third home device 140 can be a smart pillow.

[0097] Figure 12 FIG. 1 is a structural block diagram of the terminal.

[0098] For example, the terminal can be a mobile phone. Figure 12As shown, the terminal 110 can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headset jack 270D, a sensor module 280, a key 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 can include a pressure sensor 280A, a gyroscope sensor 280B, a barometric pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.

[0099] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the terminal 110. In other embodiments of the present application, the terminal 110 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0100] The processor 210 can include one or more processing units, for example: the processor 210 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.

[0101] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0102] The processor 210 can also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can hold instructions or data that the processor 210 has just used or is using repeatedly. If the processor 210 needs to use the instructions or data again, it can call them directly from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thus improving the efficiency of the system.

[0103] In some embodiments, the processor 210 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0104] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the terminal 110. In some other embodiments of the present application, the terminal 110 can also use different interface connection methods or a combination of multiple interface connection methods in the above embodiments.

[0105] The charging management module 240 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 can receive charging input from a wired charger through the USB interface 230. In some wireless charging embodiments, the charging management module 240 can receive wireless charging input through the wireless charging coil of the terminal 110. The charging management module 240 can charge the battery 242 while also supplying power to the electronic device through the power management module 241.

[0106] The power management module 241 is configured to connect the battery 242 and the charging management module 240 to the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the internal memory 221, the display 294, the camera 293, the wireless communication module 260, and the like. The power management module 241 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health (leakage, impedance), and the like. In some embodiments, the power management module 241 can also be disposed in the processor 210. In some embodiments, the power management module 241 and the charging management module 240 can also be disposed in the same device.

[0107] The wireless communication functions of the terminal 110 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor, and the like.

[0108] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic waves. Each antenna in the terminal 110 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some embodiments, the antennas can be used in combination with a tuning switch.

[0109] The mobile communication module 250 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the terminal 110. The mobile communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 250 can also amplify signals modulated by the modem processor and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functions of the mobile communication module 250 can be disposed in the processor 210. In some embodiments, at least part of the functions of the mobile communication module 250 and at least part of the modules of the processor 210 can be disposed in the same device.

[0110] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 270A, a microphone 270B, etc.), or displays an image or a video through the display 294. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 210 and can be disposed in the same device as the mobile communication module 250 or other functional modules.

[0111] The wireless communication module 260 can provide wireless communication solutions applied to the terminal 110, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 260 can be one or more devices integrated with at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 210. The wireless communication module 260 can also receive a signal to be transmitted from the processor 210, perform frequency modulation and amplification, and convert it into electromagnetic wave radiation via the antenna 2. In some embodiments, the wireless communication module 260 receives a broadcast transmitted by the first home device and data transmitted by the first home device.

[0112] In some embodiments, antenna 1 of terminal 110 is coupled with mobile communication module 250, and antenna 2 is coupled with wireless communication module 260, so that terminal 110 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0113] Terminal 110 implements display functions through a GPU, display screen 294, and an application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 can include one or more GPUs that execute program instructions to generate or change display information.

[0114] The display screen 294 is configured to display images, videos, and the like. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the terminal 110 can include one or N display screens 294, where N is a positive integer greater than 1.

[0115] The terminal 110 can implement the photographing function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor, and the like.

[0116] The ISP is configured to process the data fed back by the camera 293. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 293.

[0117] The camera 293 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the terminal 110 can include one or N cameras 293, where N is a positive integer greater than 1.

[0118] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the terminal 110 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0119] The video codec is used to compress or decompress digital video. The terminal 110 can support one or more video codecs. In this way, the terminal 110 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0120] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of biological neural networks, such as drawing on the transmission mode between human brain neurons, and can also continuously self-learn. Through the NPU, intelligent cognitive applications of the terminal 110 can be realized, such as: image recognition, face recognition, voice recognition, text understanding, etc.

[0121] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal 110. The external memory card communicates with the processor 210 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.

[0122] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during use of the terminal 110 (such as audio data, a phonebook, etc.), etc. In addition, the internal memory 221 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various function applications and data processing of the terminal 110 by running instructions stored in the internal memory 221 and / or instructions stored in a memory disposed in the processor.

[0123] In some embodiments, the internal memory 221 can store the identification of the at least one BLE device. Alternatively, the internal memory 221 can store the identification of the at least one BLE device and the access credential of the at least one BLE device. Alternatively, the internal memory 221 can also store the identification of the at least one BLE device in association with a user account. Alternatively, the internal memory 221 can also store the identification of the at least one BLE device, the access credential of the at least one BLE device, and in association with a user account.

[0124] The terminal 110 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor, etc. For example, music playing, recording, etc.

[0125] The audio module 270 is configured to convert digital audio information into an analog audio signal output, and also configured to convert an analog audio input into a digital audio signal. The audio module 270 can also be configured to encode and decode audio signals. In some embodiments, the audio module 270 can be disposed in the processor 210, or some functional modules of the audio module 270 can be disposed in the processor 210.

[0126] The speaker 270A, also known as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The terminal 110 can listen to music or listen to a hands-free call through the speaker 270A.

[0127] The receiver 270B, also known as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the terminal 110 answers a call or a voice message, the user can listen to the voice by holding the receiver 270B close to the ear.

[0128] The microphone 270C, also known as a "microphone", "sound collector", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound by holding the mouth close to the microphone 270C, and input the sound signal into the microphone 270C. The terminal 110 can be provided with at least one microphone 270C. In other embodiments, the terminal 110 can be provided with two microphones 270C, in addition to collecting sound signals, it can also achieve noise reduction functions. In other embodiments, the terminal 110 can also be provided with three, four or more microphones 270C, which can collect sound signals, reduce noise, and also identify the source of the sound, and achieve directional recording functions, etc.

[0129] The earphone interface 270D is used to connect a wired earphone. The earphone interface 270D can be a USB interface 230, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0130] The pressure sensor 280A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be disposed on the display screen 294. The pressure sensor 280A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 280A, the capacitance between the electrodes changes. The terminal 110 determines the intensity of the force according to the change in capacitance. When a touch operation is applied to the display screen 294, the terminal 110 detects the intensity of the touch operation according to the pressure sensor 280A. The terminal 110 can also calculate the position of the touch according to the detection signal of the pressure sensor 280A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view a short message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0131] The gyroscope sensor 280B can be used to determine the motion attitude of the terminal 110. In some embodiments, the angular velocity of the terminal 110 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 280B. The gyroscope sensor 280B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 280B detects the angle of shaking of the terminal 110, calculates the distance that the lens module needs to compensate according to the angle, and lets the lens offset the shaking of the terminal 110 by reverse movement to achieve anti-shake. The gyroscope sensor 280B can also be used for navigation and motion sensing game scenarios.

[0132] The barometric pressure sensor 280C is used to measure air pressure. In some embodiments, the terminal 110 calculates the altitude, assists in positioning and navigation by measuring the air pressure value with the barometric pressure sensor 280C.

[0133] The magnetic sensor 280D includes a Hall sensor. The terminal 110 can detect opening and closing of a flip cover using the magnetic sensor 280D. In some embodiments, when the terminal 110 is a flip phone, the terminal 110 can detect opening and closing of the flip cover according to the magnetic sensor 280D. In turn, according to the detected opening and closing state of the cover or the flip cover, a feature such as automatic unlocking of the flip cover can be set.

[0134] The acceleration sensor 280E can detect the magnitude of acceleration of the terminal 110 in various directions (typically, three axes). The magnitude and direction of gravity can be detected when the terminal 110 is stationary. It can also be used to identify the posture of the electronic device, applied to landscape / portrait switching, pedometer applications, etc.

[0135] The distance sensor 280F is used to measure distance. The terminal 110 can measure distance by infrared or laser. In some embodiments, when a scene is photographed, the terminal 110 can measure distance using the distance sensor 280F to achieve fast focusing.

[0136] The proximity light sensor 280G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. The terminal 110 emits infrared light outwardly through the light emitting diode. The terminal 110 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 110. When insufficient reflected light is detected, the terminal 110 can determine that there is no object near the terminal 110. The terminal 110 can detect that a user is holding the terminal 110 close to the ear for a call using the proximity light sensor 280G, so as to automatically turn off the screen to achieve power saving. The proximity light sensor 280G can also be used for automatic unlocking and locking of the cover in cover mode and pocket mode.

[0137] The ambient light sensor 280L is used to sense ambient light brightness. The terminal 110 can adaptively adjust the brightness of the display 294 according to the sensed ambient light brightness. The ambient light sensor 280L can also be used to automatically adjust white balance when taking a picture. The ambient light sensor 280L can also cooperate with the proximity light sensor 280G to detect whether the terminal 110 is in the pocket to prevent accidental touch.

[0138] The fingerprint sensor 280H is used to collect fingerprints. The terminal 110 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locking, fingerprint photographing, fingerprint answering a call, etc.

[0139] Temperature sensor 280J is configured to detect temperature. In some embodiments, terminal 110 uses temperature detected by temperature sensor 280J to implement temperature handling strategy. For example, when temperature reported by temperature sensor 280J exceeds a threshold, terminal 110 reduces performance of a processor located near temperature sensor 280J to reduce power consumption and implement thermal protection. In some other embodiments, when temperature is below another threshold, terminal 110 heats battery 242 to avoid abnormal shutdown of terminal 110 caused by low temperature. In some other embodiments, when temperature is below yet another threshold, terminal 110 boosts output voltage of battery 242 to avoid abnormal shutdown caused by low temperature.

[0140] Touch sensor 280K, also referred to as "touch device". Touch sensor 280K can be disposed on display screen 294, and touch sensor 280K and display screen 294 form a touch screen, also referred to as "touch panel". Touch sensor 280K is configured to detect touch operation applied thereon or in the vicinity. Touch sensor 280K can transmit detected touch operation to application processor to determine touch event type. Visual output related to touch operation can be provided through display screen 294. In some other embodiments, touch sensor 280K can also be disposed on the surface of terminal 110, and the position of touch sensor 280K can be different from the position of display screen 294.

[0141] Bone conduction sensor 280M can obtain vibration signal. In some embodiments, bone conduction sensor 280M can obtain vibration signal of human body sound vibration bone block. Bone conduction sensor 280M can also contact human body pulse to receive blood pressure pulsation signal. In some embodiments, bone conduction sensor 280M can also be disposed in earphone to form bone conduction earphone. Audio module 270 can analyze voice signal based on vibration signal of sound vibration bone block obtained by bone conduction sensor 280M to implement voice function. Application processor can analyze heart rate information based on blood pressure pulsation signal obtained by bone conduction sensor 280M to implement heart rate detection function.

[0142] Keys 290 include power on key, volume key, and the like. Keys 290 can be mechanical keys. They can also be touch keys. Terminal 110 can receive key input to generate key signal input related to user settings and function control of terminal 110.

[0143] The motor 291 can generate a vibration prompt. The motor 291 can be used for incoming call vibration prompt, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 291 can also correspond to different vibration feedback effects for touch operations acting on different regions of the display screen 294. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0144] The indicator 292 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc.

[0145] Of course, the terminal 110 can also include other functional units, which are not limited in the embodiments of the present application.

[0146] In addition, the actions, terms, etc. involved between the embodiments of the present application can be mutually referenced and not limited. The message name or parameter name in the message between the devices in the embodiments of the present application is only an example, and other names can also be used in specific implementation, which is not limited.

[0147] Figure 13 A flowchart of a data transmission method provided by an embodiment of the present application is shown in FIG. 1; Figure 14 A flowchart of a data transmission method provided by an embodiment of the present application is shown in FIG. 1; Figure 13 and Figure 14 As shown in FIGS. 1 and 2, the method is applied to a communication system, which can include a first home device, a first terminal, and a server. The first home device can include a Bluetooth low energy module or have a Bluetooth low energy communication function. The method can be described in the following stages, specifically as follows:

[0148] Stage 1, registration stage

[0149] S1300, in response to receiving a user A (such as the third user described above) input, starting the first home device.

[0150] The first home device can be a BLE device. The BLE device can include a smart toothbrush, a smart water cup, a smart pillow, etc. The embodiments of the present application are not limited.

[0151] The user A input can include a configuration operation of the user A on the first home device, for example, a registration operation of the first home device for the first time, a networking operation of the first home device, a connection operation of the first home device with other terminals, etc. The embodiments of the present application are not limited.

[0152] For example, the user can press a button on the first home device to start the first home device.

[0153] S1301, the first home device sends a message a (e.g., the fifth message described above) in the form of Bluetooth, which carries device information of the first home device.

[0154] The message a can be a Bluetooth broadcast. Of course, the message a in the embodiments of the present application is not limited to a Bluetooth broadcast. The embodiments of the present application take the message a as a Bluetooth broadcast for example.

[0155] The device information of the first home device can include a device type and / or an identifier of the first home device, which can be used to uniquely identify the first home device. Alternatively, the identifier is used by the server or the first terminal to identify the identity of the first home device. The identifier can be a serial number (SN), a physical address, a unique device identifier (UDID), etc. Of course, the identifier can also be a string, an array, etc. for external presentation.

[0156] The trigger condition for the first home device to send the message a can be selected according to the type of the home device. For example, the first home device is a smart toothbrush, and the corresponding trigger condition can be to operate the power button. The first home device is a smart water cup, and the corresponding trigger condition can be to open the cup cover. The first home device is a smart pillow, and the corresponding trigger condition can be to press the pillow. Of course, the embodiments of the present application are not limited to the above examples.

[0157] The first terminal can receive the message a sent by the first home device in the following manner. For example, the message a is the first Bluetooth broadcast:

[0158] In a specific implementation, when the distance between the first terminal and the first home device is less than or equal to a first set distance, and there is no obstacle between the first terminal and the first home device, the first terminal receives the first Bluetooth broadcast sent by the first home device. The first set distance can include 10 m, 9 m, 11 m, etc.

[0159] In the embodiments of the present application, the position of the home device is free, and the user can carry the movable first terminal to move within one hop (e.g., within 10 m) of the home device, so that the data transmission of the home device to the server can be automatically completed, and the device range covered is wide.

[0160] S1302, the first terminal receives the message a sent by the first home device, and establishes a Bluetooth transmission channel with the first home device.

[0161] The first terminal starts the Bluetooth function. The user can operate the setting application of the first terminal, and operate the Bluetooth option on the interface of the setting application. In response to the user operation, the first terminal displays a Bluetooth interface. The identity of the first home device can be displayed on the Bluetooth interface. Of course, the identity of the first home device can also not be displayed on the Bluetooth interface, and the user can operate the "scan" control on the Bluetooth interface. In response to the user operation, the first terminal scans the first Bluetooth broadcast. When the first terminal scans the first Bluetooth broadcast sent by the first home device, the first terminal can discover the first home device, and display the identity of the first home device on the Bluetooth interface. The user operates the identity of the first home device, and in response to the user operation, the first terminal establishes a Bluetooth transmission channel with the first home device.

[0162] In some embodiments, in order to ensure the security of information transmission, the first terminal and the first home device negotiate an encryption key of the Bluetooth protocol, so that an encrypted Bluetooth transmission channel is established between the first terminal and the first home device. The first terminal and the first home device can use the encrypted Bluetooth transmission channel when performing information transmission.

[0163] S1303, the first terminal receives the message a, and the first terminal obtains the device information of the first home device.

[0164] In a specific implementation, the first terminal receives the message a through the encrypted Bluetooth transmission channel. In this way, the security of information transmission between the first terminal and the first home device is ensured.

[0165] S1304, the first terminal sends a first request to the server, and the first request is used to request to bind the first home device to the first user account (i.e., the first account). The device information of the first home device is carried in the first request. Correspondingly, the server receives the first request.

[0166] That is, the first terminal can request the server to register the first user account instead of the first home device. The first user account can refer to the user account logged in by the first terminal. For example, the first user account can be a Huawei account.

[0167] S1305, the server registers the first home device according to the first request, and generates registration completion information after the registration is completed, and sends the registration completion information to the first terminal. Correspondingly, the first terminal receives the registration completion information sent by the server.

[0168] The server registers using the device information of the first home device. That is, the server binds the device information of the first home device to the first user account.

[0169] For example, the server binds the first user account with the device type, serial number, and physical address (i.e., MAC address) of the first home device.

[0170] It should be noted that, taking the Huawei account as an example, when the first terminal is used for the first time, the first terminal requests the server to register the Huawei account. The server binds the first terminal under the Huawei account according to the request of the first terminal, that is, the registration of the first terminal is completed. After the first terminal registers the Huawei account, the first terminal can log in to the server using the Huawei account. Subsequently, when the first terminal is used for the second time, the first terminal can directly log in to the server using the Huawei account.

[0171] S1306, after the server successfully registers the first home device, the server generates a first identifier according to the first user account, and the first identifier is used to identify the device bound by the first user account.

[0172] The first user account corresponds to the first terminal one-to-one and corresponds to the first home device one-to-one.

[0173] In a specific implementation, the first terminal can perform hash processing on the first user account to obtain the first identifier. Of course, the application embodiments are not limited to hash processing, and other algorithms such as identification algorithm can also be used. The application embodiments are not limited specifically. Further, the first identifier can be a hash value of the first user account.

[0174] For example, the first identifier can be a BLE broadcast filtering ID.

[0175] S1307, after the server successfully registers the first home device, the server allocates a second identifier to the first home device, and allocates a first access credential to the first terminal and the first home device.

[0176] It should be understood that, after the server successfully registers the first home device, the server can generate a second identifier according to the first identifier, the physical address of the first home device, and the first user account. The server can allocate the second identifier to the first home device. The second identifier is used to uniquely identify the registered device, so as to be identified by the first terminal and the server. For example, the second identifier can be a Device ID.

[0177] In addition, after the server successfully registers the first home device, the server can allocate a first access credential to the first terminal and the first BLR device, and the first access credential is used for mutual authentication of the first terminal and the first home device. For example, the first access credential can be a key authcode.

[0178] In some embodiments, after the first terminal and the first home device establish the Bluetooth transmission channel each time, the first terminal and the first home device can negotiate a temporary session key of the Bluetooth protocol based on the first access credential, and the communication content can be encrypted using the temporary session key. In this way, the security of the communication content between the first terminal and the first home device is effectively ensured.

[0179] In other embodiments, in order to make the communication between the first terminal and the first home device more secure, double encryption can be performed. Specifically, the first terminal and the first home device negotiate an encryption key of the Bluetooth protocol, so that the first terminal and the first home device establish an encrypted Bluetooth transmission channel. The first terminal and the first home device can use the encrypted Bluetooth transmission channel when transmitting information. In addition, the first terminal and the first home device can negotiate a temporary session key of the Bluetooth protocol based on the first access credential, and the communication content can be encrypted using the temporary session key. In this way, the double encryption can make the communication between the first terminal and the first home device more secure and have higher security.

[0180] S1308, the server sends the first identifier, the second identifier and the first access credential to the first terminal, and correspondingly, the first terminal receives the first identifier, the second identifier and the first access credential.

[0181] S1309, the first terminal stores the first identifier, the second identifier and the first access credential.

[0182] S1310, the first terminal sends the first identifier, the second identifier and the first access credential to the first home device, and correspondingly, the first home device receives the first identifier, the second identifier and the first access credential.

[0183] S1311, the first home device stores the first identifier, the second identifier and the first access credential.

[0184] Specifically, the first home device receives the Device ID, the key authcode and the BLE broadcast filter ID and saves them in the local flash.

[0185] Second stage, data transmission stage

[0186] S1312, in response to receiving the input of the user B (the first user as described above), the first home device sends a message b (the first message as described above) in the form of Bluetooth. Correspondingly, the first terminal receives the message b.

[0187] The message b can also be a Bluetooth broadcast. Of course, the message b in the embodiments of the present application is not limited to a Bluetooth broadcast.

[0188] The message b can include a first identity (e.g., the first identity generated in the first stage), the first identity is pre-stored in the first terminal and the first home device, the first identity is generated according to a first account, and the first account corresponds to the first terminal and the first home device.

[0189] The user B input can include any one of a start operation of the user B on the first home device, a stop operation of the user B on the first home device, a pressing operation of the user B on the first home device, and a touch operation of the user B on the first home device. In the embodiments of the present application, the user B input is also different for different home devices.

[0190] For example, the user can click the power button of the smart toothbrush to start the smart toothbrush; or the user can press the power button of the smart toothbrush for a preset time, which can be 3 seconds, 5 seconds, etc.

[0191] For example, the user can rotate the cup cover of the smart water cup to start the smart water cup; or the user can click the cover opening button on the smart water cup to start the smart water cup.

[0192] In this step, the first home device sends the message b in the form of Bluetooth, which can be implemented as follows: taking the second Bluetooth broadcast as the message b:

[0193] In some embodiments, the Bluetooth module of the first home device performs Bluetooth broadcasting at a preset transmission frequency when sending the second Bluetooth broadcast, for example, once every preset T time, and the duration of sending the second Bluetooth broadcast is X seconds, and the Bluetooth broadcast information is continuously sent without interruption in these X seconds. Correspondingly, the Bluetooth module of the first terminal performs scanning at a preset scanning frequency when performing signal scanning, for example, the first terminal scans once every y seconds, and each scanning lasts for z seconds. Wherein, as long as the first home device initiates broadcasting, the first terminal can receive the broadcast. For example, the first terminal can scan once every 600 ms, and each scanning lasts for 100 ms.

[0194] In other embodiments, when the Bluetooth module of the first home device sends the second Bluetooth broadcast, the Bluetooth module of the first terminal does not receive the second Bluetooth broadcast within a first preset time, that is, the first terminal and the first home device do not establish a Bluetooth connection. At this time, the Bluetooth module of the first home device stops broadcasting. For example, the first preset time can be 5 minutes or 10 minutes. Further, the first home device waits for the next time the user uses the first home device to generate data, and then attempts to send the broadcast again.

[0195] In some embodiments, the first terminal can be determined as the registered device when the first terminal receives the second Bluetooth broadcast from the first home device. In some embodiments, the first terminal can be determined as the registered device when the first terminal receives the second Bluetooth broadcast from the first home device and the first terminal is within the preset distance from the first home device.

[0196] Of course, if the distance between the first terminal and the first home device is still greater than the preset distance within the second preset time, the first terminal does not receive the second Bluetooth broadcast, i.e., the first terminal and the first home device do not establish a Bluetooth connection. At this time, the first home device can wait for the next time the user uses the first home device to generate data and then try to send a broadcast again.

[0197] In some embodiments, the first home device can include an identity recognition unit for obtaining a human biological feature of the user. The human biological feature can include a fingerprint, a face, a voice, etc. Of course, the human biological feature can also be other features, such as an earprint, etc. The present application is not limited specifically in the embodiments. S1312 can be specifically implemented as: in response to the operation of the first user on the identity recognition unit, the first home device determines the first user corresponding to the first account according to the human biological feature of the first user obtained by the identity recognition unit. The first home device sends the first message in the Bluetooth mode.

[0198] S1313, in response to receiving the message b, the first terminal obtains the first identifier.

[0199] S1314, the first terminal determines the first home device as a registered device according to the first identifier and the pre-stored identifier.

[0200] Since in the first stage, the first terminal pre-stores the first identifier.

[0201] Specifically, after the first terminal receives the second Bluetooth broadcast sent by the first home device, the first terminal parses the first identifier carried in the second Bluetooth broadcast. The first terminal compares the first identifier with the pre-stored identifier. The first terminal determines that the first identifier matches the pre-stored identifier, and the first terminal can determine that the first home device is a registered device.

[0202] S1315, the first terminal automatically establishes a Bluetooth transmission channel with the first home device.

[0203] The first terminal can match the first identifier with the pre-stored identifier according to the first identifier, and after the matching is successful, the first terminal determines that the first home device is a connectable device. Therefore, the first terminal establishes a Bluetooth transmission channel with the first home device.

[0204] S1316, the first home device sends a message c (such as the second message described above) to the first terminal through the Bluetooth transmission channel, and the second message includes the first data. Correspondingly, the first terminal receives the message c sent by the first home device.

[0205] The first data can include usage record data and the first identifier of the first home device within a first historical time length, and the first data is used to feed back the usage record data of the first account within the first historical time length.

[0206] The first historical time length can be understood as a period of time before the end of the user's last use of the first home device. For example, one day, one hour, or one hour, etc. The embodiment of the application needs to be set according to actual needs.

[0207] For example, the first home device can be a smart toothbrush, and the first data can be a brushing score generated after the user uses the smart toothbrush to brush teeth and the brushing is finished. The first home device can be a smart water cup, and the first data can be the drinking water volume and drinking water time generated after the user uses the smart water cup to drink water. The first home device can be a smart pillow, and the first data can be sleep quality data generated after the user gets up. The embodiments of the application will not be listed one by one.

[0208] In a specific implementable manner, S1316 can be specifically implemented as: S13161, the first terminal generates a first random number R1 and sends it to the first home device. S13162, the first home device generates a second random number R2 and sends it to the first terminal. S13163, the first terminal generates a second access credential according to the first random number R1, the second random number R2 and the first access credential. At the same time, the first home device generates a second access credential according to the first random number R1, the second random number R2 and the first access credential. S13164, the first home device encrypts the to-be-sent message using the second access credential to obtain a second message, and sends the second message to the first terminal. S13165, the first terminal receives the second message and decrypts the second message using the second access credential to obtain the first data. In the embodiment of the application, by encrypting the transmission data, the communication between the first terminal and the first home device can be more secure, and the security is higher.

[0209] S1317, in response to receiving the message c, the first terminal displays the first data carried in the message c.

[0210] For example, the first terminal displaysFigure 9 or Figure 10 The interface shown.

[0211] S1318. In response to receiving message c, the first terminal sends the first data carried in message c to the server.

[0212] The first terminal reports the first data to the server, which can be achieved in the following way:

[0213] In one possible implementation, the first terminal can report the first data to the server in real time. That is, the first terminal reports the first data to the server as soon as it receives the first data sent by the first home appliance.

[0214] In another specific implementation, the first terminal can report the first data to the server at preset time intervals. For example, the first terminal can report one hour's worth of data to the server in batches; or, the first terminal can report one day's worth of data to the server in batches.

[0215] In another possible implementation, the first terminal can report data to the server when a user triggers the viewing of data. Specifically, the first terminal receives an operation from the user on the first terminal. In response to the user's operation, the first terminal reports the first data to the server.

[0216] For example, the user's Figure 8 The interface shown depicts the operation of the smart toothbrush card, with the first terminal receiving the user's input. In response to this input, the first terminal displays the smart toothbrush's data. Figure 9 The interface 118 shown displays information such as brushing time, brushing mode, brushing start, brushing pressure, and brushing score. Figure 9 As shown, the brushing time was 3 minutes and 10 seconds, the brushing mode was "clean," the brushing intensity was "strong," the brushing starting point was the upper left area, and the brushing score was 100 points. Simultaneously, the first terminal reported the smart toothbrush's data to the server.

[0217] For example, the user's Figure 8 The interface shown depicts the operation of the smart water bottle card. The first terminal receives the user's input. In response to this input, the first terminal displays the smart water bottle's data. Figure 10 The interface 119 shown displays information such as the user's daily water intake, average weekly water intake, and water intake goals. Simultaneously, the first terminal reports the smart water cup's data to the server.

[0218] For example, the user's Figure 8The operation of the smart pillow card on the interface shown is received by the first terminal. In response to the operation, the first terminal displays the data of the smart pillow, which can include sleep time, sleep duration, sleep habits, and the like. At this time, the first terminal displays the interface of the pillow, and the interface displays sleep score, sleep problem analysis, improvement suggestions, and the like. At the same time, the first terminal reports the data of the smart pillow to the server.

[0219] In some embodiments, in order to save power consumption, after the first terminal reports the first data to the server, the method can further include: S1319, the first terminal disconnects the Bluetooth transmission channel with the first home device. In this way, when the first home device needs to upload data, the first terminal and the first home device establish Bluetooth connection again according to the above steps, and the embodiments of the present application will not be repeated here.

[0220] In some embodiments, for the case that multiple people share one home device, the home device can transmit data to different terminals according to different users. Specifically, the above communication system can further include a second terminal. The data transmission method provided by the embodiments of the present application can further include: in response to receiving a second user input, the first home device sends a third message in the form of Bluetooth, the third message includes a second identifier, the second identifier is pre-stored in the second terminal and the first home device, the second identifier is generated according to a second user account, and the second user account corresponds to the second terminal and the first home device. In response to receiving the third message, the terminal obtains the second identifier and establishes a Bluetooth transmission channel with the first home device. The first home device sends a fourth message to the second terminal through the Bluetooth transmission channel, the fourth message includes second data, the second data includes usage record data of the first home device in a second historical duration and the second identifier, and the second data is used to feed back the usage record data of the second user account in the second historical duration. In response to receiving the fourth message, the second terminal sends the second data to the server. The specific implementation of each step in the embodiments of the present application can refer to the related content in the above examples, and will not be repeated here.

[0221] In this way, the first home device can identify different users. For different users, the first home device can transmit the data used by the user to the terminal of the user, and then transmit the data to the server through the terminal of each user, so as to share the data transmission task on each terminal, effectively avoiding the damage to a single terminal.

[0222] The communication system provided by the embodiment of the present application can comprise a first home device, a first terminal and a server, the first home device comprising a low-power Bluetooth module or having a low-power Bluetooth communication function. In response to receiving a first user input, the first home device sends a first message in a Bluetooth manner, the first message comprising a first identifier, the first identifier being pre-stored in the first terminal and the first home device, the first identifier being generated according to a first account, the first account corresponding to the first terminal and the first home device; in response to receiving the first message, the first terminal acquires the first identifier and establishes a Bluetooth transmission channel with the first home device; the first home device sends a second message to the first terminal through the Bluetooth transmission channel, the second message comprising first data, the first data comprising usage record data of the first home device in a first historical time length and the first identifier, the first data being used to feed back usage record data of the first account in the first historical time length; in response to receiving the second message, the first terminal sends the first data to the server.

[0223] In some embodiments, the communication system can further comprise a second terminal, and the method can further comprise: in response to receiving a second user input, the first home device sends a third message in a Bluetooth manner, the third message comprising a second identifier, the second identifier being pre-stored in the second terminal and the first home device, the second identifier being generated according to a second user account, the second user account corresponding to the second terminal and the first home device; in response to receiving the third message, the terminal acquires the second identifier and establishes a Bluetooth transmission channel with the first home device; the first home device sends a fourth message to the second terminal through the Bluetooth transmission channel, the fourth message comprising second data, the second data comprising usage record data of the first home device in a second historical time length and the second identifier, the second data being used to feed back usage record data of the second user account in the second historical time length; in response to receiving the fourth message, the second terminal sends the second data to the server.

[0224] Further, the first account corresponds to the first terminal one-to-one and corresponds to the first home device one-to-one.

[0225] Further, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, comprising: in response to receiving the first user input, the first home device sends the first message in a low-power Bluetooth manner.

[0226] Further, the first user input comprises any one of a first user opening operation on the first home device, a first user closing operation on the first home device, a first user pressing operation on the first home device and a first user touching operation on the first home device.

[0227] Further, the first home device includes an identity recognition unit configured to obtain a human biological feature of the user; and in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, including: in response to the first user operating the identity recognition unit, the first home device determines the first user corresponding to the first account according to the human biological feature of the first user obtained by the identity recognition unit; and the first home device sends the first message in the Bluetooth manner.

[0228] Further, the first home device can include a smart toothbrush, a smart water cup, and a smart pillow.

[0229] Further, the first home device includes a smart toothbrush, and the first data includes one or more of a brushing duration, a brushing mode, a brushing start, a brushing intensity, and a brushing score.

[0230] Further, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, including: in response to receiving the first user operating a start key of the smart toothbrush, the smart toothbrush sends the first message in the Bluetooth manner.

[0231] Further, the first home device includes a smart water cup, and the first data includes one or more of a daily water consumption of the user, an average water consumption in a week, and a water consumption target.

[0232] Further, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, including: in response to receiving the first user opening a cup cover of the smart water cup, the smart water cup sends the first message in the Bluetooth manner.

[0233] Further, the first home device includes a smart pillow, and the first data includes one or more of a sleep time, a sleep duration, a sleep habit, a sleep score, a sleep problem analysis, and a sleep improvement suggestion.

[0234] Further, in response to receiving the first user input, the first home device sends the first message in a Bluetooth manner, including: in response to receiving the first user pressing the smart pillow with the head, the smart pillow sends the first message in the Bluetooth manner.

[0235] Further, before the first home device sends the first message in Bluetooth in response to receiving the first user input, further comprising: in response to receiving a third user input, the first home device sends a fifth message in Bluetooth, the fifth message comprising device information of the first home device; in response to receiving the fifth message, the first terminal acquires the device information of the first home device; the first terminal sends a first request to the server, the first request being used to request the server to register the first home device by using the device information of the first home device, the first request carrying the device information of the first home device; the server registers the first home device according to the first request, and generates registration completion information after the registration is completed, and sends the registration completion information to the first terminal; the first terminal receives the registration completion information sent by the server.

[0236] Further, the device information of the first home device comprises one or more of a device type, a physical address, and a serial number.

[0237] Further, after the server registers the first home device according to the first request, further comprising: the server generates a first identifier according to the first account; the server sends the first identifier to the first terminal; the first terminal receives the first identifier and stores the first identifier; the first terminal sends the first identifier to the first home device; the first home device receives the first identifier and stores the first identifier.

[0238] Further, after the server registers the first home device according to the first request, further comprising: the server allocates a first access credential to the first terminal and the first home device; the server sends the first access credential to the first terminal; the first terminal receives the first access credential and sends the first access credential to the first home device.

[0239] Further, before the first home device sends the second message to the first terminal through the Bluetooth transmission channel, further comprising: the first home device encrypts the to-be-sent message by using the first access credential to obtain the second message; before the first terminal sends the first data to the server in response to receiving the second message, further comprising: the first terminal receives the second message sent by the first home device through the Bluetooth transmission channel; the first terminal decrypts the second message by using the first access credential to obtain the first data.

[0240] Further, in response to receiving the first message, the first terminal acquires the first identifier and establishes the Bluetooth transmission channel with the first home device, comprising: the first terminal establishes the Bluetooth transmission channel with the first home device according to the first identifier and the first terminal satisfying a first condition with the first home device.

[0241] Further, the first condition can comprise: a distance between the first terminal and the first home device is less than or equal to a first preset distance; or, the distance between the first terminal and the first home device is less than or equal to the first preset distance, and there is no obstacle between the first terminal and the first home device.

[0242] Further, after the first terminal sends the first data to the server in response to receiving the second message, the method further comprises: the first terminal disconnects the Bluetooth transmission channel with the first home device.

[0243] The specific implementation of the embodiments of the present application is described above, and the embodiments of the present application will not be described again.

[0244] In the embodiments of the present application, the first home device is started in response to the first user input, and the first home device sends the first message in the form of Bluetooth. The first terminal obtains the first identifier carried in the first message and automatically establishes a Bluetooth transmission channel with the first home device. The first home device sends the use record data of the first home device in the first historical time length to the first terminal through the Bluetooth transmission channel. The first terminal sends the use record data to the server. It can be seen that in the whole data transmission process, the user only needs to start the first home device to work, and in the process of the first home device working (that is, in the process of the user using the first home device), the first home device will automatically establish a Bluetooth transmission channel with the first terminal, and the first home device will automatically transmit the first data to the first terminal. The whole process does not need the user to perform tedious operations for uploading data to the server, which simplifies the operation, and in the case of no user awareness, the home device can automatically transmit data to the server.

[0245] In addition, in the embodiments of the present application, the first home device also does not need to transmit data to the server through the Bluetooth low energy gateway (BLE gateway), and does not need to additionally purchase the BLE gateway. In this way, a series of problems existing in the BLE gateway are avoided, such as the BLE gateway still consumes energy when there is no data transmission, the BLE gateway uses a plug-in power supply mode which is not convenient for moving, the BLE device in the home cannot be connected to the BLE gateway at all times, and the like. Therefore, the scheme provided in the embodiments of the present application is more practical.

[0246] The various schemes in the above embodiments of the present application can be combined under the premise of not contradicting each other.

[0247] The embodiments of the present application also provide a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform any of the above methods.

[0248] The embodiments of the present application also provide a computer program product comprising instructions which, when executed on a computer, cause the computer to perform any of the above methods.

[0249] The chip comprises a processor and an interface circuit, the interface circuit is coupled with the processor, the processor is used to run computer programs or instructions to realize the method, and the interface circuit is used to communicate with other modules outside the chip.

[0250] Any feature or step in the embodiments of the present application can be freely combined with any other feature or step from other embodiments of the present application. The combined technology is also within the scope of the present application.

[0251] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this paper is only a description of the association between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more. "First", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different.

[0252] In the description of the present application, "exemplary" or "for example" is used to mean example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific way.

[0253] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0254] In the several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiment described above is only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0255] The units described as separate components may or may not be physically separate, and the components displayed as units may be a physical unit or multiple physical units, that is, may be located in one place, or also can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0256] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0257] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical scheme of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical scheme can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0258] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A data transmission method applied to a communication system, the communication system comprising a first home appliance, a first terminal, and a server, wherein the first home appliance includes a Bluetooth Low Energy module or has Bluetooth Low Energy communication functionality; characterized in that, The method includes: In response to receiving a first user input, the first home device sends a first message via Bluetooth. The first message includes a first identifier, which is pre-stored in the first terminal and the first home device. The first identifier is generated based on a first account, which corresponds to the first terminal and the first home device. The first identifier is a Bluetooth Low Energy Broadcast Filter ID. In response to receiving the first message, the first terminal obtains the first identifier and establishes a Bluetooth transmission channel with the first home device; The first home device sends a second message to the first terminal through the Bluetooth transmission channel. The second message includes first data, which includes the usage record data of the first home device within a first historical period and the first identifier. The first data is used to provide feedback on the usage record data of the first account within the first historical period. In response to receiving the second message, the first terminal sends the first data to the server.

2. The method according to claim 1, characterized in that, The communication system further includes a second terminal, and the method further includes: In response to receiving input from a second user, the first home device sends a third message via Bluetooth. The third message includes a second identifier, which is pre-stored in the second terminal and the first home device. The second identifier is generated based on a second user account, which corresponds to the second terminal and the first home device. In response to receiving the third message, the terminal obtains the second identifier and establishes a Bluetooth transmission channel with the first home device; The first home appliance sends a fourth message to the second terminal through the Bluetooth transmission channel. The fourth message includes second data, which includes the usage record data of the first home appliance within a second historical period and the second identifier. The second data is used to provide feedback on the usage record data of the second user account within the second historical period. In response to receiving the fourth message, the second terminal sends the second data to the server.

3. The method according to claim 1 or 2, characterized in that, The first user input includes any one of the following: the first user's operation to turn on the first home appliance, the first user's operation to turn off the first home appliance, the first user's operation to press the first home appliance, and the first user's operation to touch the first home appliance.

4. The method according to claim 1 or 2, characterized in that, The first home appliance includes an identity recognition unit, which is used to acquire the user's human biometric characteristics; The first home device sending a first message via Bluetooth in response to receiving first user input includes: In response to the first user's operation on the identity recognition unit, the first home device determines that the first user corresponds to the first account based on the human biometric characteristics of the first user obtained by the identity recognition unit; The first home device sends the first message via Bluetooth.

5. The method according to claim 1 or 2, characterized in that, The first home device includes a smart toothbrush, a smart water cup, and a smart pillow; the first user input is a single user input.

6. The method according to claim 5, characterized in that, The first home appliance includes a smart toothbrush. In response to receiving a first user input, the first home appliance sends a first message via Bluetooth, including: In response to receiving the first user's operation of the power button on the smart toothbrush, the smart toothbrush sends the first message via Bluetooth.

7. The method according to claim 5, characterized in that, The first home appliance includes a smart water bottle. In response to receiving a first user input, the first home appliance sends a first message via Bluetooth, including: In response to receiving an operation from the first user to open the lid of the smart water bottle, the smart water bottle sends the first message via Bluetooth.

8. The method according to claim 5, characterized in that, The first home device includes a smart pillow, and in response to receiving a first user input, the first home device sends a first message via Bluetooth, including: In response to receiving a press operation from the first user's head on the smart pillow, the smart pillow sends the first message via Bluetooth.

9. A data transmission method applied to a first home appliance, the first home appliance including a Bluetooth Low Energy module or having Bluetooth Low Energy communication functionality, characterized in that, The method includes: In response to receiving a first user input, the first home device sends a first message via Bluetooth. The first message includes a first identifier, which is pre-stored in the first terminal and the first home device. The first identifier is generated based on a first account, which corresponds to the first terminal and the first home device. The first identifier is a Bluetooth Low Energy Broadcast Filter ID. After the first terminal establishes a Bluetooth transmission channel with the first home device based on the first identifier, the first home device sends a second message to the first terminal through the Bluetooth transmission channel. The second message includes first data, which includes the usage record data of the first home device within a first historical period and the first identifier. The first data is used to provide feedback on the usage record data of the first account within the first historical period. The first terminal is used to send the first data to the server in response to receiving the second message.

10. The method according to claim 9, characterized in that, The first user input includes any one of the following: the first user's operation to turn on the first home appliance, the first user's operation to turn off the first home appliance, the first user's operation to press the first home appliance, and the first user's operation to touch the first home appliance.

11. A data transmission method, applied to a first terminal, characterized in that, The method includes: In response to receiving the first message, the first terminal obtains the first identifier and establishes a Bluetooth transmission channel with the first home device; the first message is sent by the first home device in response to receiving input from the first user via Bluetooth, the first message includes the first identifier, the first identifier is pre-stored in the first terminal and the first home device, the first identifier is generated based on the first account, the first account corresponds to the first terminal and the first home device, and the first identifier is a Bluetooth Low Energy Broadcast Filter ID; Receive a second message sent by the first home device through the Bluetooth transmission channel. The second message includes first data, which includes usage record data of the first home device within a first historical period and the first identifier. The first data is used to provide feedback on the usage record data of the first account within the first historical period. In response to receiving the second message, the first terminal sends the first data to the server.

12. A household appliance, characterized in that, The home device includes a Bluetooth Low Energy module or has Bluetooth Low Energy communication functionality. The home device includes: one or more processors; and a memory storing code; when the code is executed by the processor, the home device performs the method as described in claim 9 or 10.

13. A terminal, characterized in that, The terminal includes: one or more processors; and a memory storing code; when the code is executed by the processor, the terminal performs the method as described in claim 11.

14. A communication system comprising a first home appliance, a first terminal, and a server, wherein the first home appliance includes a Bluetooth Low Energy module or has Bluetooth Low Energy communication functionality; characterized in that, The first home appliance is used to perform: In response to receiving a first user input, the first home device sends a first message via Bluetooth. The first message includes a first identifier, which is pre-stored in the first terminal and the first home device. The first identifier is generated based on a first account, which corresponds to the first terminal and the first home device. The first identifier is a Bluetooth Low Energy Broadcast Filter ID. After the first terminal establishes a Bluetooth transmission channel with the first home device based on the first identifier, the first home device sends a second message to the first terminal through the Bluetooth transmission channel. The second message includes first data, which includes the usage record data of the first home device within a first historical period and the first identifier. The first data is used to provide feedback on the usage record data of the first account within the first historical period. The first terminal is used to execute: In response to receiving the first message, the first terminal obtains the first identifier and establishes a Bluetooth transmission channel with the first home device; Receive the second message sent by the first home appliance through the Bluetooth transmission channel; In response to receiving the second message, the first terminal sends the first data to the server.

15. A computer-readable storage medium, characterized in that, The instruction includes computer instructions that, when executed on a home appliance, cause the home appliance to perform the data transmission method as described in claim 9 or 10, or, when executed on a terminal, cause the terminal to perform the data transmission method as described in claim 11.

16. A computer program product containing instructions, characterized in that, When the computer program product is run on a home appliance, it causes the home appliance to perform the data transmission method as described in claim 9 or 10; or, when the computer instructions are run on a terminal, it causes the terminal to perform the data transmission method as described in claim 11.

17. A chip, characterized in that, It includes a processor and an interface circuit coupled to the processor, the processor being used to run computer programs or instructions to implement the data transmission method as described in claim 9 or 10, or to implement the data transmission method as described in claim 11.

Citation Information

Patent Citations

  • Intelligent shoe

    CN205671577U