CN114205812A - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN114205812A
CN114205812A CN202010899646.3A CN202010899646A CN114205812A CN 114205812 A CN114205812 A CN 114205812A CN 202010899646 A CN202010899646 A CN 202010899646A CN 114205812 A CN114205812 A CN 114205812A
Authority
CN
China
Prior art keywords
antenna
electronic device
message
specific data
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010899646.3A
Other languages
Chinese (zh)
Inventor
劳成彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010899646.3A priority Critical patent/CN114205812A/en
Priority to PCT/CN2021/115541 priority patent/WO2022042740A1/en
Publication of CN114205812A publication Critical patent/CN114205812A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/02Transmitters
    • H04B1/04Circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/02Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
    • H04B7/04Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
    • H04B7/06Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/02Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
    • H04B7/04Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
    • H04B7/06Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station
    • H04B7/0602Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas at the transmitting station using antenna switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation

Abstract

A data transmission method and electronic equipment relate to the technical field of electronics, simplify complexity of user operation, and improve safety of data transmission. The method comprises the following steps: the first electronic device sends a request for transmitting specific data to the second electronic device after receiving input of the specific data, the second electronic device sends a generated first random number through the weak antenna after receiving the request, the first electronic device is located within the transmitting distance of the weak antenna and receives the first random number, and the first electronic device also sends a generated second random number through the weak antenna. The two electronic devices respectively use the first random number and the second random number to generate session keys, the first electronic device uses the session keys generated by the first electronic device to encrypt specific data and sends the specific data to the second electronic device, and the second electronic device uses the session keys generated by the second electronic device to decrypt the specific data after receiving the encrypted specific data.

Description

