CN113207122B - Message transmission method and device - Google Patents

Message transmission method and device Download PDF

Info

Publication number
CN113207122B
CN113207122B CN202110296606.4A CN202110296606A CN113207122B CN 113207122 B CN113207122 B CN 113207122B CN 202110296606 A CN202110296606 A CN 202110296606A CN 113207122 B CN113207122 B CN 113207122B
Authority
CN
China
Prior art keywords
equipment
key
instruction content
instruction
message
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.)
Active
Application number
CN202110296606.4A
Other languages
Chinese (zh)
Other versions
CN113207122A (en
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 CN202110296606.4A priority Critical patent/CN113207122B/en
Publication of CN113207122A publication Critical patent/CN113207122A/en
Application granted granted Critical
Publication of CN113207122B publication Critical patent/CN113207122B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information

Abstract

The embodiment of the application discloses a message transmission method and device, relates to the field of Internet of things, and can reduce the time delay when the device responds to a message sent by a counterpart, so that the message interaction process is simple and safe, and the user experience is improved. The method comprises the following steps: when the first equipment does not access the local area network where the second equipment is located, the second equipment can receive a broadcast message sent by the first equipment, wherein the broadcast message comprises the identifier of the first equipment and the encrypted first instruction content; the second device decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the first device; and if the first instruction content is successfully decrypted, the second equipment controls third equipment to realize the first instruction content, and the third equipment has access to the local area network.

Description

Message transmission method and device
Technical Field
The application relates to the field of internet of things, in particular to a message transmission method and device.
Background
The corresponding communication link is typically established prior to the device interacting with the device. For example, when a mobile phone accesses a Wi-Fi network as a Station (STA), a Wi-Fi connection needs to be established with an access point (e.g., a router). In order to ensure the information security when the mobile phone interacts with the router, a user is required to input an access password preset by the router into the mobile phone when establishing the Wi-Fi connection, and the mobile phone sends the password input by the user to the router and then the router performs identity authentication on the mobile phone requesting access. If the password input by the user is incorrect, the router does not allow the mobile phone to access the Wi-Fi network. If the password input by the user is correct, the router allows the mobile phone to access the Wi-Fi network of the mobile phone, and the subsequent mobile phone can send various messages to the router based on the Wi-Fi network.
That is, when a device establishes a communication link with another device, it first needs to complete identity authentication to establish a more secure communication link. Therefore, when a user uses one of the devices to send a message to the other device, the other device can respond to the message only after the two devices perform identity authentication, so that the time delay when the devices respond to the message sent by the other device is increased, and the user experience is reduced.
Disclosure of Invention
The application provides a message transmission method and device, which can reduce the time delay when the device responds to a message sent by a counterpart, so that the message interaction process is simple and safe, and the user experience is improved.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a message transmission method, including: when the first device does not access the local area network where the second device is located, the second device can receive an identity authentication request sent by the first device, wherein the identity authentication request comprises a first instruction password corresponding to a first key (the first key is located on the first device), and the first instruction password is generated according to first instruction content of the first key and an access password for accessing the first device to the local area network; the second equipment carries out identity authentication on the first equipment according to the first instruction password; and if the identity authentication is passed, the second equipment controls third equipment to realize the first instruction content corresponding to the first instruction password, and the third equipment has access to the local area network.
That is to say, when the first device and the second device perform authentication in the present application, the first device may send, in the authentication request, the access password for authenticating the identity and the instruction content that the user needs to execute to the second device in the form of the instruction password. Therefore, the second device can verify the identity of the first device based on the instruction password and determine the instruction content required to be executed by the user, so that the operation of clicking the first key by the user can be responded quickly, the time delay of message response caused by the processes of establishing communication connection, performing identity verification and the like is reduced, and the waiting time of the user is reduced.
In one possible design method, the authenticating, by the second device, the first device according to the first command password includes: the second equipment inquires whether a first instruction password is contained in the prestored instruction passwords or not; if the first instruction password is contained, the second equipment determines that the identity of the first equipment passes the authentication; otherwise, the second device determines that the authentication of the first device fails.
In one possible design method, the authenticating, by the second device, the first device according to the first command password includes: the second equipment analyzes the first instruction password to obtain an access password and first instruction content corresponding to the first instruction password; if the access password is correct, the second equipment determines that the identity authentication of the first equipment passes; otherwise, the second device determines that the authentication of the first device is not passed.
In one possible design approach, if the authentication passes, the method further includes: the second device establishes a communication connection with the first device.
In one possible design method, the second device stores a corresponding relationship between an instruction password and instruction content in advance; the second device controls the third device to realize first instruction content corresponding to the first instruction password, and the method includes: the second equipment determines first instruction content corresponding to the first instruction password according to the corresponding relation; and the second equipment sends a control instruction corresponding to the first instruction content to the third equipment.
In a possible design method, before the second device receives the authentication request sent by the first device, the method further includes: the second equipment receives a key message of a first key sent by the first equipment, wherein the key message comprises a first instruction content corresponding to the first key; and the second equipment generates a first instruction password according to the first instruction content and the access password of the first equipment accessing the local area network, and establishes the corresponding relation between the first instruction content and the first instruction password.
In a possible design method, before the second device receives the authentication request sent by the first device, the method further includes: the second device receives a key message of the first key sent by the first device, wherein the key message comprises first instruction content corresponding to the first key and a first instruction password corresponding to the first key.
In a possible design method, the first device has a Wi-Fi connection function, the second device may be a wireless router, and the local area network is a Wi-Fi local area network provided by the second device.
In a second aspect, the present application provides a message transmission method, which may be used in a first device, where the first device includes at least one key (e.g., a first key), and the method includes: when the first equipment is not accessed to the local area network where the second equipment is located, the first equipment can receive the input operation of a user on the first key; responding to the input operation, the first equipment adds a first instruction password corresponding to the first key into the identity authentication request, wherein the first instruction password is generated according to first instruction content of the first key and an access password for accessing the local area network by the first equipment, the first instruction content is used for controlling third equipment to execute a corresponding function, and the third equipment is connected into the local area network; the first device sends the authentication request to the second device.
In a possible design method, before the first device receives an input operation of the first key by a user, the method further includes: responding to an access password input by a user, and establishing communication connection between the first equipment and the second equipment; the first equipment sends a key message of the first key to the second equipment, wherein the key message comprises a first instruction content of the first key.
In a possible design method, the key message further includes a first command password corresponding to the first key; before the first device sends the key message of the first key to the second device, the method further comprises the following steps: the first device generates a first instruction password according to the access password and the first instruction content of the first key.
In a possible design method, the generating, by the first device, the first instruction password according to the access password and the first instruction content of the first key includes: and the first device splices the access password and the first instruction content of the first key to obtain a first instruction password.
In a possible design method, the first device has a Wi-Fi connection function, the second device may be a wireless router, and the local area network is a Wi-Fi local area network provided by the second device.
In a third aspect, the present application provides a message transmission method, including: when the first equipment does not access the local area network where the second equipment is located, the second equipment can receive a broadcast message sent by the first equipment, wherein the broadcast message comprises the identifier of the first equipment and the encrypted first instruction content; the second equipment decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the first equipment; and if the first instruction content is successfully decrypted, the second equipment controls third equipment to realize the first instruction content, and the third equipment has access to the local area network.
That is to say, in the case that no connection is established between the first device and the second device, the first device may send the encrypted instruction content to the second device by using the encryption and decryption manner for the instruction content, which is pre-agreed with the second device. If the second device can successfully decrypt the instruction content, the first device is legal, and the second device obtains the instruction content needing to be responded while verifying the legality of the first device, so that the operation that a user clicks a key in the first device can be quickly responded.
In one possible design approach, the broadcast message further includes an identification of the second device; after the second device receives the broadcast message sent by the first device, the method further includes: the second equipment determines whether the receiver of the broadcast message is the second equipment according to the identification of the second equipment; the decrypting, by the second device, of the first instruction content using the decryption algorithm corresponding to the identifier of the first device includes: and if the receiver of the broadcast message is the second equipment, the second equipment decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the second equipment.
In a possible design method, before the second device receives the broadcast message sent by the first device, the method further includes: the second equipment receives registration information sent by the first equipment, wherein the registration information comprises an identifier and a decryption algorithm of the first equipment; the second device establishes a correspondence between the identity of the first device and the decryption algorithm.
The first device has a Wi-Fi connection function, the second device can be a wireless router, and the local area network is a Wi-Fi local area network provided by the second device.
In a fourth aspect, the present application provides a message transmission method, which may be used in a first device, where the first device includes at least one key (e.g., a first key), and the method includes: when the first equipment is not accessed to the local area network where the second equipment is located, the first equipment receives input operation of a user on a first key; responding to the input operation, the first equipment encrypts first instruction content of the first key by using a preset encryption algorithm, wherein the first instruction content is used for controlling third equipment to execute a corresponding function, and the third equipment is connected into the local area network; the first equipment adds the identification of the first equipment and the encrypted first instruction content into the broadcast message; the first device transmits the broadcast message.
In one possible design method, before the first device receives an input operation of the first key by a user, the method further includes: the first device sends registration information to the second device, wherein the registration information comprises the identification of the first device and a decryption algorithm corresponding to the encryption algorithm.
In a fifth aspect, the present application provides a message transmission device, where the message transmission device is a first device, and the first device includes: the device comprises a communication unit, an input unit and a processing unit, wherein the input unit is used for receiving the input operation of a user on a first key when the first equipment is not accessed to a local area network where second equipment is located; responding to the input operation, the processing unit is configured to add a first instruction password corresponding to the first key to an authentication request, where the first instruction password is generated according to a first instruction content of the first key and an access password of the first device for accessing the local area network, the first instruction content is used to control a third device to execute a corresponding function, and the third device is connected to the local area network; the communication unit is configured to send the authentication request to the second device.
In one possible design method, before receiving an input operation of the first key by a user, the communication unit is further configured to establish a communication connection with the second device in response to an access password input by the user; and sending a key message of the first key to the second device, wherein the key message comprises a first instruction content of the first key.
In a possible design method, the key message further includes a first command password corresponding to the first key; before sending the key message of the first key to the second device, the processing unit is further configured to generate the first instruction password according to the access password and the first instruction content of the first key.
For example, the processing unit may be specifically configured to splice the access password and the first instruction content of the first key to obtain the first instruction password.
In a possible design method, the first device has a Wi-Fi connection function, the second device may be a wireless router, and the local area network is a Wi-Fi local area network provided by the second device.
In a sixth aspect, the present application provides a message transmission device, where the message transmission device is a first device, and the first device includes: the device comprises a communication unit, an input unit and a processing unit, wherein the input unit is used for receiving the input operation of a user on a first key when the first equipment is not accessed to a local area network where second equipment is located; responding to the input operation, the processing unit is used for encrypting first instruction content of the first key by using a preset encryption algorithm, the first instruction content is used for controlling third equipment to execute a corresponding function, and the third equipment is connected to the local area network; and adding the identification of the first device and the encrypted first instruction content to a broadcast message; the communication unit is configured to send the broadcast message.
In a possible design method, before receiving an input operation of the first key by a user, the communication unit is further configured to send registration information to the second device, where the registration information includes an identifier of the first device and a decryption algorithm corresponding to the encryption algorithm.
A seventh aspect provides a message transmission device, where the message transmission device is a second device, the second device includes a processing unit and a communication unit, and when a first device does not access a local area network where the second device is located, the communication unit is configured to receive an authentication request sent by the first device, where the authentication request includes a first instruction password corresponding to a first key, the first key is located on the first device, and the first instruction password is generated according to a first instruction content of the first key and an access password for the first device to access the local area network; furthermore, the processing unit is configured to perform identity authentication on the first device according to the first instruction password; and if the identity authentication is passed, controlling third equipment to realize first instruction content corresponding to the first instruction password, wherein the third equipment has access to the local area network.
In one possible design approach, the processing unit is specifically configured to: inquiring whether the pre-stored command password contains the first command password; if the first command password is contained, determining that the identity of the first equipment passes the authentication; otherwise, the second device determines that the authentication of the first device is not passed.
In a possible design method, the processing unit is specifically configured to: analyzing the first instruction password to obtain an access password and first instruction content corresponding to the first instruction password; if the access password is correct, determining that the identity authentication of the first equipment is passed; otherwise, the second device determines that the authentication of the first device is not passed.
In a possible embodiment, the communication unit is further configured to establish a communication connection with the first device if the authentication is successful.
In a possible design method, the second device stores a corresponding relationship between an instruction password and instruction content in advance; at this time, controlling the third device to implement the first instruction content corresponding to the first instruction password means: the processing unit determines first instruction content corresponding to the first instruction password according to the corresponding relation; the communication unit transmits a control instruction corresponding to the first instruction content to the third device.
In a possible design method, before receiving an authentication request sent by a first device, the communication unit is further configured to receive a key message of the first key sent by the first device, where the key message includes first instruction content corresponding to the first key; the processing unit is further configured to generate the first instruction password according to the first instruction content and an access password for accessing the first device to the local area network, and establish a corresponding relationship between the first instruction content and the first instruction password.
In a possible design method, before receiving an authentication request sent by a first device, the communication unit is further configured to receive a key pressing message of the first key sent by the first device, where the key pressing message includes first instruction content corresponding to the first key and the first instruction password corresponding to the first key.
In an eighth aspect, the present application provides a message transmission device, where the message transmission device is a second device, the second device includes a processing unit and a communication unit, and when a first device does not access a local area network where the second device is located, the communication unit is configured to receive a broadcast message sent by the first device, where the broadcast message includes an identifier of the first device and encrypted first instruction content; the processing unit is used for decrypting the first instruction content by using a decryption algorithm corresponding to the identification of the first device; and if the first instruction content is successfully decrypted, controlling third equipment to realize the first instruction content, wherein the third equipment has access to the local area network.
In one possible design approach, the broadcast message further includes an identification of the second device; after receiving the broadcast message sent by the first device, the processing unit is further configured to determine whether a receiver of the broadcast message is the second device according to the identifier of the second device; the processing unit decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the first device, and means that: if the receiver of the broadcast message is the second device, the processing unit decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the first device.
In a possible design method, before receiving the broadcast message sent by the first device, the communication unit is further configured to receive registration information sent by the first device, where the registration information includes an identifier of the first device and a decryption algorithm; the processing unit is further configured to establish a correspondence between the identifier of the first device and the decryption algorithm.
In a ninth aspect, the present application provides a message transmission device, where the message transmission device is a first device, and the first device includes: one or more keys, a communication interface, one or more processors, memory, and one or more programs; wherein the processor is coupled to the memory, the one or more programs being stored in the memory, and when the first device is running, the processor executes the one or more programs stored in the memory to cause the first device to perform any of the above-described message transmission methods.
In a tenth aspect, the present application provides a message transmission device, where the message transmission device is a second device, and the second device includes: a communication interface, one or more processors, memory, and one or more programs; wherein the processor is coupled to the memory, the one or more programs being stored in the memory, and when the second device is running, the processor executes the one or more programs stored in the memory to cause the second device to perform any of the above-described message transmission methods.
The first device may have a Wi-Fi connection function, the second device may be a wireless router, and the local area network may be a Wi-Fi local area network provided by the second device.
In an eleventh aspect, the present application provides a computer storage medium comprising computer instructions which, when run on a message transmission device, cause the message transmission device to perform any of the message transmission methods described above.
In a twelfth aspect, the present application provides a computer program product for causing a message transmission device to perform a message transmission method as described in any one of the preceding claims when the computer program product is run on the message transmission device.
It is to be understood that the terminal according to the fifth to tenth aspects, the computer storage medium according to the eleventh aspect, and the computer program product according to the twelfth aspect are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the terminal according to the fifth to tenth aspects can refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Drawings
Fig. 1 is a system architecture diagram of a message transmission method according to an embodiment of the present application;
FIG. 2 is a schematic view illustrating an access flow of a Wi-Fi network in the prior art;
fig. 3 is a schematic view of an access flow of a Wi-Fi network according to an embodiment of the present application;
fig. 4 is a first schematic structural diagram of a message transmission device according to an embodiment of the present application;
fig. 5 is a first flowchart illustrating a message transmission method according to an embodiment of the present application;
fig. 6 is a first scenario diagram of a message transmission method according to an embodiment of the present application;
fig. 7 is a schematic view of a scenario of a message transmission method according to an embodiment of the present application;
fig. 8 is a third scenario diagram of a message transmission method according to an embodiment of the present application;
fig. 9 is a fourth scenario diagram of a message transmission method according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a second message transmission method according to an embodiment of the present application;
fig. 11 is a schematic diagram of a frame structure of a probe request frame according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a message transmission device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram three of a message transmission device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a message transmission device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a message transmission device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
The message transmission method provided by the embodiment of the application can be applied to the transmission system shown in fig. 1. The transmission system comprises a first device 11 and a second device 12. The first device 11 may send various types of messages to the second device 12, and may also receive various types of messages sent by the second device 12. Similarly, the second device 12 may send various types of messages to the first device 11, and may also receive various types of messages sent by the first device 11. For convenience of description, in the following embodiments, the first device 11 is taken as a sending end of a message, and the second device 12 is taken as a receiving end of the message.
For example, the first device 11 may establish a communication connection between the two devices before sending a message to the second device 12. The communication connection may be a wired connection or a wireless connection (e.g., a Wi-Fi connection, a bluetooth connection, or a 5G connection, etc.).
Taking the first device 11 as a Station (STA) and the second device 12 as an Access Point (AP), for example, after the first device 11 starts the wireless local area network function, as shown in fig. 2, the first device 11 may discover the Wi-Fi network created by the second device 12 through interaction with the second device 12. For example, the second device 12 may send a beacon message in a broadcast form, where the beacon message carries a Service Set Identifier (SSID) of the wireless local area network, that is, a name of the Wi-Fi network. After acquiring the beacon message, the first device 11 may detect that the wireless local area network provided by the second device 12 is included. For another example, the first device 11 may send a probe request (probe request) frame after turning on the wlan function, where the probe request frame may not carry an SSID. After acquiring the probe request frame sent by the first device 11, the second device 12 may add the SSID of the Wi-Fi network to a probe response (probe response) and send the probe response to the first device 11, so that the first device 11 detects the wireless local area network provided by the second device 12.
Further, as also shown in fig. 2, the first device 11 may send an Authentication Request (Authentication Request) carrying an access password to the second device 12. The access password may be input by the user into the first device 11, or may be sent by another device to the first device 11, which is not limited in this embodiment of the present invention. In this way, after receiving the authentication request, the second device 12 may authenticate the first device 11 according to the access password in the authentication request. When the access password sent by the first device 11 is correct, the second device 12 may send an Authentication Response (Authentication Response) to the second device 12, thereby completing Authentication of the first device 11.
Subsequently, as also shown in fig. 2, the first device 11 may send a connection Request (Association Request) to the second device 12, and when receiving an Association Response (Association Response) sent by the second device 12, the first device 11 establishes a Wi-Fi connection with the second device 12. Based on the Wi-Fi connection, the first device 11 may send various types of messages to the second device 12. For example, when the second device 12 is a router and the first device 11 is an intelligent remote controller, the first device 11 may send an instruction or a request to turn on a television, turn off an air conditioner, and the like to the second device 12. The second device 12, upon receiving the message sent by the first device 11, may control the relevant controlled device to respond to the message.
It can be seen that the second device 12, as a receiving end of the message, needs to perform the authentication on the first device 11 first to respond to the message sent by the first device 11, thereby prolonging the response delay of the second device 12 to the first device 11 and increasing the waiting time of the user.
In this regard, in this embodiment of the application, when the first device 11 performs authentication with the second device 12, as shown in fig. 3, after the first device 11 detects the Wi-Fi network created by the second device 12, the first device 11 may carry a message to be sent to the second device 12 in an authentication request. Taking the message sent by the first device 11 as an example of an instruction to turn on the television, when sending the authentication request to the second device 12, the first device 11 may carry the access password input by the user and the instruction to turn on the television together in the authentication request. Therefore, after the second device 12 determines that the access password sent by the first device 11 is correct, the instruction for turning on the television carried in the authentication request can be executed, that is, the two steps of authentication and message sending are combined into one, so that the transmission process of the message is simplified while the security is ensured, and the user experience is improved.
The specific method for the first device 11 to add the access password and the message to be sent to the authentication request together, and the method for the second device to parse the authentication request will be described in detail in the following embodiments.
For example, the first device 11 may be a mobile phone, a smart home product (e.g., a smart remote controller, a smart television, a smart air conditioner, etc.), a tablet Computer, a notebook Computer, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, a virtual reality device, etc. The second device 12 may be specifically a device with a message parsing capability, such as a router, a hub (hub), a server, or a switch, and in this embodiment, the specific form of the first device or the second device is not particularly limited.
Exemplarily, fig. 4 is a block diagram of the first device 11.
The first device 11 may include a processor 110, an external memory interface 120, an internal memory 121, a usb interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a radio frequency module 150, a communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a SIM card interface 195, and the like. The sensor module may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a Neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a decision maker directing the various components of the first device 11 to work in concert as instructed. Is the neural center and command center of the first device 11. The controller generates an operation control signal according to the instruction operation code and the time sequence signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor is a cache memory that may hold instructions or data that have just been used or recycled by the processor. If the processor needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses and reducing the latency of the processor, thereby increasing the efficiency of the system.
In some embodiments, the processor 110 may include an interface. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bidirectional synchronous serial bus comprising a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor may include multiple sets of I2C buses. The processor can be respectively coupled with the touch sensor, the charger, the flash lamp, the camera and the like through different I2C bus interfaces. For example: the processor may be coupled to the touch sensor through an I2C interface, such that the processor and the touch sensor communicate through an I2C bus interface to implement the touch function of the first device 11.
The I2S interface may be used for audio communication. In some embodiments, the processor may include multiple sets of I2S buses. The processor can be coupled with the audio module through an I2S bus, and communication between the processor and the audio module is realized. In some embodiments, the audio module can transmit the audio signal to the communication module through the I2S interface, so as to implement the function of answering a call through the bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module and the communication module may be coupled by a PCM bus interface. In some embodiments, the audio module may also transmit an audio signal to the communication module through the PCM interface, so as to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication, with different sampling rates for the two interfaces.
The UART interface is a universal serial data bus used for asynchronous communications. The bus is a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor with the communication module 160. For example: the processor is communicated with the Bluetooth module through the UART interface to realize the Bluetooth function. In some embodiments, the audio module may transmit the audio signal to the communication module through the UART interface, so as to implement the function of playing music through the bluetooth headset.
The MIPI interface can be used to connect a processor with peripheral devices such as a display screen and a camera. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, the processor and the camera communicate through a CSI interface, enabling the shooting function of the first device 11. The processor and the display screen communicate via a DSI interface to implement the display function of the first device 11.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor with a camera, display screen, communication module, audio module, sensor, and the like. The GPIO interface may also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, and the like.
The USB interface 130 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface may be used to connect a charger to charge the first device 11, and may also be used to transmit data between the first device 11 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. But may also be used to connect other electronic devices such as AR devices, etc.
The interface connection relationship between the modules in the embodiment of the present invention is only schematically illustrated, and does not limit the structure of the first device 11. The first device 11 may adopt different interface connection manners or a combination of multiple interface connection manners in the embodiment of the present invention.
The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module may receive charging input from a wired charger via a USB interface. In some wireless charging embodiments, the charging management module may receive a wireless charging input through a wireless charging coil of the first device 11. The charging management module can also supply power to the terminal device through the power management module 141 while charging the battery.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module receives the input of the battery and/or the charging management module and supplies power to the processor, the internal memory, the external memory, the display screen, the camera, the communication module and the like. The power management module may also be used to monitor parameters such as battery capacity, battery cycle number, battery state of health (leakage, impedance), etc. In some embodiments, the power management module 141 may also be disposed in the processor 110. In some embodiments, the power management module 141 and the charging management module may also be disposed in the same device.
The wireless communication function of the first device 11 can be realized by the antenna module 1, the antenna module 2, the rf module 150, the communication module 160, a modem, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the first device 11 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the cellular network antenna may be multiplexed into a wireless local area network diversity antenna. In some embodiments, the antenna may be used in conjunction with a tuning switch.
The rf module 150 may provide a communication processing module applied on the first device 11, including a solution of wireless communication such as 2G/3G/4G/5G. The rf module may include at least one filter, a switch, a power Amplifier, a Low Noise Amplifier (LNA), and the like. The radio frequency module receives electromagnetic waves through the antenna 1, and processes the received electromagnetic waves such as filtering, amplification and the like, and transmits the electromagnetic waves to the modem for demodulation. The radio frequency module can also amplify the signal modulated by the modem, and the signal is converted into electromagnetic wave by the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the rf module 150 may be disposed in the processor 150. In some embodiments, at least some functional modules of the rf module 150 may be disposed in the same device as at least some modules of the processor 110.
The modem may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker, a receiver, etc.) or displays an image or video through a display screen. In some embodiments, the modem may be a stand-alone device. In some embodiments, the modem may be separate from the processor, in the same device as the rf module or other functional module.
The communication module 160 may provide a communication processing module applied to the first device 11, which includes solutions for wireless communication such as Wireless Local Area Network (WLAN), bluetooth (BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The communication module 160 may be one or more devices integrating at least one communication processing module. The communication module receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor. The communication module 160 may also receive a signal to be transmitted from the processor, frequency-modulate and amplify the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the antenna 1 and the radio frequency module of the first device 11 are coupled and the antenna 2 and the communication module are coupled so that the first device 11 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), time division code division multiple access (time-division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The first device 11 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing and is connected with a display screen and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen includes a display panel. The display panel may be an LCD (liquid crystal display), an OLED (organic light-emitting diode), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the first device 11 may include 1 or N display screens, N being a positive integer greater than 1.
The first device 11 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen, and the application processor, etc.
The ISP is used for processing data fed back by the camera. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the first device 11 may include 1 or N cameras, N being a positive integer greater than 1.
In addition, the digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the first device 11 is in frequency bin selection, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The first device 11 may support one or more video codecs. In this way, the first device 11 can play or record video in a plurality of encoding formats, for example: MPEG1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU may implement applications such as intelligent recognition of the first device 11, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the first device 11. The external memory card communicates with the processor through the external memory interface to realize a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the first device 11 and data processing by executing instructions stored in the internal memory 121. The memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The stored data area may store data (such as audio data, a phonebook, etc.) created during use of the first device 11, and the like. Further, the memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, other volatile solid state storage devices, a Universal Flash Storage (UFS), and the like.
The first device 11 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module is used for converting digital audio information into analog audio signals to be output and converting the analog audio input into digital audio signals. The audio module may also be used to encode and decode audio signals. In some embodiments, the audio module may be disposed in the processor 110, or some functional modules of the audio module may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The first device 11 can listen to music through a speaker or listen to a hands-free conversation.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the first device 11 answers a call or voice information, it is possible to answer voice by placing the receiver close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, a user can input a voice signal into the microphone by making a sound by approaching the microphone through the mouth of the user. The first device 11 may be provided with at least one microphone. In some embodiments, the first device 11 may be provided with two microphones, and may implement a noise reduction function in addition to collecting sound signals. In some embodiments, the first device 11 may further include three, four or more microphones to collect sound signals and reduce noise, and may further identify sound sources and perform directional recording functions.
The earphone interface 170D is used to connect a wired earphone. The earphone interface may be a USB interface, or may be an open mobile platform (OMTP) standard interface of 3.5mm, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor may be disposed on the display screen. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The first device 11 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen, the first device 11 detects the intensity of the touch operation according to the pressure sensor. The first device 11 may also calculate the position of the touch from the detection signal of the pressure sensor. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the first device 11. In some embodiments, the angular velocity of the first device 11 about three axes (i.e., the x, y, and z axes) may be determined by a gyro sensor. The gyro sensor may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyroscope sensor detects the shake angle of the first device 11, calculates the distance that the lens module needs to compensate according to the shake angle, and enables the lens to counteract the shake of the first device 11 through reverse movement, thereby achieving anti-shake. The gyroscope sensor can also be used for navigation and motion sensing game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the first device 11 calculates altitude from barometric pressure values measured by a barometric pressure sensor to assist in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The first device 11 may detect the opening and closing of the flip holster using a magnetic sensor. In some embodiments, when the first device 11 is a flip, the first device 11 may detect the opening and closing of the flip according to a magnetic sensor. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E can detect the magnitude of acceleration of the first device 11 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the first device 11 is stationary. The method can also be used for identifying the terminal posture, and is applied to transverse and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The first device 11 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the first device 11 may utilize a range sensor to measure distance to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. Infrared light is emitted outward through the light emitting diode. Infrared reflected light from nearby objects is detected using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object in the vicinity of the first device 11. When insufficient reflected light is detected, it can be determined that there is no object near the first device 11. The first device 11 can detect that the user holds the first device 11 by using the proximity light sensor to talk near the ear, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity optical sensor can also be used in a leather sheath mode, and the pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The first device 11 may adaptively adjust the display screen brightness according to the perceived ambient light level. The ambient light sensor can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor may also cooperate with the proximity light sensor to detect whether the first device 11 is in a pocket to prevent inadvertent contact.
The fingerprint sensor 180H is used to collect a fingerprint. The first device 11 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access to an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the first device 11 implements a temperature processing strategy using the temperature detected by the temperature sensor. For example, when the temperature reported by the temperature sensor exceeds a threshold, the first device 11 performs a reduction in the performance of a processor located in the vicinity of the temperature sensor, so as to reduce power consumption and implement thermal protection.
The touch sensor 180K is also referred to as a "touch panel". Can be arranged on the display screen. For detecting a touch operation acting thereon or thereabout. The detected touch operation may be passed to an application processor to determine the touch event type and provide a corresponding visual output via the display screen.
The bone conduction sensor 180M can acquire a vibration signal. In some embodiments, the bone conduction sensor may acquire a vibration signal of a human voice vibrating a bone mass. The bone conduction sensor can also contact the pulse of the human body to receive the blood pressure jumping signal. In some embodiments, the bone conduction sensor may also be provided in the headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone block vibrated by the sound part obtained by the bone conduction sensor, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor, and a heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys may be mechanical keys. Or may be touch keys. The first device 11 receives a key input, and generates a key signal input related to user setting and function control of the first device 11.
The motor 191 may generate a vibration cue. The motor can be used for incoming call vibration prompt and can also be used for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The touch operation acted on different areas of the display screen can also correspond to different vibration feedback effects. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a Subscriber Identity Module (SIM). The SIM card can be brought into and out of contact with the first device 11 by being inserted into or pulled out of the SIM card interface. The first device 11 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface can support a Nano SIM card, a Micro SIM card, a SIM card and the like. Multiple cards can be inserted into the same SIM card interface at the same time. The types of the plurality of cards may be the same or different. The SIM card interface may also be compatible with different types of SIM cards. The SIM card interface may also be compatible with external memory cards. The first device 11 interacts with the network through the SIM card to implement functions such as a call and data communication. In some embodiments, the first device 11 employs eSIM, namely: an embedded SIM card. The eSIM card may be embedded in the first device 11 and may not be separable from the first device 11.
The above-described structure illustrated in the embodiment of the present invention does not constitute a limitation on the first device 11. The first device 11 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
For example, when the first device 11 is an intelligent remote controller, the first device 11 may include the processor 110, the internal memory 121, the communication module 160, the key 190, and other components.
In addition, the second device 12 may also include one or more components shown in fig. 4, which is not limited in any way by the embodiment of the present application. For example, when the second device 12 is a router, the processor 110, the internal memory 121, the communication module 160, and the like may be included in the second device 12.
For convenience of understanding, a message transmission method provided by the embodiments of the present application is specifically described below with reference to the accompanying drawings.
Exemplarily, fig. 5 is an interaction schematic diagram of a message transmission method provided in an embodiment of the present application, and in the embodiment, a Wi-Fi scenario is taken as an example, where the first device 11 is a sender of a message, and the second device 12 is an access point for creating the Wi-Fi network.
S601, the first device 11 establishes Wi-Fi connection with the second device 12 according to the access password input by the user.
When the user uses the first device 11 for the first time, the first device 11 may join the Wi-Fi network created by the second device 12 according to an existing Wi-Fi access procedure (e.g., the access procedure shown in fig. 2) using the access password input by the user.
Assume that the first device 11 is an intelligent remote control and the second device 12 is a router. After the user opens the Wi-Fi function of the intelligent remote controller, the intelligent remote controller can receive beacon messages sent by the router, and the beacon messages carry SSIDs of Wi-Fi networks, namely names of the Wi-Fi networks. Then, if a touch screen is integrated on the smart remote controller, the smart remote controller may display the detected SSID. When the SSID selected by the user is detected, the smart remote controller may prompt the user to input an access password of the Wi-Fi network into the touch screen, for example: 123456. furthermore, the intelligent remote controller can carry the access password in an authentication request and send the authentication request to the router, and the router authenticates the intelligent remote controller. If the access password input by the user is correct, the router can establish a Wi-Fi connection with the intelligent remote controller. If the access password input by the user is incorrect, the router can refuse the intelligent remote controller to access the Wi-Fi network.
Or, a two-dimensional code may be preset on the smart remote controller, and is used for acquiring an access password for accessing the Wi-Fi network from other devices. For example, a user may scan a two-dimensional code of the smart remote controller by using a mobile phone that has accessed the Wi-Fi network, and then the mobile phone may learn an intention that the smart remote controller wants to join the Wi-Fi network where the mobile phone is located. Then, the mobile phone can send the SSID and the access password of the accessed Wi-Fi network to the intelligent remote controller, and the intelligent remote controller accesses the Wi-Fi network created by the router by using the access password.
Or, as shown in fig. 6, the user may install an intelligent home APP in the mobile phone, where the APP may be used to manage each device in the same lan. The handset is also a member of the Wi-Fi network created by the second device 12. After the user opens the first device 11, the first device 11 may first serve as an access point to broadcast a beacon message, where the beacon message carries an identifier of the first device 11. For example, the identity of the first device 11 may be added as an SSID in the beacon message. After detecting the beacon message sent by the first device 11, the mobile phone may identify that the device waiting to join the current first device 11 is the first device 11. Further, the handset may prompt the user in the APP to join the detected first device 11 to the Wi-Fi network created by the second device 12. When it is detected that the user instructs to join the first device 11 to the Wi-Fi network, the mobile phone may send the SSID of the Wi-Fi network and the access password to the second device 12, or the mobile phone may prompt the user to input the access password of the SSID of the Wi-Fi network, and use the access password to join the first device 11 to the Wi-Fi network created by the second device 12. Subsequently, the user may send a message to the second device 12 for controlling one or more controlled devices 13 by operating various keys on the first device 11. After the second device 12 parses the instruction content in the message sent by the first device 11, the related controlled device 13 may be controlled to perform a corresponding operation.
In addition, after the first device 11 successfully accesses the Wi-Fi network created by the second device 12, the first device 11 may record the corresponding relationship between the SSID of the Wi-Fi network and the access password 123456, so as to access the Wi-Fi network created by the second device 12 again using the access password in the following. The second device 12 may record the device identification, such as the MAC address, etc., of the first device 11, so that the message sent by the first device 11 can be recognized when the message is received later.
S602, the first device 11 registers a key message corresponding to the first key with the second device 12, where the first device 11 includes at least one key.
After the first device 11 establishes the Wi-Fi connection with the second device 12 for the first time, in order to enable the second device 12 to successfully implement the function desired by the user when the user triggers the keys on the first device 11, the first device 11 needs to register the keys with the second device 12. Taking registering the first key as an example, the first device 11 may send a key message corresponding to the first key to the second device 12, where the key message includes instruction content of the first key.
For example, as shown in fig. 7, the first device 11 includes a key 701 and a key 702, and the key 701 and the key 702 correspond to different instruction contents. The instruction content corresponding to the key 701 is 0021, and the corresponding function is used for opening and closing an air conditioner in a bedroom; the button 702 corresponds to instruction content of 0022, and corresponds to a function of turning on and off a lamp in a living room. Then, when registering the key 701, the first device 11 may transmit the instruction content 0021 of the key 701 to the second device 12; upon registering the key 702, the first device 11 may transmit the instruction content 0022 of the key 702 to the second device 12.
After receiving the instruction content in the key message sent by the first device 11, the second device 12 may generate a new access password (referred to as an instruction password in this embodiment) according to the instruction content and the access password when accessing the Wi-Fi network. The instruction password can reflect the access password of the Wi-Fi network and can also reflect the instruction content (such as 0021, 0022 and the like) corresponding to the related key.
That is, the second device 12 may store therein a generation policy of the instruction password. For example, the second device 12 may obtain the command password of the key 701 by splicing the access password 123456 of the Wi-Fi network with the command content 0021 of the key 701: 1234560021. for another example, the second device 12 may sum the access password 123456 of the Wi-Fi network and the instruction content 0021 of the key 701 to obtain the instruction password of the key 701, that is, 123456+0021=123477. For another example, the second device 12 may add 1 to each digit of the access password 123456 of the Wi-Fi network (i.e., 234567), and then concatenate 234567 with the instruction content 0021 of the key 701 to obtain the instruction password of the key 701: 2345670021. the generation policy of the instruction password may be set by a person skilled in the art according to actual experience or an actual application scenario, which is not limited in this embodiment of the present application.
In this way, the second device 12 can obtain the instruction content and the instruction password corresponding to each key in the first device 11, so as to establish the corresponding relationship between each instruction content and each instruction password in the second device 12. For example, as shown in table 1, the second device 12 may maintain the correspondence between the access password, the instruction content of each key and the instruction password. It should be noted that the access password of the second device 12 may be one or more. For example, for a device with a lower security level, the second device 12 may have a simpler access password setting for accessing the Wi-Fi network; for devices with higher security levels, the second device 12 may have more complex access password settings for accessing the Wi-Fi network.
In addition, as shown in table 2, the second device 12 may also store the corresponding relationship between different instruction contents and different control functions. Subsequently, the second device 12 may perform authentication on the device requesting access according to the corresponding relationship shown in table 1, and determine the specific instruction content sent by the legal device. Further, the second device 12 may determine the control function corresponding to the instruction content according to the corresponding relationship shown in table 2, so that the second device 12 can control the corresponding device to implement the control function.
TABLE 1
Access password Instruction content Command password
123456 0021 1234560021
111222 0022 1112220022
TABLE 2
Instruction content Control function
0021 Air conditioner for opening and closing bedroom
0022 Lamp for opening and closing living room
In addition, for the same key on the first device 11, the first device 11 may also set a plurality of instruction contents for the same key. For example, the first device 11 supports a user performing a single-click operation or a double-click operation on the key 701. Wherein, the single-click operation is used for opening the air conditioner in the bedroom, and the double-click operation is used for opening the air conditioner in the living room. Then, when the user performs a single-click operation on the key 701, the corresponding instruction content may be 0021a; when the user performs a double-click operation on the key 701, the corresponding instruction content may be 0021b. When the first device 11 registers with the second device 12, both instruction contents corresponding to the key 701 may be carried in a key message and sent to the second device 12. At this time, the second device 12 may generate an instruction password corresponding to the instruction content 0021a and an instruction password corresponding to the instruction content 0021b, respectively.
In other embodiments of the present application, still taking registering the first key as an example, the key message sent by the first device 11 to the second device 12 may further include, in addition to the instruction content of the first key, an instruction password corresponding to the first key. That is, before sending the key message of the first key to the second device 12, the first device 11 may generate the instruction password corresponding to the first key by using a preset generation policy of the instruction password according to the access password for accessing the Wi-Fi network and the instruction content of the first key in step S601. Further, the first device 11 may carry the instruction content and the instruction password of the first key in a key message and send the key message to the second device 12. The first device 11 and the second device 12 generate the instruction password using the same generation policy of the instruction password for the same instruction content.
It is understood that, when there are multiple keys on the first device 11, the first device 11 (or the second device 12) may generate a corresponding command password for each key according to a preset command password generation policy. Still alternatively, the first device 11 (or the second device 12) may store therein a plurality of generation policies (e.g., policy 1 and policy 2) of the instruction password. The first device 11 (or the second device 12) may generate the instruction password of the key 701 using the policy 1, and generate the instruction password of the key 702 using the policy 2, which is not limited in this embodiment of the present application.
Then, after receiving the key message, the second device 12 may establish a corresponding relationship between the instruction content and the instruction password as shown in table 1 according to the instruction content and the instruction password carried in the key message. Or, on the basis of the corresponding relationship shown in table 1, as shown in table 3, since the first device 11 may also carry its own device identifier in the key message when registering with the second device 12, then the second device 12 may also maintain the corresponding relationship between different command passwords and different device identifiers. In this way, even if the contents of the commands sent from different devices are the same, the second device 12 can determine which device has sent the command received this time, specifically, based on the correspondence relationship shown in table 3. It is understood that the access codes may not be stored in table 1 or table 3.
TABLE 3
Equipment identification (MAC address) Access password Instruction content Command password
00:11:22:33:44:55 123456 0021 1234560021
00:aa:bb:cc:dd:ee 111222 0022 1112220022
It should be noted that, the process of generating the instruction password for each key by the first device 11 and generating the relevant corresponding relationship in table 1 (or table 3) by the second device 12 may be executed when each key is registered in the second device 12 when the first device 11 establishes the Wi-Fi connection with the second device 12 for the first time, or may be executed when the identity is verified when the subsequent first device 11 establishes the Wi-Fi connection with the second device 12 again, which is not limited in this embodiment of the present application.
The first device 11 may set default functions for the respective keys in advance at the time of factory shipment. For example, the default function of button 701 is to turn on and off the air conditioner in the bedroom, and the default function of button 702 is to turn on and off the lights in the living room. That is, the instruction content of the first key may be set in advance. Then it is. After the first device 11 first accesses the Wi-Fi network provided by the second device 12, it may automatically send a key message for registering the first key to the second device 12.
Alternatively, the user may manually trigger the first device 11 to register each key with the second device 12. For example, when the first device 11 (e.g., smart remote control) joins the Wi-Fi network created by the second device 12, if the user opens the smart home APP in the mobile phone, the APP may prompt the user to register each key in the smart remote control. For example, it can be displayed in the APP that the function of the key 701 is to turn on and off the air conditioner in the bedroom, that is, the instruction content of the key 701 is 0021. If the user confirms the function of the key 701, the user may click a corresponding registration button. At this time, the mobile phone may generate a key message of the key 701 according to the above registration method and transmit the key message to the second device 12. Or, the mobile phone may also send the instruction content 0021 of the key 701 confirmed by the user to the first device 11, and then the first device 11 generates a key message of the key 701 according to the above registration method and sends the key message to the second device 12.
In addition, after entering the intelligent household APP, the user can manually set or modify the functions of the keys in the intelligent remote control. As shown in fig. 8, it is assumed that the instruction content corresponding to the key 701 transmitted when the first device 11 registers with the second device 12 is 0021, and its function is to turn on and off the air conditioner in the bedroom. If it is detected that the user modifies the function of the key 701 on the APP to be used for adjusting the temperature of the bedroom air conditioner, the mobile phone may send the correspondence between the instruction content 0021 and the function of adjusting the temperature of the bedroom air conditioner to the second device 12. Subsequently, when the second device 12 resolves that the content of the instruction sent by the first device 11 is 0021, the operation of adjusting the temperature of the bedroom air conditioner can be controlled.
Still alternatively, the function corresponding to each instruction content may be set in advance to be certain. For example, when the instruction content is 0021, the corresponding function is to turn on and off the air conditioner in the bedroom, and when the instruction content is 0023, the corresponding function is to adjust the temperature of the air conditioner in the bedroom. These correspondences may be pre-stored in the handset and the second device 12. If it is detected that the function of the key 701 is modified to be used for adjusting the temperature of the bedroom air conditioner by the user on the APP, and the corresponding instruction content is 0023, the mobile phone can send the corresponding relation between the key 701 and the instruction content 0023 to the first device 11 for storage. Subsequently, when it is detected that the user clicks the key 701, the first device 11 may send a message including the instruction content 0023 to the second device 12, and the second device 12 analyzes, according to the corresponding relationship, that the intention of the user to click the key 701 is to adjust the temperature of the bedroom air conditioner.
And S603, disconnecting the Wi-Fi connection between the first device 11 and the second device 12.
After the first device 11 registers each key with the second device 12, it may enter a sleep mode. In the sleep mode, the first device 11 may disconnect the Wi-Fi connection with the second device 12, thereby reducing power consumption of the first device 11 and the second device 12. For example, after the first device 11 registers each key with the second device 12, if it is not detected that the user clicks any key within a preset time, the first device 11 may disconnect the Wi-Fi connection with the second device 12 and enter the sleep mode.
By the steps S601 to S603, the user completes the steps of accessing the Wi-Fi network and registering the key when using the first device 11 for the first time. Subsequently, the user may trigger a key in the first device 11 to send the registered key to the second device 12, see steps S604-S609 below.
S604, the first device 11 receives an input operation of the first key by the user.
The input operation may be a single-click operation, a double-click operation, a heavy-pressure operation, a sliding operation, or the like, which is not limited in this embodiment of the application. For the same key (e.g., the first key), the instruction contents corresponding to the first key may be different when the user performs different input operations.
S605, in response to the input operation, the first device 11 generates an authentication request according to the access password and the instruction content of the first key.
For example, if the user goes home and wants to turn on the light in the living room, as shown in fig. 9, the user may input a single click operation to the key 702 (i.e., the first key) of the first device 11. After the first device 11 detects the click operation, if the Wi-Fi connection between the first device 11 and the second device 12 is disconnected, the first device 11 needs to reestablish the Wi-Fi connection with the second device 12. Before establishing the Wi-Fi connection, the second device 12 needs to authenticate the first device 11 requesting access. Unlike the prior art in which the first device 11 is authenticated by using the access password, in the embodiment of the present application, as shown in fig. 9, the first device 11 may carry the instruction password of the key 702 in the authentication request to be sent to the second device 12. Because the instruction password of the key 702 is generated according to the access password of the Wi-Fi network and the instruction content corresponding to the key 702, after the authentication request is carried with the instruction password of the key 702, the authentication request can reflect the access password of the Wi-Fi network to the second device and can also reflect the instruction content corresponding to the key 702.
Specifically, if the first device 11 already stores the instruction password of the key 702 when registering with the second device 12 (i.e., executing step S602), after detecting that the user clicks the key 702, the first device 11 may add the instruction password of the key 702 to the first field of the Authentication Request, so as to obtain an Authentication Request (Authentication Request) to be sent. The first field is used for recording an access password of a Wi-Fi network in the existing Wi-Fi access process, and is used for recording an instruction password of a corresponding key triggered by a user in the embodiment of the application.
Accordingly, if the first device 11 does not store the instruction password of the key 702 when registering (i.e., executing step S602) with the second device 12, after the first device 11 detects that the user clicks the key 702, because the first device 11 has previously accessed the Wi-Fi network of the second device 12, that is, the first device 11 records the access password of the Wi-Fi network, the first device 11 may generate the instruction password of the key 702 according to the generation policy of the preset instruction password according to the access password of the Wi-Fi network and the instruction content corresponding to the key 702. And, the first device 11 may add the command password of the key 702 to the first field of the authentication request, so as to obtain the authentication request to be sent. The generation policy of the instruction password used by the first device 11 to generate the instruction password for the key 702 is the same as the generation policy of the instruction password used by the second device 12 to generate the instruction password according to the transmission of the instruction content by the first device 11 at the time of registration.
It can be seen that, in the message transmission method provided by the present application, the existing access procedure is not changed when accessing the Wi-Fi network, but when performing the authentication process in the access procedure, the first device 11 (the authenticated party) can reflect that the access password of the Wi-Fi network and the instruction content corresponding to the key are carried in the authentication request together for authentication. So that the second device 12 (the verifier) can determine the validity of the first device 11 and the instruction sent by the first device 11 at the same time according to the authentication request. Therefore, the sending process of the message is simplified on the premise of not changing the existing Wi-Fi access flow, and the response speed of the message is improved.
S606, the first device 11 sends the authentication request to the second device 12.
S607, the second device 12 performs authentication on the first device 11 according to the authentication request.
In steps S606 to S607, after the first device 11 generates the authentication request, the authentication request may be sent to the second device 12, and the second device 12 performs authentication on the first device 11 according to the authentication request.
At this time, since the Wi-Fi connection is not established between the first device 11 and the second device 12, when the first device 11 sends the authentication request to the second device 12, the identifier of the second device 12 or the SSID of the Wi-Fi network may also be carried in the authentication request, so that the second device 12 can recognize that the authentication request is sent to itself according to the identifier of the second device 12 or the SSID of the Wi-Fi network. Or, since the first device 11 may acquire the MAC address of the second device 12 when first connecting with the second device 12, the first device 11 may send the authentication request to the second device 12 in a unicast manner according to the MAC address of the second device 12.
In some embodiments, as shown in fig. 9, in combination with table 1 or table 3, since the second device 12 stores the command password of each key of each registered device. Therefore, after receiving the authentication request sent by the first device 11, the second device 12 may match the instruction password (e.g., 1112220022) carried in the authentication request with each stored instruction password. If the instruction password carried in the authentication request is the same as a certain stored instruction password, it indicates that the access password and the instruction content of the Wi-Fi network reflected by the instruction password are both correct, and the second device 12 may determine that the first device 11 is a legitimate device.
Correspondingly, if the instruction password carried in the authentication request is different from each stored instruction password, it may indicate that the access password used when the first device 11 generates the instruction password is wrong, may also indicate that the instruction content used when the instruction password is generated is wrong, and may also indicate that the access password and the instruction content used when the instruction password is generated are both wrong. In either case, the second device 12 may consider the first device 11 as an illegal device at this time.
It can be seen that, in the embodiment of the present application, the validity of a device accessing a Wi-Fi network may be dynamically changed each time. For example, the command password carried in the authentication request sent by the first device 11 for the first time is 1234560020, and since the command passwords 1234560020 are different from the command passwords stored in the second device 12 in advance, the second device 12 may consider that the first device 11 is an illegal device at this time. Subsequently, if the command password carried in the authentication request sent by the first device 11 for the second time is 1234560021, since the command password 1234560021 is the same as the command password 1234560021 stored in table 1, the second device 12 may consider that the first device 11 is a valid device at this time.
In other embodiments, if the second device 12 also stores a policy for generating the instruction password used by the first device 11 to generate the instruction password of each key, after receiving the authentication request sent by the first device 11, the second device 12 may further analyze, according to a reverse process of the generation policy, the access password and the instruction content used when the instruction password in the authentication request is generated.
For example, the generation policy of the instruction password used by the first device 11 to generate the instruction password is: and splicing the 6-bit access password with the instruction content. Then, if the command password in the authentication request received by the second device 12 is 1234560021, the second device 12 can determine whether the access password used by the first device 11 is correct by reading the first 6 bits (i.e., 123456) in 1234560021, and determine whether the command content used by the first device 11 is correct by reading the last 4 bits (i.e., 0021) in 1234560021. If the first 6 bits: 123456 is the correct access password preset by the second device 12, and the last 4 bits: 0021 is the instruction content registered in step S602 by the second device 12, the second device 12 may consider the first device 11 as a legitimate device. Accordingly, the second device 12 may determine that the first device 11 is an illegitimate device if the first 6 bits of the 1234560021 are not the correct access code and/or the last 4 bits of the 1234560021 are not the instruction content that the first device 11 has registered.
In addition, before the first device 11 sends the authentication request to the second device 12, in order to ensure the security during the transmission process, the first device 11 may also encrypt the authentication request or the command password in the authentication request by using a certain encryption algorithm, and then send the encrypted authentication request to the second device 12. After receiving the encrypted authentication request, the second device 12 may also decrypt the authentication request or the command password in the authentication request through a corresponding decryption algorithm, which is not limited in this embodiment of the present application.
S608, if the identity authentication is passed, the second device 12 executes the instruction content corresponding to the first key.
If the second device 12 passes the authentication of the first device 11, that is, the first device 11 is a legal device, the second device 12 may determine the instruction content corresponding to the instruction password sent by the first device 11 this time according to the correspondence shown in table 1 (or table 3), so as to implement the control function corresponding to the instruction content. For example, the command password transmitted by the first device 11 at this time is 1112220022, the command content corresponding to the command password in table 1 is 0022, and the function corresponding to the command content 0022 in table 2 is to turn on the lamp in the living room. Then, as also shown in fig. 9, the second device 12 may send an open instruction to the light fixture in the living room (i.e., the third device), so that the light fixture in the living room executes the open instruction, i.e., implements instruction content 0022 corresponding to the first key.
It can be seen that, when the first device 11 and the second device 12 perform the authentication in the embodiment of the present application, the first device 11 may send the access password for authenticating the identity and the instruction content that needs to be executed by the user to the second device 12 in the form of the instruction password in the authentication request. In this way, the second device 12 can not only verify the identity of the first device 11 based on the command password, but also determine the content of the command that the user needs to execute, so as to quickly respond to the operation of the user clicking the first key, reduce the time delay of message response caused by the processes of establishing communication connection, performing identity verification and the like, and reduce the waiting time of the user.
In addition, after the second device 12 passes the authentication of the first device 11, the first device 11 may further continue to access the Wi-Fi network created by the second device 12 according to the Wi-Fi access procedure, and establish a Wi-Fi connection with the second device 12.
Of course, if the second device 12 fails to authenticate the first device 11, that is, the first device 11 is an illegal device, the second device 12 may discard the authentication request sent by the first device 11 this time, and refuse the first device 11 to establish the Wi-Fi connection with the second device 12. If the authentication requests sent by the first device 11 many times do not pass authentication, the second device 12 may also alarm in a manner of sound generation or light emission, or, if the mobile phone of the user also joins the Wi-Fi network created by the second device 12, the second device 12 may also send an alarm message to the mobile phone of the user, so as to prevent the first device 11 from illegally accessing the Wi-Fi network created by the second device 12.
And S609, disconnecting the Wi-Fi connection between the first device 11 and the second device 12.
Each time the first device 11 sends a message to the second device 12, according to the method described in the above steps S604 to S608, when accessing the Wi-Fi network created by the second device 12, the access password for authenticating the identity and the instruction content that the user needs to execute are sent to the second device 12 in the form of the instruction password. Thus, the first device 11 need not send a message to the second device 12 by maintaining a Wi-Fi connection with the second device 12.
As also shown in fig. 9, if the first device 11 receives the message completion response sent by the second device 12, which indicates that the second device 12 has implemented the control function corresponding to the content of the instruction sent by the first device 11, the first device 11 may disconnect the Wi-Fi connection with the second device 12 and enter the sleep state, thereby reducing the power consumption of the first device 11 and the second device 12.
Still alternatively, when the first device 11 receives the message completion response sent by the second device 12, the first device 11 may continue the Wi-Fi connection with the second device 12 for a period of time (e.g., 30 s). If no user trigger of a key in the first device 11 is detected within these 30s, the first device 11 may disconnect the Wi-Fi connection with the second device 12 into a sleep state.
Of course, the second device 12 may also send an instruction receiving response to the first device 11 after confirming that the authentication of the first device 11 is passed, so as to inform that the instruction content carried in the authentication request by the first device 11 is correctly received by the second device 12. Further, the first device 11 may disconnect the Wi-Fi connection with the second device 12 into a sleep state, thereby reducing power consumption of the first device 11 and the second device 12.
Subsequently, after the first device 11 enters the hibernation state, if it is detected that the user triggers a certain key in the first device 11, the method described in the above steps S604 to S609 may be continued, and when the authentication request is sent to the second device 12, the instruction password capable of reflecting the corresponding instruction content is carried.
In addition, if the first device 11 detects that the user triggers the first button 701 before the first device 11 enters the sleep state, that is, the Wi-Fi connection between the first device 11 and the second device 12 is not disconnected. Since the second device 12 has completed authentication of the first device 11 at the time the Wi-Fi connection is established, the first device 11 may send the instructional contents of the key 701, e.g., 0022, to the second device 12 based on the Wi-Fi connection. After receiving the instruction content, the second device 12 may determine that the function corresponding to the instruction content sent by the user is to turn on a lamp in the living room. Further, the second device 12 may send a corresponding control command to the light fixture in the living room, so that the light fixture in the living room performs an opening operation in response to the control command.
It can be seen that, in this embodiment of the present application, after the first device 11 joins the network of the second device 12 for the first time, the key on the first device 11 is registered on the second device 12, so that the corresponding relationship between the instruction content and the instruction password is established in the second device 12. Then, after the first device 11 and the second device 12 are disconnected, if the first device 11 receives an operation of a certain key by a user, the first device 11 may carry an access password for authenticating the identity and instruction content that the user needs to execute in an authentication request in the form of an instruction password and send the instruction password to the second device 12. In this way, the second device 12 can not only verify the identity of the first device 11 based on the command password, but also determine the content of the command that the user needs to execute, so as to quickly respond to the operation of the user clicking the first key, reduce the time delay of message response caused by the processes of establishing communication connection, performing identity verification and the like, and reduce the waiting time of the user.
In other embodiments, in addition to the form of the instruction password, the first device may notify the second device of the instruction content of the key of the first device during registration, the first device or the second device does not need to generate the instruction password, and the second device maintains a corresponding relationship between the instruction content and the function. When the user operates the key of the first device 11, the first device 11 may add the instruction content of the first key and the access password for accessing the Wi-Fi network to the authentication request and send the authentication request to the second device 12. For example, a first field and a second field may be set in the authentication request, where the first field includes instruction content of the first button (e.g., 0021), and the second field includes an access password (e.g., 123456) when the Wi-Fi network is accessed for the first time. In this way, after receiving the authentication request, the second device 12 may obtain the instruction content sent by the first device 11 from the first field of the authentication request, and obtain the access password sent by the first device 11 from the second field of the authentication request. Then, if the access password sent by the first device 11 is correct, the second device 12 may regard the first device 11 as a legal device at this time, and execute the function corresponding to the instruction content, otherwise, the second device 12 may regard the first device 11 as an illegal device at this time.
Exemplarily, fig. 10 is an interaction schematic diagram of a message transmission method provided in the embodiment of the present application, and in this embodiment, a Wi-Fi scenario is still taken as an example, where a first device 11 is a sending end of a message, and a second device 12 is an access point for creating the Wi-Fi network. In contrast, in the above embodiment, as exemplified by the first device 11 sending a message to the second device 12 along with the authentication step in the existing Wi-Fi access procedure, the message transmission method provided in this embodiment may be applied to any interaction process between the first device 11 and the second device 12 when there is no Wi-Fi connection. The method comprises the following steps:
s1001, the first device 11 establishes Wi-Fi connection with the second device 12 according to the access password input by the user.
When the user uses the first device 11 for the first time, the first device 11 may access the Wi-Fi network created by the second device 12 according to an existing Wi-Fi access procedure (e.g., the access procedure shown in fig. 2) using the access password input by the user. For the method for the first device 11 to access the Wi-Fi network, reference may be made to the relevant description of step S601, and therefore, details are not repeated here.
S1002, the first device 11 registers the relevant information of the first device 11 with the second device 12, where the first device 11 includes at least one key.
After the first device 11 establishes the Wi-Fi connection with the second device 12 for the first time, the first device 11 may send its own device identifier (for example, a MAC address, etc.) to the second device 12 for registration.
And, the first device 11 may agree with the second device 12 on the encryption and decryption methods to be used in the subsequent interaction. For example, when the first device 11 subsequently sends a message to the second device 12, the message may be encrypted by using the encryption algorithm a, and then, after the first device 11 establishes the Wi-Fi connection with the second device 12 for the first time, the decryption algorithm B corresponding to the encryption algorithm a may also be sent to the second device 12, so that the second device 12 may decrypt the message content sent by the first device 11 by using the decryption algorithm B in the subsequent time. For another example, when the first device 11 subsequently sends a message to the second device 12, the private key 1 may be used for encryption, and then, after the first device 11 establishes a Wi-Fi connection with the second device 12 for the first time, the public key 2 corresponding to the private key 1 may also be sent to the second device 12, so that the second device 12 subsequently decrypts the message content sent by the first device 11 using the public key 2. The second device 12 may store a correspondence between the device identifier of the first device 11 and a decryption algorithm (for example, the public key 2), so that when a message of the first device 11 is received later, the corresponding algorithm may be found for decryption.
In addition, when the first device 11 registers with the second device 12, the instruction content corresponding to each key in the first device 11 may also be transmitted to the second device 12. As also shown in fig. 7, the first device 11 may send the instruction content 0021 corresponding to the key 701 and the instruction content 0022 corresponding to the key 702 to the second device 12. The correspondence between different instruction contents and different functions may be maintained in the second device 12. For example, when the instruction content is 0021, the corresponding function is to turn on and off the air conditioner in the bedroom, and when the instruction content is 0023, the corresponding function is to adjust the temperature of the air conditioner in the bedroom. The subsequent second device 12 may implement the corresponding function according to the parsed instruction content.
And S1003, disconnecting the Wi-Fi connection between the first device 11 and the second device 12.
Similar to step S603, after the first device 11 registers the information related to the first device 11 with the second device 12, the Wi-Fi connection with the second device 12 may be disconnected, and the sleep mode is entered, so as to reduce power consumption of the first device 11 and the second device 12.
S1004, the first device 11 receives an input operation of the first key by the user.
When the user wishes to control the other device using the first device 11 to implement the instruction content registered in step S1002, a corresponding operation may be input to a corresponding key in the first device 11. For example, if the user wishes to turn on the air conditioner in the bedroom, the key 701 on the first device 11 may be clicked; if the user wishes to turn on the light fixture in the living room, the key 702 on the first device 11 may be clicked.
S1005, responding to the input operation, the first device 11 sends a broadcast message, where the broadcast message includes the SSID of the Wi-Fi network and the instruction content corresponding to the first key, and the instruction content is encrypted.
After the first device 11 detects the input operation, if the Wi-Fi connection is not established between the first device 11 and the second device 12 at this time, the first device 11 may send a Probe Request (Probe Request) frame in a broadcast manner. At this time, the broadcast message is a Probe Request frame.
Fig. 11 is a schematic diagram illustrating an example of a frame structure of a Probe Request frame provided in the present application. The Probe Request frame may include: a Frame header (i.e., MAC header) 221, a Frame entity (Frame Body) 222, and a Frame Check (FCS) field 223.
The MAC header 221 may specifically include a Frame Control field (Frame Control), a Duration/identifier (Duration/ID), an Address field (Address), a Sequence Control field (Sequence Control), and the like. The frame control field may include a Protocol Version field (Protocol Version) and a type field. The protocol version field is used to indicate the protocol version, typically 0, to which the Probe Request frame 220 conforms. The Type field may include a Type for indicating that the corresponding frame is a management frame, a data frame, or a control frame, and a Subtype for indicating a Subtype of the frame, for example, when Type =00, the corresponding frame may be indicated as a management frame. The address field may include address information such as a source address, a destination address, a transmitting station address, and a receiving station address, where the destination address may be any one of a Unicast address (Unicast address), a Multicast address (Multicast address), and a Broadcast address (Broadcast address).
The frame entity 222 may specifically include an SSID field 2221, a Supported rate (Supported Rates) 2222, and an Extended Supported rate (Extended Supported Rates) 2223. The SSID field 2221 carries a service set identifier of the wireless local area network; supported rate 2222 and extended supported rate 2223 are used to indicate the set of rates supported by the handset or wireless router.
In this embodiment, when the first device 11 sends the Probe Request frame to the second device 12, the identifier of the second device 12 may be carried in the Probe Request frame. In this way, when the second device 12 receives the Probe Request frame, if it is determined that the Probe Request frame includes its own identifier, the second device 12 may determine that the receiver of the Probe Request frame is itself.
Illustratively, the identification of the second device 12 may be the SSID of the Wi-Fi network created by the second device 12. At this time, the SSID field 2221 of the Probe Request frame sent by the first device 11 to the second device 12 includes the SSID of the Wi-Fi network created by the second device 12. Since the user has accessed the Wi-Fi network created by the second device 12 when using the first device 11 for the first time in step S1001, the SSID of the Wi-Fi network is stored in the first device 11. Then the first device 11 may add the SSID in a Probe Request frame ready to be sent to the second device 12. In this way, when the second device 12 receives the Probe Request frame, it can determine that the receiver of the Probe Request frame is itself according to the SSID carried by the second device.
In addition, the first device 11 may add, to the Probe Request frame, instruction content corresponding to the first key triggered by the user. For example, the first device 11 may add the instruction content of the first key in the frame entity 222 of the Probe Request frame. However, since the Probe Request frame is transmitted in a broadcast manner, the first device 11 may encrypt the instruction content corresponding to the first key in order to ensure the security of the instruction content. For example, if the instruction content corresponding to the first key is 0021, the first device 11 may use the private key in step S1002 to sign the instruction content, and add the signed instruction content to the Probe Request frame to be sent to the second device 12.
In addition, the first device 11 may also add the device identifier of the first device 11 to the Probe Request frame. For example, the MAC address of the first device 11 may be carried in a Probe Request frame. In this way, when the second device 12 receives the Probe Request frame, the corresponding decryption algorithm may be found according to the device identifier of the first device 11.
Of course, in addition to the Probe Request frame, the first device 11 may also carry the encrypted instruction content in a broadcast message such as a management (action) frame, a data frame, or a control frame based on the Wi-Fi protocol, and send the encrypted instruction content to the second device 12, so that the second device 12 can acquire the instruction content that the first device 11 desires to execute.
S1006, after receiving the broadcast message, the second device 12 decrypts the instruction content in the broadcast message.
For example, after receiving the Probe Request frame broadcast by the first device 11, the second device 12 may determine whether the Probe Request frame is sent to itself according to the SSID field in the Probe Request frame. If the SSID recorded in the SSID field is the SSID of the Wi-Fi network created by the second device 12, the second device 12 may determine that the recipient of the Probe Request frame is itself.
Furthermore, the second device 12 may find a corresponding decryption algorithm according to the device identifier of the first device 11, that is, the decryption algorithm agreed with the first device 11 in step S1002, and decrypt the instruction content carried in the Probe Request frame. For example, if the first device 11 transmits a public key for decryption to the second device 12 at the time of registration, the second device can perform signature authentication on the encrypted instruction content using the public key. If the signature authentication is passed, it indicates that the first device 11 that sends the instruction content to the second device 12 this time is a registered legitimate device. In this way, the second device 12 obtains the instruction content sent by the first device 11 while completing the authentication of the first device.
S1007, the second device 12 executes the instruction content corresponding to the first key.
After the second device 12 successfully decrypts the instruction content in the broadcast message, it may control a third device in the Wi-Fi network to implement a control function corresponding to the instruction content. For example, if the instruction content decrypted by the second device 12 is 0022, it indicates that the user wishes to turn on the light in the living room. Then the second device 12 may send an opening instruction to the luminaires in the living room, causing the luminaires in the living room to execute the opening instruction, completing the response with instruction content of 0022.
It can be seen that, in the case that no connection is established between the first device 11 and the second device 12, the first device 11 may send the encrypted instruction content to the second device 12 by using the encryption and decryption manner of the instruction content pre-agreed with the second device 12. If the second device 12 can successfully decrypt the instruction content, it indicates that the first device 11 is a legal device, and the second device 12 obtains the instruction content that needs to be responded while verifying the validity of the first device 11, so that the operation of the user clicking the first key can be quickly responded.
S1008, the first device 11 enters the sleep state.
After the second device 12 executes the content of the instruction, it may send a message completion response to the first device 11, that is, notify the first device 11 that the broadcast message sent this time has been responded. Further, the first device 11 may enter a sleep mode with lower power consumption to reduce the power consumption of the first device 11.
Correspondingly, if the first device 11 does not receive the message completion response sent by the second device 12 within the preset time, the first device 11 may repeatedly send the Probe Request frame carrying the key message to the second device until the message completion response sent by the second device 12 is received, and then the sleep state with lower power consumption is entered.
Subsequently, after the first device 11 enters the sleep state, if it is detected that the user triggers a certain key in the first device 11, the corresponding broadcast message may be continuously sent to the second device 12 according to the method described in the above steps S1004-S1008.
It should be noted that, in the above embodiments S601 to S609 and S1001 to S1008, wi-Fi scenarios are illustrated, and it is understood that the method in the above embodiments may also be used to transmit messages in other wireless communication scenarios, which is not limited in this embodiment of the present invention. For example, in a bluetooth scenario, the first device 11 may carry, in the verification request, a key message that can reflect the pairing code and corresponds to a key when pairing with the second device 12 based on a bluetooth protocol, and send the verification request to the second device 12, so that the second device 12 can determine, according to the verification request, the validity of the first device 11 and the instruction sent by the first device 11 at the same time, and improve the response speed of the message.
In the foregoing embodiment, if the second device is a cloud server, the first device (e.g., an intelligent remote controller, an intelligent switch, etc.), the controlled third device (e.g., an air conditioner, a lamp, etc.), and a router are located in a local area network, the first device and the controlled third device interact with the cloud server through the router, for example, the first device registers its own device identifier on the cloud server through the router, registers a key on the first device, the subsequent first device sends an instruction password or encrypted instruction content to the cloud server through the router, and the cloud server performs identity authentication on the first device or decrypts the encrypted content, and then controls the third device to execute the instruction content through the router.
In some embodiments of the present application, a message transmission device is disclosed in the embodiments of the present application, where the message transmission device is a first device. In particular, the first device may include a processor, and a memory coupled to the processor, at least one key, a communication interface, an input device, and an output device. Where the input device and the output device may be integrated into one device, for example, the touch sensitive surface may be used as the input device, the display screen may be used as the output device, and the touch sensitive surface and the display screen may be integrated into a touch screen. For example, as shown in fig. 12, the first device may include: at least one key 1200; a communication interface 1201; one or more processors 1202; a memory 1203; and one or more computer programs 1204, which may be connected by one or more communication buses 1205. Wherein the one or more computer programs 1204 are stored in the memory 1203 and configured to be executed by the one or more processors 1202, the one or more computer programs 1204 comprising instructions which may be used to perform the steps in the first device related embodiment as in fig. 5 or fig. 10.
In other embodiments of the present application, an embodiment of the present application discloses a message transmission device, where the message transmission device is a second device. In particular, the second device may include a processor, and a memory, a communication interface, an input device, and an output device coupled to the processor. Where the input device and the output device may be integrated into one device, for example, the touch sensitive surface may be used as the input device, the display screen may be used as the output device, and the touch sensitive surface and the display screen may be integrated as a touch screen. For example, as shown in fig. 13, the second device may include: a communication interface 1301; one or more processors 1302; a memory 1303; and one or more computer programs 1304 that may be coupled via one or more communication buses 1305. Wherein the one or more computer programs 1304 are stored in the memory 1303 and configured to be executed by the one or more processors 1302, the one or more computer programs 1304 comprise instructions that can be used to perform the steps in the second device related embodiment of fig. 5 or fig. 10.
In some embodiments of the present application, an embodiment of the present application discloses a message transmission device, where the message transmission device is a first device, and as shown in fig. 14, the first device is configured to implement the method described in the foregoing method embodiments, and the method includes: a communication unit 1401, an input unit 1402, and a processing unit 1403. Wherein the communication unit 1401 is configured to support the first device to perform the procedures S601-S603, S606, S609 in fig. 5, and the procedures S1001-S1003, S1005 in fig. 10; the input unit 1402 is configured to support the first device to perform the process S604 in fig. 5, the process S1004 in fig. 10, and other operations for receiving user input; the processing unit 1403 is used to support the first device in performing the process S605 in fig. 5, and the process S1008 in fig. 10. All relevant contents of the steps related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In some embodiments of the present application, an embodiment of the present application discloses a message transmission device, where the message transmission device is a second device, and as shown in fig. 15, the second device is configured to implement the method described in the above method embodiments, and includes: a communication unit 1501 and a processing unit 1502. Wherein the communication unit 1401 is configured to support the second device to perform the processes S601 to S603, S606, S609 in fig. 5, and the processes S1001 to S1003, S1005 in fig. 10; the processing unit 1502 is configured to support the second device to perform processes S607-S608 in fig. 5, and processes S1006-S1007 in fig. 10. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Through the description of the foregoing embodiments, it will be clear to those skilled in the art that, for convenience and simplicity of description, only the division of the functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the apparatus 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 each embodiment 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, in essence or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) 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 a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A method for message transmission, comprising:
when a first device does not access a local area network where a second device is located, the second device receives a broadcast message sent by the first device, wherein the broadcast message comprises an identifier of the first device and encrypted first instruction content;
the second device decrypts the first instruction content by using a decryption algorithm corresponding to the identification of the first device;
and if the first instruction content is successfully decrypted, the second equipment controls third equipment to realize the first instruction content, and the third equipment has access to the local area network.
2. The method of claim 1, wherein the broadcast message further includes an identification of the second device;
after the second device receives the broadcast message sent by the first device, the method further includes:
the second equipment determines whether the receiver of the broadcast message is the second equipment according to the identification of the second equipment;
wherein the second device decrypts the first instruction content using a decryption algorithm corresponding to the identifier of the first device, including:
and if the receiver of the broadcast message is the second equipment, the second equipment decrypts the first instruction content by using a decryption algorithm corresponding to the identifier of the first equipment.
3. The method of claim 1, further comprising, before the second device receives the broadcast message sent by the first device:
the second equipment receives registration information sent by the first equipment, wherein the registration information comprises an identifier and a decryption algorithm of the first equipment;
the second device establishes a correspondence between the identity of the first device and the decryption algorithm.
4. The method of any of claims 1-3, wherein the first device has Wi-Fi connectivity, wherein the second device is a wireless router, and wherein the local area network is a Wi-Fi local area network provided by the second device.
5. A message transmission method for a first device, the first device comprising at least one key, the at least one key comprising a first key, the method comprising:
when the first equipment is not accessed to a local area network where second equipment is located, the first equipment receives input operation of a user on the first key;
responding to the input operation, the first device encrypts first instruction content of the first key by using a preset encryption algorithm, wherein the first instruction content is used for controlling third equipment to execute a corresponding function, and the third equipment is connected to the local area network;
the first equipment adds the identification of the first equipment and the encrypted first instruction content into a broadcast message;
the first device transmits the broadcast message.
6. The method according to claim 5, before the first device receives the input operation of the first key by the user, further comprising:
and the first equipment sends registration information to the second equipment, wherein the registration information comprises the identification of the first equipment and a decryption algorithm corresponding to the encryption algorithm.
7. A message transmission device, the message transmission device being a first device, the first device comprising:
a communication interface;
one or more keys;
one or more processors;
one or more memories;
and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions which, when executed by the first device, cause the first device to perform the message transmission method of any of claims 1-4.
8. A message transmission device, the message transmission device being a second device, the second device comprising:
a communication interface;
one or more processors;
one or more memories;
and one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs comprising instructions which, when executed by the second device, cause the second device to perform the message transmission method of any of claims 5-6.
9. A computer-readable storage medium having instructions stored therein, which when run on a message transmission device, cause the message transmission device to perform the message transmission method of any one of claims 1-4 or claims 5-6.
CN202110296606.4A 2018-08-30 2018-08-30 Message transmission method and device Active CN113207122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110296606.4A CN113207122B (en) 2018-08-30 2018-08-30 Message transmission method and device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201880075243.8A CN111373713B (en) 2018-08-30 2018-08-30 Message transmission method and device
CN202110296606.4A CN113207122B (en) 2018-08-30 2018-08-30 Message transmission method and device
PCT/CN2018/103360 WO2020042119A1 (en) 2018-08-30 2018-08-30 Message transmission method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201880075243.8A Division CN111373713B (en) 2018-08-30 2018-08-30 Message transmission method and device