Data transmission method and electronic equipment
Technical Field
The application relates to the technical field of internet of things, in particular to a data transmission method and electronic equipment.
Background
There are a number of scenarios in real life that require the transfer of data from one device to another. For example, when a new device is replaced, it is necessary to transmit configuration information and the like in the old device to the new device. For another example, when a plurality of IoT devices of the same model are newly purchased, configuration information of the IoT devices that have been set in the IoT devices needs to be cloned to other IoT devices.
Currently, a third-party device (for example, a device installed with clone application software, or a gateway device, or a server) is generally required to be relied on to complete data transmission between two devices. Specifically, the device for sending data establishes a connection with the third-party device first, and sends the data to be sent to the third-party device. Then, the third-party device establishes a connection with the device receiving the data, and forwards the data to be sent to the device receiving the data. Therefore, a user needs to perform connection, data export, and data import on a plurality of devices, which is cumbersome to operate. In addition, when the data to be transmitted is sensitive data such as distribution network information, configuration information of equipment, user data and the like, the data to be transmitted is exported and cached, and leakage risks exist on third-party equipment.
Disclosure of Invention
According to the data transmission method, the complexity of user operation can be simplified, and meanwhile, the safety of data transmission is improved.
In a first aspect, an electronic device for data transmission is provided. The electronic device includes: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform the steps of: receiving an input; in response to the input, sending a first message at a first periodicity through the first antenna; receiving a second message of another electronic device; responding to the second message, switching to the second antenna, and sending a third message at a second period through the second antenna; wherein the third message contains specific data; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful. Therefore, the communication safety can be improved, the rapid transmission of specific data is realized, and the complexity of user operation is reduced.
In a second aspect, an electronic device for data transmission is provided. The electronic device includes: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform the steps of: receiving an input; in response to the input, sending a first message at a first periodicity through the first antenna; receiving a second message of another electronic device; responding to the second message, acquiring a first random number from the second message, generating a second random number, switching to the second antenna, and sending a third message containing the second random number through the second antenna; generating a session key according to the first random number and the second random number, encrypting the specific data using the session key, and sending a fourth message to the other electronic device, the fourth message including the encrypted specific data. Therefore, the communication safety can be improved, the key negotiation process can be simplified, and the specific data can be transmitted quickly. Moreover, it can be noted that the user does not need to manually input information such as the verification code in the key agreement process, and the complexity of the user operation is also reduced.
According to the second aspect, after the message that the specific data transmission of the other electronic device is successful is received, or after the fourth message is sent, the specific data transmission is prompted to be successful. In this way, the electronic device prompts, so that a user of the electronic device can know that the transmission is successful.
According to the second aspect, or any implementation manner of the second aspect above, the encrypting the specific data by using the session key, and sending a fourth message to the other electronic device specifically includes: switching to the first antenna of the electronic device, and sending the fourth message through the first antenna of the electronic device. In this way, the user of the electronic device does not need to keep the electronic device and the other electronic device within a preset safety distance all the time, and the specific data can be transmitted within a longer distance.
According to a second aspect, or any implementation manner of the second aspect above, the electronic device further performs: the fourth message further includes a first integrity check value for the particular data. Therefore, the specific data are further guaranteed not to be tampered by calculating the complete check value of the specific data, and the safety of data transmission is improved.
According to a second aspect, or any implementation manner of the second aspect, the prompting that the specific data transmission is successful includes: displaying the message that the specific data is successfully transmitted, and/or playing the voice of the specific data which is successfully transmitted. In this way, the specific form of prompting a particular data transmission project is refined.
According to a second aspect, or any implementation form of the second aspect above, the specific data comprises at least one of configuration information and user data; the configuration information comprises one or more of network configuration information, sensor alarm threshold setting information, alarm triggering action information, silent time setting information, timer setting information, firmware upgrading setting information and power utilization threshold setting information; the user data includes one or more of installation data of an application program, photos, videos, sound recordings, and files stored on the electronic device, and a log of execution of the electronic device. Thus, the detailed information of the part of the specific data is listed.
In a third aspect, an electronic device is provided. The electronic device includes: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising: receiving an input; receiving a first message of another electronic device; responding to the first message, switching to the second antenna, generating a first random number, and sending a second message comprising the first random number at a second period through the second antenna; receiving a third message of the other electronic device; responding to the third message, acquiring the second random number from the third message, and generating a session key according to the first random number and the second random number; receiving a fourth message of the other electronic device; and responding to the fourth message, acquiring the encrypted specific data from the fourth message, and decrypting by using the session key to obtain the specific data. Therefore, the electronic equipment side at the receiving end can improve the communication safety, realize the rapid transmission of specific data and reduce the complexity of user operation.
According to the third aspect, or any implementation manner of the third aspect above, the electronic device further performs: receiving a first complete verification value of the specific data sent by the other electronic equipment, and calculating a second complete verification value of the specific data; and after the second complete verification value is equal to the first complete verification value, sending a message that the specific data transmission is successful to the other electronic equipment. Therefore, the specific data are further guaranteed not to be tampered by calculating the complete check value of the specific data, and the safety of data transmission is improved.
According to the third aspect, or any implementation manner of the third aspect, the sending the message that the specific data transmission is successful to the other electronic device specifically includes: and switching to the first antenna, and sending a message that the specific data transmission is successful by using the first antenna. In this way, the specific transmission mode is refined.
In a fourth aspect, an electronic device is provided. The electronic device does not access a routing device or a hotspot, the electronic device comprising: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising: receiving an input; receiving a first message of another electronic device; responding to the first message, switching to the second antenna, and sending a second message through the second antenna; wherein the second message comprises specific data of the electronic device; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the second message is sent, prompting that the specific data transmission is successful. Therefore, the communication safety can be improved, the rapid transmission of specific data is realized, and the complexity of user operation is reduced.
In a fifth aspect, an electronic device is provided. The electronic device does not access a routing device or a hotspot, the electronic device comprising: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising: receiving an input; receiving a first message of another electronic device; responding to the first message, switching to the second antenna, and sending a second message through the second antenna; receiving a response message of the other electronic device to the second message; switching to the first antenna in response to the response message, and transmitting a third message containing specific data through the first antenna; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful. Therefore, the communication safety can be improved, the key negotiation process can be simplified, and the specific data can be transmitted quickly. Moreover, it can be noted that the user does not need to manually input information such as the verification code in the key agreement process, and the complexity of the user operation is also reduced.
According to a fifth aspect, the second message comprises a session key, and the third message contains specific data encrypted with the session key. In this way, security is further increased by means of the key.
According to a fifth aspect, or any implementation manner of the above fifth aspect, the session key is preset; the specific data is a log of the electronic device. In this way, the specific form of the particular data is refined.
In a sixth aspect, a method of data transmission is provided. The method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input; in response to the input, sending a first message at a first periodicity through the first antenna; receiving a second message of another electronic device; responding to the second message, switching to the second antenna, and sending a third message at a second period through the second antenna; wherein the third message contains specific data; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
In a seventh aspect, a method for data transmission is provided. The method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input; in response to the input, sending a first message at a first periodicity through the first antenna; receiving a second message of another electronic device; responding to the second message, acquiring a first random number from the second message, generating a second random number, switching to the second antenna, and sending a third message containing the second random number through the second antenna; generating a session key according to the first random number and the second random number, encrypting the specific data using the session key, and sending a fourth message to the other electronic device, the fourth message including the encrypted specific data.
According to the seventh aspect, after the message that the specific data transmission of the other electronic device is successful is received, or after the fourth message is sent, the specific data transmission is prompted to be successful.
According to a seventh aspect, or any implementation manner of the foregoing seventh aspect, the encrypting the specific data by using the session key, and sending a fourth message to the another electronic device specifically includes: switching to the first antenna of the electronic device, and sending the fourth message through the first antenna of the electronic device.
According to a seventh aspect, or any one of the above implementations of the seventh aspect, the method further comprises: the fourth message further includes a first integrity check value for the particular data.
According to a seventh aspect, or any implementation manner of the seventh aspect above, the prompting that the specific data transmission is successful includes: displaying the message that the specific data is successfully transmitted, and/or playing the voice of the specific data which is successfully transmitted.
According to a seventh aspect, or any implementation of the seventh aspect above, the specific data comprises at least one of configuration information and user data; the configuration information comprises one or more of network configuration information, sensor alarm threshold setting information, alarm triggering action information, silent time setting information, timer setting information, firmware upgrading setting information and power utilization threshold setting information; the user data includes one or more of installation data of an application program, photos, videos, sound recordings, and files stored on the electronic device, and a log of execution of the electronic device.
In an eighth aspect, a data transmission method is provided. The method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input; receiving a first message of another electronic device; responding to the first message, switching to the second antenna, generating a first random number, and sending a second message comprising the first random number at a second period through the second antenna; receiving a third message of the other electronic device; responding to the third message, acquiring the second random number from the third message, and generating a session key according to the first random number and the second random number; receiving a fourth message of the other electronic device; and responding to the fourth message, acquiring the encrypted specific data from the fourth message, and decrypting by using the session key to obtain the specific data.
According to an eighth aspect, the method further comprises: receiving a first complete verification value of the specific data sent by the other electronic equipment, and calculating a second complete verification value of the specific data; and after the second complete verification value is equal to the first complete verification value, sending a message that the specific data transmission is successful to the other electronic equipment.
According to an eighth aspect, or any implementation manner of the eighth aspect, the sending the message that the specific data transmission is successful to the other electronic device specifically includes: and switching to the first antenna, and sending a message that the specific data transmission is successful by using the first antenna.
In a ninth aspect, a data transmission method is provided. The method is applied to an electronic device, the electronic device does not access a routing device or a hotspot, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input; receiving a first message of another electronic device; switching to the second antenna in response to the first message, and transmitting a second message through the second antenna; wherein the second message comprises specific data of the electronic device; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the second message is sent, prompting that the specific data transmission is successful.
In a tenth aspect, a data transmission method is provided. The method is applied to an electronic device, the electronic device does not access a routing device or a hotspot, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input; receiving a first message of another electronic device; responding to the first message, switching to the second antenna, and sending a second message through the second antenna; receiving a response message of the other electronic device to the second message; switching to the first antenna in response to the response message, and transmitting a third message containing specific data through the first antenna; and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
According to a tenth aspect, the second message comprises a session key, and the third message contains specific data encrypted with the session key.
According to a tenth aspect, or any implementation manner of the above tenth aspect, the session key is preset; the specific data is a log of the electronic device.
For any one implementation manner of the sixth aspect and the sixth aspect, any one implementation manner of the seventh aspect and the seventh aspect, any one implementation manner of the eighth aspect and the eighth aspect, any one implementation manner of the ninth aspect and the ninth aspect, any one implementation manner of the tenth aspect and the tenth aspect, and corresponding technical effects, reference may be made to the corresponding aspect and any one implementation manner of the corresponding aspect, and corresponding technical effects, and no further description is given here.
In an eleventh aspect, a computer-readable storage medium is provided. The computer readable storage medium comprises a computer program which, when run on an electronic device, causes the electronic device to perform the method as any one of the implementations of the sixth aspect and the sixth aspect, any one of the implementations of the seventh aspect and the seventh aspect, any one of the implementations of the eighth aspect and the eighth aspect, any one of the implementations of the ninth aspect and the ninth aspect, or any one of the implementations of the tenth aspect and the tenth aspect.
A twelfth aspect provides a computer program product which, when run on a computer, causes the computer to perform the method as any one of the implementations of the sixth aspect and the sixth aspect, any one of the implementations of the seventh aspect and the seventh aspect, any one of the implementations of the eighth aspect and the eighth aspect, any one of the implementations of the ninth aspect and the ninth aspect, or any one of the implementations of the tenth aspect and the tenth aspect.
For any implementation manner and corresponding technical effect of the twelfth aspect and the twelfth aspect, reference may be made to the corresponding aspect and any implementation manner and corresponding technical effect of the corresponding aspect, which are not described herein again.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of data transmission according to an embodiment of the present application;
fig. 5 is a schematic flow chart of data transmission according to an embodiment of the present application;
fig. 6 is a schematic flow chart of data transmission according to an embodiment of the present application;
fig. 7 is a schematic flow chart of data transmission according to an embodiment of the present application;
FIG. 8 is a schematic diagram of some graphical user interfaces of an electronic device provided by an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
In the description of the embodiments of the present application, "/" means "or" unless otherwise specified. For example, A/B may represent A or B. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified. In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. As shown in fig. 1, a first electronic device 100 and a second electronic device 200 may communicate wirelessly.
For example, in the embodiment of the present application, the first electronic device 100 may be a mobile device, a home appliance, a sensor device, or the like. For example, the first electronic device 100 may be a mobile device such as a mobile phone, a tablet computer, a Personal Computer (PC), a Personal Digital Assistant (PDA), a netbook, a wearable device (e.g., a smart watch, a smart bracelet), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an in-vehicle device, a smart screen, a smart speaker, and a smart camera. For another example, the first electronic device 100 may be an intelligent household appliance such as an intelligent refrigerator, an intelligent television, an intelligent lamp, an intelligent socket, an intelligent air purifier, a humidifier, an intelligent range hood, an intelligent door lock, an intelligent patch board, an intelligent induction cooker, an intelligent fan, an intelligent disinfection box, and an intelligent aromatherapy machine. For another example, the first electronic device 100 may be a sensor device such as a smoke sensor, a gas sensor, a human body sensor, a temperature sensor, a humidity sensor, a door/window sensor, a PM2.5 air sensor, a door/window switch sensor, an emergency button, or an alarm. The second electronic device 200 may also be any one of a mobile device, an electric home appliance, or a sensor device. The embodiment of the present application does not limit the specific forms of the first electronic device 100 and the second electronic device 200.
The structure of the first electronic device 100 is explained below. It should be noted that the second electronic device 200 may also refer to the structure of the first electronic device 100, but the second electronic device 200 may include more or less components than the first electronic device 100, or combine some components, or split some components, or arrange different components. The second electronic device 200 may be an electronic device of the same type as the first electronic device 100, or an electronic device of a different type, which is not limited in this embodiment of the application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a first electronic device 100 according to an embodiment of the present disclosure. The first electronic device 100 may include one or more processors 110, one or more memories 120, and one or more communication interfaces 130, a wireless communication module 140, and one or more antennas, among others. The processor 110, the memory 120, the communication interface 130, and the wireless communication module 140 are connected by a bus.
The processor 110 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or an Integrated Circuit for controlling the execution of the program in the present embodiment. In one example, the processor 110 may include multiple CPUs, and the processor 110 may be one single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A single-core processor or a processor in a multi-core processor may refer to one or more devices, circuits, or processing cores for processing data (e.g., computer program instructions).
Memory 120 may be used to store computer-executable program code, including instructions. The internal memory may include a program storage area and a data storage area. The storage program area may store an operating system, and programs or instructions and the like that are required to be used in the embodiments of the present application.
Communication interface 130 may be used to communicate with other devices or communication networks, such as ethernet, Wireless Local Area Networks (WLAN), etc. In some examples, the first electronic device 100 may not include the communication interface 130, which is not limited in this embodiment.
The wireless communication module 140 may provide a solution for wireless communication applied on the first electronic device 100, including WLAN (e.g., Wi-Fi) network), bluetooth, NFC, infrared technology, etc. The wireless communication module 140 may be one or more devices integrating at least one communication processing module. The wireless communication module 140 receives electromagnetic waves via an antenna, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. Wireless communication module 140 may also receive signals to be transmitted from processor 110, frequency modulate them, amplify them, and convert them into electromagnetic waves via an antenna for radiation.
In some embodiments, as shown in fig. 2, the first electronic device 100 includes at least two antennas, such as antenna 1 (the first antenna, also referred to as a strong antenna) and antenna 2 (the second antenna, also referred to as a weak antenna). The wireless communication module 140 may switch between antenna 1 and antenna 2. The transmission power applied to the antenna 1 or the antenna 2 is the same. Wherein, the transmitting distance of the antenna 1 is a first distance. The transmission distance of the antenna 2 is the second distance. The second distance is less than the first distance. For example, when the wireless communication module 140 switches to the antenna 1 to transmit a wireless signal, electronic devices located within a first distance (e.g., the first distance is 6m, 8m, 10m) of the first electronic device 100 may receive the wireless signal. When the wireless communication module 140 switches to the antenna 2 to transmit a wireless signal, an electronic device located within a second distance (e.g., the second distance is 30cm) of the first electronic device 100 may receive the wireless signal. The second distance is less than or equal to a preset safety distance. The preset safety distance is smaller than the first distance. The first distance, the second distance and the preset safety distance can be adjusted and set by a user according to needs. In one embodiment, the second distance may be a preset safety distance. In other words, when the first electronic device 100 needs to transmit an ultra-short range wireless signal, the wireless communication module 140 may be controlled to be connected to the antenna 2 to transmit the ultra-short range wireless signal. When the first electronic device 100 does not need to transmit an ultra-short range wireless signal, the wireless communication module 140 may be controlled to be connected to the antenna 1 to transmit a normal wireless signal.
In other embodiments, as shown in FIG. 3, the first electronic device 100 may include a variable resistance circuit module 150 and an antenna. The variable resistance circuit module 150 may change the magnitude of the resistance value under the control of the wireless communication module 140, thereby changing the transmission distance of the same antenna. That is, when the resistance value of the variable resistance circuit module 150 is adjusted to the resistance value 1, the transmission power of the antenna is the first transmission power (higher transmission power), and the transmission distance of the antenna is the first distance. At this time, electronic devices located within a first distance (e.g., the first distance is 6m, 8m, 10m) of the first electronic device 100 may receive the wireless signal. When the resistance value of the variable resistance circuit module 150 is adjusted to the resistance value 2, the transmission power of the antenna is the second transmission power (lower transmission power), and the transmission distance of the antenna is the second distance. The second transmit power is less than the first transmit power. The second distance is less than or equal to a preset safety distance. The preset safety distance is smaller than the first distance. The first distance, the second distance and the preset safety distance can be adjusted and set by a user according to needs. In one embodiment, the second distance may be a preset safety distance. In other words, when the first electronic device 100 needs to transmit the ultra-short distance wireless signal, the resistance value of the variable resistance circuit module 150 may be controlled to be adjusted to the resistance value 2 to transmit the ultra-short distance wireless signal. When the first electronic device 100 does not need to transmit the ultra-short distance wireless signal, the resistance value of the variable resistance circuit module 150 may be controlled to be adjusted to 1 so as to transmit the normal wireless signal. In other words, in the other embodiments, when the resistance value of the variable resistance circuit module 150 is adjusted to be 1, the first electronic device 100 is connected to the first antenna. When the resistance value of the variable resistance circuit module 150 is adjusted to the resistance value 2, the first electronic device 100 is connected to the second antenna; the first antenna and the second antenna are the same, but the transmission distance of the first antenna is greater than that of the second antenna; the transmitting distance of the second antenna is smaller than or equal to the preset safety distance, and the transmitting distance of the first antenna is larger than the preset safety distance. The transmission distance of the first antenna and the transmission distance of the second antenna are the first distance and the second distance respectively.
For example, the wireless communication mode adopted by the wireless communication module 140 may specifically adopt a mode such as BLE, Wi-Fi Aware, and the like. The wireless communication mode is based on the computer network MAC (Medium Access Control) layer, also called as interaction by data link layer protocol extension, and data interaction can be completely realized at the data link layer without involving upper network communication of the MAC layer. BLE is an ultra-low power consumption short-range wireless communication scheme for device B introduced by the bluetooth special interest group in 2016, and communication can be achieved through the MAC layer. Wi-Fi neighbor discovery Network (also called Wi-Fi neighbor discovery Network, NAN for short) is a novel Wi-Fi Mesh communication technology with low power consumption and Point-to-Point interconnection and intercommunication, and the technology can bypass Network infrastructure (such as Access Point (AP) or cellular Network), realize connection communication among one-to-one, one-to-many or many-to-many devices, and also realize communication through an MAC layer. It will be appreciated that the higher the number of layers of the computer network involved, the more difficult it is to ensure its security. The wireless-based MAC layer communication adopted in this embodiment enables data to interact based on a data link layer protocol extension, which can significantly improve the security of data transmission.
The technical solutions in the following embodiments can be implemented in the first electronic device 100 and the second electronic device 200 having the above-described structures. The first electronic device and the second electronic device each include a first antenna and a second antenna. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 4 is a schematic flowchart of a data transmission method according to an embodiment of the present application. As shown in fig. 4, the method includes:
s401, the first electronic device receives an input.
S401', the second electronic device receives an input.
Wherein the first electronic device receives an input instructing the first electronic device to transmit specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
The second electronic device receives an input instructing the second electronic device to receive specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
In some embodiments, the first electronic device stores configuration information including, but not limited to, network settings, sensor alarm threshold settings, alarm trigger actions, quiet time settings, timer settings, firmware upgrade settings, power usage threshold settings, and the like. Wherein the distribution network information for example comprises an identification of the Wi-Fi network (e.g. Service Set Identifier (SSID), password, etc.) information, it is noted that the configuration information differs depending on the device type, model, etc. of the first electronic device, the second electronic device is a device that is not Set, wherein the first electronic device receives an input, which may be an operation instructing the first electronic device to send configuration information to the second electronic device, for example a predefined operation 1 is performed on the first electronic device for the user, wherein the predefined operation 1 is for example a pressing of a specific key (physical key or virtual key) on the first electronic device. The predefined operation 2 is for example a power-on or an instruction to set the operation of the second electronic device.
As an example, the first electronic device and the second electronic device are of the same device type, with the same or close model. Then, the configuration information of the first electronic device may be sent to the second electronic device, and the second electronic device may directly perform setting according to the received configuration information. As another example, the first electronic device and the second electronic device are of different device types. Part of configuration information in the first electronic device can be sent to the second electronic device, and the second electronic device can directly perform device operation according to the received part of configuration information. For example, when the first electronic device and the second electronic device need to access the same network, the second electronic device may also directly use the configuration information of the network setting of the first electronic device.
In other embodiments, the first electronic device is an old device used by the user and the second electronic device is a new device to be replaced by the user. Wherein the first electronic device receives an input, such as an operation instructing the first electronic device to send configuration information and/or user data to the second electronic device. That is, the specific data is configuration information and/or user data of the first electronic device. The user data includes, but is not limited to, information of an installed application program of the first electronic device, basic settings of the installed application program, a photo, a video, a sound recording, a file stored on the first electronic device, an operation log of the first electronic device, and the like. The second electronic device receives an input such as an operation to turn on the wireless function for the user or an operation to instruct to receive specific data.
It should be noted that, in the embodiment of the present application, the execution sequence of S401 and S401' is not limited.
S402, the first electronic device sends a first message in a first period through a first antenna.
Wherein the first message is for requesting transmission of specific data to the second electronic device in order to negotiate a session key with the second electronic device.
In some embodiments, the first electronic device may broadcast the request wirelessly, such as via Wi-Fi or Bluetooth. The first electronic device sends the service identifier for transmitting specific data by using Wi-Fi Aware technology as an example.
First, the NAN mechanism is briefly explained. The NAN mechanism is a standard established by the Wi-Fi alliance. The standard is that all devices participating in the NAN mechanism (i.e. NAN devices, e.g. first electronic device, second electronic device) synchronize without a central node. The maintenance work and the service discovery work of the NAN mechanism are carried out in a Discovery Window (DW) agreed by the NAN mechanism. Wherein the service discovery may be implemented by transmitting a Service Discovery Frame (SDF) message. The server discovery frame message includes a query message or a broadcast message. The NAN device may establish a corresponding connection based on information obtained in the service discovery message, and then may be intelligently managed based on the NAN. Among them, the SDF message is a kind of action frame specifically defined for service discovery. Depending on the function, the SDF message frame can be roughly divided into three types, namely, an SDF publish (publish) message, an SDF subscribe (subscribe) message, and an SDF reply (follow-up) message. The SDF publish message is used for publishing services which can be provided by the NAN device, or replying the NAN describe message sent by other NAN devices. NAN subscribe message for finding the service to use. SDF follow-up message for replying to received SDF publish message or for negotiating more information. Typically, an indication is included in the SDF message to indicate to which SDF message the message belongs.
As an example, the first electronic device may carry information such as a service identifier for transmitting specific data, an identifier of the first electronic device, and the like in the SDF publish message. As another example, the first electronic device may carry information such as a service identifier for transmitting specific data, an identifier of the first electronic device, and the like through the BLE beacon.
In still other embodiments, the first electronic device can obtain the identifier of the second electronic device or the address of the second electronic device, and may also send the first message in a peer-to-peer manner.
In still other embodiments, the first electronic device may send the first message at the first cycle within a preset time period, or may send the first message a preset number of times within the preset time period. The embodiment of the present application does not limit this.
And S403, the second electronic device receives the first message and switches to a second antenna of the second electronic device.
S404, the second electronic device generates a first random number and generates a second message according to the first random number.
Illustratively, upon receiving a request for transmission of specific data sent by the first electronic device, the second electronic device generates first random data for negotiating a session key with the second electronic device.
The execution order of S403 and S404 is not limited in the embodiments of the present application.
And S405, the second electronic device sends a second message in a second period through a second antenna.
For example, when the second electronic device has the structure shown in fig. 2, the second electronic device may control the wireless communication module 140 to connect to the second antenna. For example, when the second electronic device has the structure shown in fig. 3, the second electronic device controls the resistance value of the variable resistance circuit module 150 to be the second resistance value (larger resistance value) so that the antenna transmission power of the second electronic device is the second transmission power.
As one example, the second electronic device may carry a first random number in an SDF Follow-up message. As another example, the second electronic device may carry the first random number through BLE beacon.
It has been explained above that due to the second message transmitted by the second electronic device via the second antenna, only electronic devices within a very short distance range (e.g. 30cm) from the second electronic device can receive it. Thus, the electronic device receiving the second message may be guaranteed to be a trusted device of the second electronic device.
In some embodiments, before the second electronic device sends the second message, the second electronic device may prompt the user to bring the first electronic device close to the second electronic device by means of a voice prompt or a lamp flashing. Of course, the second electronic device may prompt the user at other occasions, for example, after receiving the first message sent by the first electronic device. The user may also be prompted by the first electronic device to approach the second electronic device. The embodiment of the application does not limit the prompting mode, the prompting time and the like.
And S406, within the transmission distance of the second antenna of the second electronic device, the first electronic device receives the second message to acquire the first random number.
S407, the first electronic device is switched to the second antenna of the first electronic device.
S408, the first electronic device generates a second random number and generates a third message according to the second random number.
And S409, the first electronic equipment sends a third message through the second antenna.
In S407-S409, in addition, a process of the first electronic device sending the third message is the same as or similar to a process of the second electronic device sending the second message, and is not described herein again. Other contents may refer to the relevant description in S405.
As one example, the first electronic device may carry the second random number in an SDF Follow-up message. As another example, the first electronic device may carry the second random number in BLE beacon.
And S410, the first electronic equipment generates a session key according to the first random number and the second random number.
For example, the first electronic device may calculate the session key using a predefined algorithm or a Key Derivation Function (KDF) in cryptography. The predefined algorithm includes, but is not limited to, data splicing, data encoding format conversion, data position conversion, HASH (HASH) operation (e.g., MD5/SHA-1, etc.), and the like. KDF algorithms include, for example, PBKDF2, bcrypt, scrypt, HKDF (HMAC-based KDF), and the like. The embodiment of the present application does not limit the specific method for generating the session key according to the first random number and the second random number.
S411, the first electronic device switches to a first antenna of the first electronic device.
Specifically, for example, when the first electronic device has the structure shown in fig. 2, the first electronic device may control the wireless communication module 140 to connect to the first antenna. For example, when the first electronic device has the structure shown in fig. 3, the first electronic device controls the resistance value of the variable resistance circuit module 150 to be the first resistance value (smaller resistance value) so that the antenna transmission power of the first electronic device is the first transmission power.
In other embodiments, the first electronic device may switch to the first antenna at other times as well. For example, after performing S409, that is, after sending the third message, the first electronic device switches back to the first antenna. For another example, before performing S413, that is, sending the fourth message to the second electronic device through the first antenna to the first electronic device, the first electronic device switches back to the first antenna. The embodiment of the present application does not limit this.
S412, the first electronic device encrypts the specific data of the first electronic device by using the session key to obtain encrypted data, and generates a fourth message according to the encrypted data.
The first electronic equipment adopts a certain encryption algorithm to encrypt the specific data by using the session key and generates the signature or integrity check information of the specific data so as to ensure the security of transmitting the specific data and avoid the leakage of the specific data.
In the process of the first electronic device performing S410-S412, the second electronic device performs S410 '-S412'. The method comprises the following specific steps:
s410', within the transmission distance of the second antenna of the first electronic device, the second electronic device receives the third message and obtains the second random number.
S411', the second electronic device switches to the first antenna of the second electronic device.
Specifically, for example, when the second electronic device has the structure shown in fig. 2, the second electronic device may control the wireless communication module 140 to connect to the first antenna. Further illustratively, when the second electronic device has the structure shown in fig. 3, the second electronic device controls the resistance value of the variable resistance circuit module 150 to be the first resistance value (smaller resistance value), so that the antenna transmission power of the second electronic device is the first transmission power.
In some other embodiments, the second electronic device may switch to the first antenna at other times, for example, after S405 is executed, that is, after the second message is sent, the second electronic device switches back to the first antenna. For another example, before performing S416, that is, the second electronic device sends a message that the specific data transmission is successful to the first electronic device through the first antenna, the second electronic device switches back to the first antenna. The embodiment of the present application does not limit this.
S412', the second electronic device generates a session key according to the first random number and the second random number.
It should be noted that, here, the algorithm used by the second electronic device to generate the session key is the same as the algorithm used by the first electronic device to generate the session key, so that the session keys generated by the two electronic devices are the same. Further, the generated session key may be used to decrypt data transmitted by the peer electronic device.
S413, the first electronic device sends the fourth message through the first antenna.
Illustratively, the first electronic device may broadcast the encrypted specific data by way of a wireless connection (e.g., Wi-Fi or bluetooth). For example, the second electronic device may carry encrypted specific data in an SDF Follow-up message or in a BLE beacon. Alternatively, the first electronic device establishes a point-to-point wireless connection (e.g., Wi-Fi or bluetooth) with the second electronic device, and transmits the encrypted specific data to the second electronic device through the wireless connection.
And S414, the second electronic device receives the fourth message and acquires the encrypted data.
S415, the second electronic device decrypts the encrypted data using the session key to obtain the specific data of the first electronic device.
The second electronic device decrypts the encrypted specific data using the session key, and verifies the signature or integrity check information of the specific data.
And S416, the second electronic device sends a message that the specific data transmission is successful through the first antenna.
S417, the first electronic device receives the specific data transmission success message, displays the specific data transmission success message and/or plays the voice of the specific data transmission success.
S417', the second electronic device displays a message that the transmission of the specific data is successful and/or plays a voice that the transmission of the specific data is successful.
In this embodiment, the execution order of S417 and S417' is not limited. In addition, in the embodiment of the present application, either one of the steps S417 and S417' may be executed, both the steps may be executed, or neither of the steps may be executed.
Therefore, in the data transmission method provided in the embodiment of the present application, the first electronic device and the second electronic device negotiate a session key by switching to the second antenna to transmit the ultra-short distance wireless signal, thereby completing authentication of both parties. The first electronic device and the second electronic device can receive the ultra-short distance wireless signal sent by the opposite-end electronic device only when the first electronic device and the second electronic device are located within the transmitting distance of the second antenna (the transmitting distance of the second antenna is smaller than or equal to the preset safety distance). Therefore, the session key is negotiated by sending the ultra-short distance wireless signal, so that the communication safety can be improved, the key negotiation process can be simplified, and the specific data can be transmitted quickly. Moreover, it can be noted that the user does not need to manually input information such as the verification code in the key agreement process, and the complexity of the user operation is also reduced.
Fig. 5 is a flowchart illustrating a method for data transmission according to an embodiment of the present application. As shown in fig. 5, the method includes:
s501, the first electronic device receives an input.
S501', the second electronic device receives an input.
Wherein the first electronic device receives an input instructing the first electronic device to transmit specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
The second electronic device receives an input instructing the second electronic device to receive specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
It should be noted that, in the embodiment of the present application, the execution sequence of S501 and S501' is not limited.
S502, the first electronic device sends a first message in a first period through a first antenna.
The first message is used for requesting to send specific data to the second electronic equipment.
S503, the second electronic device receives the first message and switches to a second antenna of the second electronic device.
S504, the second electronic device generates a first random number and generates a second message according to the first random number.
Illustratively, upon receiving a request for transmission of specific data sent by the first electronic device, the second electronic device generates first random data for negotiating a session key with the second electronic device.
The execution sequence of S503 and S504 is not limited in the embodiments of the present application.
And S505, the second electronic device sends a second message in a second period through the second antenna.
And S506, the first electronic equipment receives the second message within the transmitting distance of the second antenna of the second electronic equipment to acquire the first random number.
And S507, the first electronic device is switched to a second antenna of the first electronic device.
And S508, the first electronic equipment generates a second random number and generates a third message according to the second random number.
S509, the first electronic device sends the third message through the second antenna.
And S510, the first electronic equipment generates a session key according to the first random number and the second random number.
S511, the first electronic device switches to a first antenna of the first electronic device.
S512, the first electronic equipment encrypts specific data of the first electronic equipment by using the session key to obtain encrypted data; obtaining a first integrity check value by using an integrity check algorithm aiming at specific data of the first electronic equipment; and generating a fourth message according to the encrypted data and the first integrity check value.
For example, the integrity check algorithm may hash the encrypted data by using a hash algorithm and a key to obtain a hash value of the data (i.e., a first integrity check value), and then send the hash value and the encrypted data to the second electronic device, so that after the second electronic device receives the hash value and the encrypted data, another hash value (i.e., a second integrity check value) is calculated for the encrypted data by using the same integrity check algorithm. When the second integrity check value is equal to the first integrity check value, the encrypted data is complete and is not tampered. Then, the specific data that has not been tampered with is acquired from the entire encrypted data. Of course, other integrity check algorithms may also be used, which is not limited in this application.
In the process of the first electronic device performing S510-S512, the second electronic device performs S510 '-S512'. The method comprises the following specific steps:
s510', within the transmission distance of the second antenna of the first electronic device, the second electronic device receives the third message and obtains a second random number.
S511', the second electronic device switches to the first antenna of the second electronic device.
S512', the second electronic device generates a session key according to the first random number and the second random number.
S513, the first electronic device sends the fourth message through the first antenna.
And S514, the second electronic device receives the fourth message to obtain the encrypted data and the first integrity check value.
S515, the second electronic device decrypts the encrypted data by using the session key to obtain specific data of the first electronic device; and aiming at the specific data of the first electronic equipment, obtaining a second integrity check value by using an integrity check algorithm.
And S516, the second electronic device determines whether the first integrity check value is equal to the second integrity check value.
And S517, if the first integrity check value is equal to the second integrity check value, the second electronic device sends a message that the specific data transmission is successful through the first antenna.
S518, the first electronic equipment receives the specific data transmission success message, displays the specific data transmission success message and/or plays the voice of the specific data transmission success.
S518', the second electronic device displays a message that the transmission of the specific data is successful and/or plays a voice that the transmission of the specific data is successful.
Other contents can refer to the description of the relevant contents in S410-S417' in FIG. 4, and are not described again here.
In the above embodiment, the first electronic device and the second electronic device negotiate the session key through the second antenna first, and then transmit the specific data encrypted using the session key through the first antenna. In some other embodiments, the feature of the second antenna having a safe transmission distance may be utilized, and the first electronic device and the second electronic device transmit the specific data directly through the second antenna.
Fig. 6 is a flowchart illustrating a method for data transmission according to an embodiment of the present application. As shown in fig. 6, the method includes:
s601, the first electronic device receives an input.
S601', the second electronic device receives an input.
Wherein the first electronic device receives an input instructing the first electronic device to transmit specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
The second electronic device receives an input instructing the second electronic device to receive specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like.
It should be noted that, in the embodiment of the present application, the execution sequence of S601 and S601' is not limited.
S602, the first electronic device sends a first message at a first period through a first antenna.
Wherein the first message is used for requesting to transmit specific data to the second electronic equipment.
And S603, the second electronic device receives the first message and switches to a second antenna of the second electronic device.
Optionally, after receiving the first message, the second electronic device may prompt a user of the second electronic device to approach the first electronic device, so as to receive specific data subsequently sent by the first electronic device. Or after the first electronic device executes S601 or S602, the user of the first electronic device is prompted to approach the second electronic device, so that the subsequent second electronic device can receive specific data subsequently sent by the first electronic device, which is not limited in this embodiment of the application.
S604, the second electronic device sends the response message in the second cycle through the second antenna.
S605, the first electronic device receives the response message within the transmission distance of the second antenna of the second electronic device.
In other words, when the first electronic device receives the response message, it indicates that the first electronic device is located within the transmission distance of the second antenna of the second electronic device. Accordingly, the second electronic device is also located within the transmission range of the second antenna of the first electronic device. Then, when the first electronic device transmits the specific data through the second antenna, the second electronic device determines that the specific data can be received.
In other embodiments, S602-S605 may not be performed, i.e., S606 may be performed after S601.
And S606, the first electronic equipment generates a second message according to the specific data of the first electronic equipment, and switches to a second antenna of the first electronic equipment.
And S607, the first electronic device sends the second message through the second antenna.
In other words, in the present embodiment, the first electronic device and the second electronic device do not need to negotiate the session key, but directly transmit the specific data through the second antenna. In this way, only electronic devices within the transmission distance of the second antenna of the first electronic device can receive the specific data, thereby ensuring the security of transmitting the specific data.
And S608, the second electronic device receives the second message and acquires the specific data.
And S609, the second electronic device determines whether the specific data of the first electronic device is received.
In some examples, the end of the specific data may carry a specific identifier, and the second electronic device may determine whether the specific data of the first electronic device is received or not by detecting the specific identifier. In other examples, the beginning or the end of the specific data may also carry the size of the specific data, and the second electronic device may also determine whether the specific data of the first electronic device is received by detecting the size of the received specific data of the first electronic device, which is not limited in this embodiment of the application.
S610, the second electronic device determines that the specific data of the first electronic device is received, and then sends a message that the transmission of the specific data is successful through the second antenna.
S611, the first electronic device receives the specific data transmission success message, displays the specific data transmission success message and/or plays the voice of the specific data transmission success, and switches to the first antenna.
S611', the second electronic device displays a message that the transmission of the specific data is successful and/or plays a voice that the transmission of the specific data is successful, and switches to the first antenna.
The embodiment of the present application does not limit the execution order of S611 and S611'. In addition, in the embodiment of the present application, either one of steps S611 and S611' may be executed, or both of the steps may be executed, or neither of the steps may be executed.
For other contents, reference may be made to the description of the related contents in the above embodiments, which are not repeated herein.
In some scenarios, the second electronic device cannot be networked for some special reason. For example, the second electronic device cannot be connected to the routing device, and cannot transmit data of the second electronic device through Wi-Fi of the routing device. In order to find out the reason, a historical log recorded by the second electronic device needs to be acquired from the second electronic device, so that a maintainer can analyze the specific reason for maintenance. At this time, it is necessary to easily and conveniently read the log information stored in the second electronic device from the second electronic device. Fig. 7 provides a data transmission method in such a scenario. Fig. 7 is a flowchart illustrating a method for data transmission according to an embodiment of the present application. As shown in fig. 7, the method includes:
s701, the first electronic device receives an input.
S701', the second electronic device receives an input.
Wherein the first electronic device receives an input instructing the first electronic device to collect specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like. The specific data is, for example, a running log.
The second electronic device receives an input instructing the second electronic device to transmit specific data. The input may be user input or may be an instruction sent by another device. The user input includes a user operating a specific key, inputting a voice command, a specific touch operation, a specific air-separating gesture, and the like. The second electronic device may be unconnected to the internet or a mobile communication network.
It should be noted that, in the embodiment of the present application, the execution sequence of S701 and S701' is not limited.
S702, the first electronic device sends a first message at a first period through a first antenna.
Wherein the first message is for requesting the first electronic device to collect the second electronic device specific data. For example, a first electronic device requests collection of a log of the operation of a second electronic device.
As an example, the first electronic device may carry information such as a service identifier of the collection device running log, an identifier of the first electronic device, and the like in the SDF publish message. As another example, the first electronic device may carry information such as a service identifier of the device operation log and an identifier of the first electronic device through the BLE beacon.
And S703, the second electronic device receives the first message and switches to a second antenna of the second electronic device.
S704, the second electronic device sends the second message at the second period through the second antenna.
The second message may carry information of the second electronic device, such as a device type (e.g., product ID), a device name, login account information, and the like of the second electronic device. Optionally, the second message may also carry a randomly generated session Key (e.g., AES 128Key) of the second electronic device, and the randomly generated session Key may be used for the subsequent first electronic device to decrypt the specific data encrypted by the second electronic device. In other words, the second electronic device transmits the session key through the second antenna, thereby ensuring the secure transmission of the session key.
S705, the first electronic device receives the second message within the transmission distance of the second antenna of the second electronic device.
S706, the first electronic equipment sends a response message aiming at the second message.
And S707, after receiving the response message of the second message, the second electronic device switches to the first antenna.
S708, the second electronic device transmits a third message containing the specific data through the first antenna.
In some examples, the second electronic device may encrypt the particular data using the session key generated in S704.
S709, the first electronic device receives the third message.
In some examples, the first electronic device decrypts the third message according to the received session key to obtain the specific data.
And S710, the first electronic equipment sends a response message that the third message is successfully received to the second electronic equipment.
And S711, the first electronic device displays a message that the transmission of the specific data is successful and/or plays a voice that the transmission of the specific data is successful, and switches to the first antenna.
S711', the second electronic device displays a message that the transmission of the specific data is successful and/or plays a voice that the transmission of the specific data is successful, and switches to the first antenna.
The embodiment of the present application does not limit the execution order of S711 and S711'. In addition, in the embodiment of the present application, either one of the steps S711 and S711' or both of the steps may be performed, or neither of the steps may be performed.
For other contents, reference may be made to the description of the related contents in the above embodiments, which are not repeated herein.
The following describes a few exemplary application scenarios of the technical solutions provided in the embodiments of the present application.
Scenario one, a user newly purchases a large number of devices of the same or similar device type. The setting information of these devices is the same or similar. Thus, the user can first set one of the electronic devices through, for example, a mobile phone. The set electronic device is the first electronic device. Then, the configuration information of the set electronic device is directly cloned to other electronic devices (i.e. second electronic devices) to complete the setting of the other electronic devices.
For example, a plurality of intelligent lighting devices (intelligent desk lamps, ceiling lamps, intelligent lamp strips, fragrance lamps, etc.) are newly purchased. The user can establish wireless connection with the lighting device A through the mobile phone, and through intelligent life or other applications, the lighting device is subjected to distribution network and brightness, color temperature and other lighting parameters, whether to delay closing, delay closing time, whether to automatically update firmware, set power consumption threshold and the like. That is, the lighting apparatus a stores the configuration information. The user may then clone the configuration information for lighting fixture a onto other lighting fixtures (e.g., lighting fixture B, lighting fixture C, etc.).
In one embodiment, the configuration data of lighting device a is transmitted to lighting device B when lighting device a and lighting device B are within 30cm of each other after receiving one input, respectively. Therefore, after the user only needs to trigger one input to the lighting device A and the lighting device B, the lighting device A and the lighting device B are close to each other to a preset safety distance, and the lighting device A and the lighting device B can transmit specific data. The operation of the user is very simple and convenient, and the method is particularly suitable for the old, children and other people with weak understanding ability and operation ability, and is convenient to master.
In one embodiment, the specific data may be preset by a control device or a binding device of the electronic device. For example, a host's cell phone may preset specific data of IoT lights as configuration data.
It should be noted that, in the embodiment of the present application, a secret key is transmitted at a secure distance in ultra-short distance wireless communication, when the first antenna operates, data encrypted by the secret key is transmitted, and decryption is implemented at another electronic device, so that security of transmission between the lighting device a and the lighting device B is physically ensured, and attacks from intermediate devices and risks of data leakage are eliminated.
Cloning the configuration information of the lighting device a to other devices such as the lighting device C can then be done in the same way. Alternatively, the configuration information of the lighting apparatus B is cloned to other apparatuses such as the lighting apparatus C by the same method.
As can be seen from the above, when the same configuration information needs to be set for a plurality of electronic devices, one of the electronic devices may be set first. And then, directly cloning the configuration information in the set electronic equipment to other electronic equipment. The method simplifies the process of respectively setting the plurality of electronic devices by the user, and improves the efficiency of setting the plurality of electronic devices.
For another example, in smart home life, a large number of sensors are generally required. Such as smoke sensors, gas sensors, water immersion detectors, abnormal sound sensors, etc. The sensors, although of different types, are substantially identical or similar in configuration information. The configuration information includes, for example, network information of the access network, alarm trigger actions, quiet time, timer settings, firmware upgrade settings, etc. Therefore, the method of the embodiment of the application can be adopted, one sensor is set first, and then the set sensor is used for cloning the configuration information to other sensors, so that repeated setting of similar sensors is avoided, user operation is simplified, and setting efficiency is improved.
In addition, the method provided by the embodiment of the application rarely relates to user interface operation, so that the method provided by the embodiment of the application is more friendly and convenient to implement for a large amount of devices without display screens in smart homes.
And in the second scenario, the user uses the new electronic equipment to replace the old electronic equipment. The new electronic device is typically the same type of device as the old electronic device and is of a similar model. Then the configuration information and/or user data on the old electronic device can be cloned directly onto the new electronic device. Therefore, configuration information and/or user data on the old electronic equipment are prevented from being exported to the intermediate equipment and then exported to the new electronic equipment by the intermediate equipment, the data security is improved, and the user operation is simplified.
And in a third scenario, an IoT device which cannot be connected to the internet or fails in the distribution network in the family has an operation fault. Generally, when an IoT device fails, the operation log is sent to a mobile phone or a computer through a network. Or, the IoT device prints the operation log to a mobile phone or a computer through a communication interface such as a serial port, so that the user can perform fault analysis and problem location. In the scheme, the operation log of the IoT device can be sent to other electronic devices in an ultra-short distance manner, and the operation log of the electronic device can be checked through the other electronic devices, so that the electronic device can be conveniently subjected to fault analysis, and the electronic device can be maintained. Therefore, the maintenance problem of the IoT equipment which cannot be connected to the internet or fails to be connected to the network or does not have an external communication interface is solved.
For example, as shown in (1) in fig. 8, the user may open an APP "smart life" in the mobile phone and enter the home device list interface 801. Therefore, the mobile phone is bound with three devices, namely an air conditioner, an intelligent desk lamp and an intelligent sound box. Wherein, the intelligent desk lamp is in an unconnected state. Further, in response to the user operating the control 802, the mobile phone sends a message to the smart desk lamp to please collect the running log of the smart desk lamp, that is, S702 is executed, and the following steps are executed. In the process of collecting the smart desk lamp by the mobile phone, the mobile phone also displays a prompt interface 803 as shown in (2) in fig. 8. And prompt information 804 in the prompt interface 803 is used for prompting the user that the running log of the intelligent desk lamp is collected. After the mobile phone successfully receives the operation log of the intelligent desk lamp, the mobile phone may display a prompt interface 805, where the prompt information 806 is used to prompt the user that the operation log of the intelligent desk lamp has been successfully collected. Optionally, the reminder 806 also includes a view control 807. In response to the user operating the control 807, the mobile phone displays an operation log of the intelligent desk lamp, so that the user can conveniently perform fault analysis on the operation condition of the intelligent desk lamp. It should be noted that, in other embodiments, the mobile phone and the smart desk lamp may not be bound in advance, and the mobile phone may also request to collect the operation log of the smart desk lamp, which is not limited in this application.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 9, the electronic apparatus includes: one or more processors 910, one or more memories 920, and one or more computer programs. Wherein the one or more computer programs are stored on the one or more memories and, when executed by the one or more processors, cause the electronic device to perform the operations performed by the first electronic device or the second electronic device in the above embodiments.
As shown in fig. 10, the embodiment of the present application further provides a chip system, which includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 may be interconnected by wires. For example, the interface circuit 1002 may be used to receive signals from other devices (e.g., a memory of the first electronic device 100, or a memory of the second electronic device 200). Also for example, the interface circuit 1002 may be used to send signals to other devices, such as the processor 1001. Illustratively, the interface circuit 1002 may read instructions stored in the memory and send the instructions to the processor 1001. The instructions, when executed by the processor 1001, may cause the electronic device to perform the steps performed by the first electronic device 100 or the second electronic device 200 in the above embodiments. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
The embodiment of the present application further provides an apparatus, where the apparatus is included in an electronic device, and the apparatus has a function of implementing the behavior of the electronic device in any one of the above-mentioned embodiments. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes at least one module or unit corresponding to the above functions. For example, a detection module or unit, a display module or unit, a determination module or unit, a calculation module or unit, and the like.
Embodiments of the present application further provide a computer storage medium, which includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to execute any one of the methods in the foregoing embodiments.
The embodiments of the present application also provide a computer program product, which when run on a computer, causes the computer to execute any one of the methods in the above embodiments.
Embodiments of the present application further provide a graphical user interface on an electronic device, where the electronic device has a display screen, a camera, a memory, and one or more processors, where the one or more processors are configured to execute one or more computer programs stored in the memory, and the graphical user interface includes a graphical user interface displayed when the electronic device executes any of the methods in the foregoing embodiments.
It is to be understood that the electronic devices and the like described above include hardware structures and/or software modules for performing the respective functions in order to realize the functions described above. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
In the embodiment of the present application, the electronic device and the like may be divided into functional modules according to the method example, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (29)