Publications (2)

Publication Number Publication Date
CN113207122A CN113207122A (en) 2021-08-03
CN113207122B true CN113207122B (en) 2022-10-18

Family

ID=69644794

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110296606.4A Active CN113207122B (en) 2018-08-30 2018-08-30 Message transmission method and device
CN201880075243.8A Active CN111373713B (en) 2018-08-30 2018-08-30 Message transmission method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201880075243.8A Active CN111373713B (en) 2018-08-30 2018-08-30 Message transmission method and device

Country Status (2)

Country Link
CN (2) CN113207122B (en)
WO (1) WO2020042119A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021007736A1 (en) * 2019-07-15 2021-01-21 小白投资有限公司 Network encryption method
CN113746718B (en) * 2020-05-29 2022-10-28 华为技术有限公司 Content sharing method, device and system
CN113949420B (en) * 2020-06-30 2023-10-20 华为技术有限公司 Vehicle control method, electronic equipment and system
CN114157412B (en) * 2020-08-17 2023-09-29 华为技术有限公司 Information verification method, electronic device and computer readable storage medium
CN114339709A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Wireless communication method and terminal device
CN112512097A (en) * 2020-11-18 2021-03-16 北京小米移动软件有限公司 Information processing method and device, electronic equipment and storage medium
CN116528244A (en) * 2020-12-28 2023-08-01 华为技术有限公司 Method and device for verifying personal identification number PIN code
CN113938345B (en) * 2021-08-26 2023-07-18 杭州涂鸦信息技术有限公司 Linkage equipment control method and system, intelligent gateway equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2701447A1 (en) * 2012-08-22 2014-02-26 Rheinisch-Westfälisch-Technische Hochschule Aachen A method for establishing a wireless network by means of a content identifier
WO2015157942A1 (en) * 2014-04-16 2015-10-22 华为终端有限公司 Device and method for accessing wireless network

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120331156A1 (en) * 2011-06-21 2012-12-27 Colpitts Cameron Wireless control system, methods and apparatus
CN102938729B (en) * 2012-10-30 2016-12-21 山东智慧生活数据系统有限公司 The long-range control method of intelligent gateway, intelligent domestic system and home appliance
US8948391B2 (en) * 2012-11-13 2015-02-03 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Secure communication method
CN105450483A (en) * 2014-08-21 2016-03-30 宇龙计算机通信科技(深圳)有限公司 Method for controlling smart household devices by using mobile terminal and correlative equipment
CN104301303B (en) * 2014-09-15 2018-06-22 汕头大学 A kind of smart home Internet of Things safety protecting method and system
CN104618267B (en) * 2014-12-29 2018-02-13 小米科技有限责任公司 Connection control method and device
CN105357262B (en) * 2015-09-29 2019-07-23 小米科技有限责任公司 Apparatus control method and device
CN105228224A (en) * 2015-10-29 2016-01-06 小米科技有限责任公司 The cut-in method of wireless network and device
WO2017219180A1 (en) * 2016-06-20 2017-12-28 易晓阳 Internet-of-things equipment control method based on wifi communication
CN107682245B (en) * 2017-11-08 2021-03-02 北京小米移动软件有限公司 Wireless remote control method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2701447A1 (en) * 2012-08-22 2014-02-26 Rheinisch-Westfälisch-Technische Hochschule Aachen A method for establishing a wireless network by means of a content identifier
WO2015157942A1 (en) * 2014-04-16 2015-10-22 华为终端有限公司 Device and method for accessing wireless network

Also Published As

Publication number Publication date
WO2020042119A1 (en) 2020-03-05
CN111373713A (en) 2020-07-03
CN111373713B (en) 2021-07-09
CN113207122A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
CN113207122B (en) Message transmission method and device
WO2021052178A1 (en) Wi-fi connection method and device
CN113225690B (en) Bluetooth connection method, system and electronic equipment
CN112469013B (en) Bluetooth connection method and related device
CN110730114B (en) Method and equipment for configuring network configuration information
CN111093183B (en) Mobile equipment management method and equipment
WO2021043198A1 (en) Bluetooth pairing method, and related device
WO2021104448A1 (en) Method for synchronizing key information, system and device
CN111083804A (en) Data transmission method and equipment
WO2022143156A1 (en) Encrypted call method and apparatus, terminal, and storage medium
WO2022135143A1 (en) Device network distribution method, and mobile terminal and storage medium
CN114339698A (en) Method for establishing wireless connection through equipment touch, electronic equipment and chip
WO2024037040A1 (en) Data processing method and electronic device
CN112615891B (en) Pairing method and device
WO2023246695A1 (en) Device authorization method, electronic device and system
CN115550919A (en) Equipment pairing authentication method and device, sender equipment and receiver equipment
CN115883118A (en) Device login method, electronic device and storage medium
CN115802326A (en) Bluetooth connection method and electronic equipment
CN115734169A (en) Communication system and communication method
CN114007205A (en) Key reuse method and device
CN117459241A (en) Login method, electronic equipment and storage medium
CN113691979A (en) Wireless data transmission method, electronic device, system and storage medium
CN114980238A (en) Wi-Fi access method and related equipment

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
GR01 Patent grant
GR01 Patent grant