1. An electronic device, characterized in that the electronic device comprises:
one or more processors;
one or more memories;
a first antenna;
the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna;
and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform the steps of:
receiving an input;
in response to the input, sending a first message at a first periodicity through the first antenna;
receiving a second message of another electronic device;
responding to the second message, switching to the second antenna, and sending a third message at a second period through the second antenna; wherein the third message contains specific data;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
2. An electronic device, characterized in that the electronic device comprises:
one or more processors;
one or more memories;
a first antenna;
the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna;
and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform the steps of:
receiving an input;
in response to the input, sending a first message at a first periodicity through the first antenna;
receiving a second message of another electronic device;
responding to the second message, acquiring a first random number from the second message, generating a second random number, switching to the second antenna, and sending a third message containing the second random number through the second antenna;
generating a session key according to the first random number and the second random number, encrypting specific data using the session key, and sending a fourth message to the other electronic device, the fourth message including the encrypted specific data.
3. The electronic device according to claim 2, wherein the specific data transmission success is prompted after a message that the specific data transmission of the other electronic device is successful is received or after the fourth message is sent.
4. The electronic device according to claim 2 or 3, wherein the encrypting the specific data using the session key and sending a fourth message to the other electronic device specifically includes:
switching to the first antenna of the electronic device, and sending the fourth message through the first antenna of the electronic device.
5. The electronic device of any of claims 2-4, wherein the electronic device further performs:
the fourth message further includes a first integrity check value for the particular data.
6. The electronic device according to any of claims 3-5, wherein the prompting that the particular data transmission is successful comprises: displaying the message that the specific data is successfully transmitted, and/or playing the voice of the specific data which is successfully transmitted.
7. The electronic device according to any of claims 2-6, wherein the specific data comprises at least one of configuration information and user data; the configuration information comprises one or more of network configuration information, sensor alarm threshold setting information, alarm triggering action information, silent time setting information, timer setting information, firmware upgrading setting information and power utilization threshold setting information; the user data includes one or more of installation data of an application program, photos, videos, sound recordings, and files stored on the electronic device, and a log of execution of the electronic device.
8. An electronic device, characterized in that the electronic device comprises:
one or more processors;
one or more memories;
a first antenna;
the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna;
and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising:
receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, generating a first random number, and sending a second message comprising the first random number at a second period through the second antenna;
receiving a third message of the other electronic device;
responding to the third message, acquiring a second random number from the third message, and generating a session key according to the first random number and the second random number;
receiving a fourth message of the other electronic device;
and responding to the fourth message, acquiring the encrypted specific data from the fourth message, and decrypting by using the session key to obtain the specific data.
9. The electronic device of claim 8, wherein the electronic device further performs:
receiving a first complete verification value of the specific data sent by the other electronic equipment, and calculating a second complete verification value of the specific data;
and after the second complete verification value is equal to the first complete verification value, sending a message that the specific data transmission is successful to the other electronic equipment.
10. The electronic device according to claim 9, wherein sending the message that the specific data transmission is successful to the other electronic device specifically includes:
and switching to the first antenna, and sending a message that the specific data transmission is successful by using the first antenna.
11. An electronic device that does not have access to a routing device or hotspot, comprising:
one or more processors;
one or more memories;
a first antenna;
the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna;
and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising:
receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, and sending a second message through the second antenna; wherein the second message comprises specific data of the electronic device;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the second message is sent, prompting that the specific data transmission is successful.
12. An electronic device for data transmission, the electronic device not accessing a routing device or a hotspot, the electronic device comprising:
one or more processors;
one or more memories;
a first antenna;
the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna;
and one or more computer programs, wherein the one or more computer programs are stored on the one or more memories, and when executed by the one or more processors, cause the electronic device to perform operations comprising:
receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, and sending a second message through the second antenna;
receiving a response message of the other electronic device to the second message;
switching to the first antenna in response to the response message, and transmitting a third message containing specific data through the first antenna;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
13. The electronic device of claim 12, wherein the second message includes a session key, and wherein the third message contains specific data encrypted with the session key.
14. The electronic device of claim 12 or 13, wherein the session key is preset; the specific data is a log of the electronic device.
15. A data transmission method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps:
receiving an input;
in response to the input, sending a first message at a first periodicity through the first antenna;
receiving a second message of another electronic device;
responding to the second message, switching to the second antenna, and sending a third message at a second period through the second antenna; wherein the third message contains specific data;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
16. A data transmission method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps:
receiving an input;
in response to the input, sending a first message at a first periodicity through the first antenna;
receiving a second message of another electronic device;
responding to the second message, acquiring a first random number from the second message, generating a second random number, switching to the second antenna, and sending a third message containing the second random number through the second antenna;
generating a session key according to the first random number and the second random number, encrypting specific data using the session key, and sending a fourth message to the other electronic device, the fourth message including the encrypted specific data.
17. The method according to claim 16, wherein the specific data transmission success is prompted after receiving a message that the specific data transmission of the other electronic device succeeds or after sending the fourth message.
18. The method according to claim 16 or 17, wherein the encrypting the specific data using the session key and sending a fourth message to the other electronic device specifically includes:
switching to the first antenna of the electronic device, and sending the fourth message through the first antenna of the electronic device.
19. The method according to any one of claims 16-18, further comprising: the fourth message further includes a first integrity check value for the particular data.
20. The method according to any of claims 17-19, wherein said prompting that the particular data transmission is successful comprises: displaying the message that the specific data is successfully transmitted, and/or playing the voice of the specific data which is successfully transmitted.
21. The method according to any of claims 16-20, wherein the specific data comprises at least one of configuration information and user data; the configuration information comprises one or more of network configuration information, sensor alarm threshold setting information, alarm triggering action information, silent time setting information, timer setting information, firmware upgrading setting information and power utilization threshold setting information; the user data includes one or more of installation data of an application program, photos, videos, sound recordings, and files stored on the electronic device, and a log of execution of the electronic device.
22. A data transmission method is applied to an electronic device, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps: receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, generating a first random number, and sending a second message comprising the first random number at a second period through the second antenna;
receiving a third message of the other electronic device;
responding to the third message, acquiring a second random number from the third message, and generating a session key according to the first random number and the second random number;
receiving a fourth message of the other electronic device;
and responding to the fourth message, acquiring the encrypted specific data from the fourth message, and decrypting by using the session key to obtain the specific data.
23. The method of claim 22, further comprising:
receiving a first complete verification value of the specific data sent by the other electronic equipment, and calculating a second complete verification value of the specific data;
and after the second complete verification value is equal to the first complete verification value, sending a message that the specific data transmission is successful to the other electronic equipment.
24. The method according to claim 23, wherein sending the message that the specific data transmission is successful to the other electronic device specifically comprises:
and switching to the first antenna, and sending a message that the specific data transmission is successful by using the first antenna.
25. A data transmission method is applied to an electronic device, the electronic device does not have access to a routing device or a hotspot, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps:
receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, and sending a second message through the second antenna; wherein the second message comprises specific data of the electronic device;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the second message is sent, prompting that the specific data transmission is successful.
26. A data transmission method is applied to an electronic device, the electronic device does not have access to a routing device or a hotspot, and the electronic device comprises: one or more processors; one or more memories; a first antenna; the transmitting distance of the second antenna is less than or equal to the preset safe transmitting distance; the first antenna and the second antenna are different antennas, and the transmission distance of the second antenna is smaller than that of the first antenna; or, the first antenna and the second antenna are the same antenna, and the transmission power configured by the second antenna is smaller than the transmission power configured by the first antenna; the method comprises the following steps:
receiving an input;
receiving a first message of another electronic device;
responding to the first message, switching to the second antenna, and sending a second message through the second antenna;
receiving a response message of the other electronic device to the second message;
switching to the first antenna in response to the response message, and transmitting a third message containing specific data through the first antenna;
and after the message that the specific data transmission of the other electronic equipment is successful is received, or after the third message is sent, prompting that the specific data transmission is successful.
27. The method of claim 26, wherein the second message comprises a session key, and wherein the third message comprises specific data encrypted by the session key.
28. The method according to claim 26 or 27, wherein the session key is preset; the specific data is a log of the electronic device.
29. A computer-readable storage medium, comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of any one of claims 15-28.
CN202010899646.3A 2020-08-31 2020-08-31 Data transmission method and electronic equipment Pending CN114205812A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010899646.3A CN114205812A (en) 2020-08-31 2020-08-31 Data transmission method and electronic equipment
PCT/CN2021/115541 WO2022042740A1 (en) 2020-08-31 2021-08-31 Data transmission method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010899646.3A CN114205812A (en) 2020-08-31 2020-08-31 Data transmission method and electronic equipment

Publications (1)

Publication Number Publication Date
CN114205812A true CN114205812A (en) 2022-03-18

Family

ID=80354705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010899646.3A Pending CN114205812A (en) 2020-08-31 2020-08-31 Data transmission method and electronic equipment

Country Status (2)

Country Link
CN (1) CN114205812A (en)
WO (1) WO2022042740A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420303A (en) * 2008-12-12 2009-04-29 广州杰赛科技股份有限公司 Communication method for audio data and apparatus thereof
CN105933119A (en) * 2015-12-24 2016-09-07 中国银联股份有限公司 Authentication method and device
CN106408688A (en) * 2015-07-27 2017-02-15 法雷奥舒适驾驶助手公司 Improvement of identity code recognition in polling recognition
US20180176009A1 (en) * 2016-12-21 2018-06-21 Mats Agerstam Range constrained device configuration
WO2018157512A1 (en) * 2017-03-03 2018-09-07 华为技术有限公司 Method for connecting to network, mobile terminal, electronic device, and graphical user interface
CN109993868A (en) * 2019-04-01 2019-07-09 胡渐佳 A kind of wireless method for unlocking of intelligent door lock
CN110462152A (en) * 2017-03-30 2019-11-15 三菱自动车工业株式会社 Vehicular communication system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005050908A1 (en) * 2003-10-29 2005-06-02 Argelcom Limited A secure cryptographic communication system using kem-dem
CN105530016B (en) * 2014-09-30 2018-03-27 联想(北京)有限公司 Signal processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420303A (en) * 2008-12-12 2009-04-29 广州杰赛科技股份有限公司 Communication method for audio data and apparatus thereof
CN106408688A (en) * 2015-07-27 2017-02-15 法雷奥舒适驾驶助手公司 Improvement of identity code recognition in polling recognition
CN105933119A (en) * 2015-12-24 2016-09-07 中国银联股份有限公司 Authentication method and device
US20180176009A1 (en) * 2016-12-21 2018-06-21 Mats Agerstam Range constrained device configuration
WO2018157512A1 (en) * 2017-03-03 2018-09-07 华为技术有限公司 Method for connecting to network, mobile terminal, electronic device, and graphical user interface
CN110462152A (en) * 2017-03-30 2019-11-15 三菱自动车工业株式会社 Vehicular communication system
CN109993868A (en) * 2019-04-01 2019-07-09 胡渐佳 A kind of wireless method for unlocking of intelligent door lock

Also Published As

Publication number Publication date
WO2022042740A1 (en) 2022-03-03

Similar Documents

Publication Publication Date Title
US10097529B2 (en) Semiconductor device for controlling access right to server of internet of things device and method of operating the same
JP7075345B2 (en) Systems and methods for automated wireless network authentication in Internet of Things (IoT) systems
US20230093016A1 (en) Discovery and provisioning method, electronic device, and system
JP6993973B2 (en) Integrated development tool for Internet of Things (IoT) systems
JP6839167B2 (en) Systems and methods for Internet of Things (IoT) devices and hubs of virtual things
US20180248694A1 (en) Assisted device provisioning in a network
KR101706581B1 (en) Mesh network commissioning
KR102537363B1 (en) Systems and methods for secure Internet of Things (IoT) device provisioning
KR101769895B1 (en) User terminal device, Internet of Things control method, computer program and storage medium therefor
KR101878708B1 (en) Energy management system of smart electric home appliances using security-enhanced residential gateway device
CN108012267A (en) A kind of method for network authorization, relevant device and system
KR20170132820A (en) System and method for automatic wireless network authentication
KR101878710B1 (en) Smart home maintenance system using security-enhanced residential gateway device
CN112566113B (en) Key generation and terminal network distribution method, device and equipment
CN105069875A (en) Electronic key, electronic devices and electronic device networking/pairing method
KR101933638B1 (en) Wellness service system using security-enhanced residential gateway device
WO2023001082A1 (en) Network configuration method and apparatus
CN114079862A (en) Automatic control method, electronic device and computer readable storage medium
CN106105376A (en) For the method managing the node association in the communication network of Wireless Personal Area
JP2015088760A (en) Image projection device, image projection system, control method, and program
CN115669022A (en) Method for providing ranging-based service by electronic equipment and electronic equipment
WO2022042170A1 (en) Iot device and authorization method therefor
WO2022042740A1 (en) Data transmission method and electronic device
JP6545224B2 (en) Communication apparatus, control method, and program
JP2015176536A (en) Communication device, communication method, communication program, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination