Device connection method, system, sensor, terminal device, and storage medium

By receiving target encoding method and sorting information in pre-connection mode, the problem of time and resource waste in traditional device connection methods is solved, and efficient sensor connection is achieved.

CN115633411BActive Publication Date: 2026-04-28SHENZHEN SHUMA ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHUMA ELECTRONICS TECH
Filing Date
2022-09-23
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional device connection methods waste a lot of time and resources when establishing connections with multiple sensors because the terminal device cannot know in advance the number of sensors within the communication range and the supported protocols, and needs to identify them by continuously sending matching signals of different protocols.

Method used

By receiving a joint response broadcast command from a terminal device, the system enters a pre-connection mode, generates an encoded command response packet using a target encoding method, and determines the target transmission time of the broadcast response packet based on sorting information in order to establish a connection with the terminal device.

Benefits of technology

This reduces the number of times matching signals are sent, avoids data conflicts between sensors, saves time and resources, and improves connection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633411B_ABST
    Figure CN115633411B_ABST
Patent Text Reader

Abstract

The application relates to a device connection method, system, sensor, terminal device and storage medium. The method comprises the following steps: receiving a common response broadcast command sent by a terminal device, entering a pre-connection mode based on the common response broadcast command; in the pre-connection mode, receiving an encoding broadcast command containing a target encoding mode sent by the terminal device; generating an encoding command response packet based on a sensor identifier by using the target encoding mode; sending the encoding command response packet to the terminal device; receiving a sorting command containing sorting information sent by the terminal device; the sorting information is obtained by sorting the sensor identifier; determining a target sending time of a broadcast response packet based on the sorting information, and sending the broadcast response packet to the terminal device when the target sending time is reached, so as to establish a connection with the terminal device; the broadcast response packet is a data packet responding to the broadcast command sent by the terminal device. The method can save time and resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a device connection method, apparatus, terminal device, and storage medium. Background Technology

[0002] General-purpose sensors are upgraded to support protocols from multiple manufacturers, which may result in multiple sensors supporting different protocols during the upgrade process. Terminal devices cannot know in advance the number of sensors within the communication range or the protocols they support, often preventing them from directly establishing connections with multiple sensors in a single communication. Traditional device connection methods mostly involve continuously sending matching signals of different protocols to elicit responses from sensors supporting different protocols, thereby identifying the number of sensors within the communication range and their respective protocols. However, traditional device connection methods waste significant time and resources. Summary of the Invention

[0003] Therefore, it is necessary to provide a device connection method, system, sensor, terminal device, and storage medium that can save time and resources to address the above-mentioned technical problems.

[0004] A device connection method, the method comprising:

[0005] Receive a joint response broadcast command sent by the terminal device, and enter the pre-connection mode based on the joint response broadcast command;

[0006] In the pre-connection mode, the terminal device sends an encoded broadcast command containing the target encoding method.

[0007] Using the target encoding method, an encoded command response packet is generated based on the sensor identifier;

[0008] Send the encoded command response packet to the terminal device;

[0009] The terminal device sends a sorting command containing sorting information; the sorting information is obtained by sorting the sensor identifiers.

[0010] Based on the sorting information, the target transmission time of the broadcast response packet is determined. When the target transmission time is reached, the broadcast response packet is sent to the terminal device to establish a connection with the terminal device. The broadcast response packet is a data packet that responds to the broadcast command sent by the terminal device.

[0011] A device connection method, the method comprising:

[0012] Send a common response broadcast command, which is used to instruct the sensor to enter a pre-connection mode;

[0013] Send an encoding broadcast command containing the target encoding method; the encoding broadcast command is used to instruct the sensor in the pre-connection mode to encode using the target encoding method to establish a communication connection;

[0014] Receive the encoded command response packet returned by the sensor based on the encoded broadcast command; the encoded command response packet includes the sensor identifier encoded using the target encoding method;

[0015] Sort the sensor identifiers to obtain a sorting command containing sorting information;

[0016] The sorting command is sent to the sensor, which instructs the sensor to determine the target transmission time of the broadcast response packet based on the sorting information in order to establish a communication connection; the broadcast response packet is a data packet that responds to the broadcast command.

[0017] A device connectivity system for use with terminal devices and multiple sensors, comprising:

[0018] The terminal device is used to send a joint response broadcast command;

[0019] For each of the multiple sensors, the sensor is used to enter a pre-connection mode based on the common response broadcast command;

[0020] The terminal device is used to send an encoded broadcast command containing the target encoding method;

[0021] The sensor is used to generate an encoded command response packet based on the sensor identifier using the target encoding method.

[0022] The terminal device is used to sort the sensor identifiers and obtain a sorting command containing sorting information;

[0023] The sensor is used to determine the target transmission time of the broadcast response packet based on the sorting information. When the target transmission time is reached, the sensor sends the broadcast response packet to the terminal device to establish a connection with the terminal device.

[0024] A sensor for performing the steps of the methods in the embodiments of this application.

[0025] A terminal device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the methods in the embodiments of this application.

[0026] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the methods in the embodiments of this application.

[0027] The aforementioned device connection method, system, sensor, terminal device, and storage medium receive a common response broadcast command sent by the terminal device and enter a pre-connection mode based on the common response broadcast command. Therefore, only one command is needed to switch to the connection mode. Since the terminal device needs to establish a connection with the sensor within the communication range, it needs to send commands to unspecified objects. Traditional methods require sensor adaptation, wasting a lot of resources and time. In the embodiment of this application, the target encoding method is received in the pre-connection mode, and the sensor identifier is returned. The sorting information sent by the terminal device is received, and the target sending time of the subsequent broadcast response packet is determined. The encoding method is agreed with the terminal device and the response packet is sent according to the sorting information. This can reduce the number of times matching signals are sent, avoid data conflicts between sensors, and save a lot of time and resources. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of a conventional device connection method in one embodiment;

[0029] Figure 2 This is a schematic diagram illustrating the application environment of the device connection method in one embodiment;

[0030] Figure 3 This is a flowchart illustrating a device connection method in one embodiment;

[0031] Figure 4 This is a flowchart illustrating the device connection method in another embodiment;

[0032] Figure 5 This is a schematic diagram of the device connection status in one embodiment;

[0033] Figure 6 This is a timing diagram illustrating the acquisition of random characters in one embodiment;

[0034] Figure 7 This is a schematic diagram illustrating the process of four sensors executing different protocols entering a fully connected mode in one embodiment.

[0035] Figure 8 This is an internal structure diagram of a terminal device in one embodiment. Detailed Implementation

[0036] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0038] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly. The connection can be a direct connection or an indirect connection.

[0039] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.

[0040] In one embodiment, such as Figure 1 The diagram illustrates a conventional device connection method in one embodiment. Sensor 110 randomly selects protocol A for communication, sensor 120 selects protocol B, sensor 130 selects protocol C, and terminal device 140 randomly selects protocol B. In this case, communication between devices 110 and 130 and the terminal device fails. The conventional method requires sending matching signals for potentially different protocols to determine the protocols supported by the tire pressure sensors within the communication range and their quantity, resulting in a significant waste of time and resources.

[0041] In one embodiment, such as Figure 2 The diagram shown is an application environment schematic of a device connection method in one embodiment. Figure 2 The system includes a terminal device and multiple sensors, including sensor 210, sensor 220... sensor N and terminal device 200. This embodiment is described using one of the sensors.

[0042] like Figure 3 The diagram shown is a flowchart illustrating a device connection method in one embodiment, including:

[0043] Step 302: Receive the common response broadcast command sent by the terminal device, and enter the pre-connection mode based on the common response broadcast command.

[0044] A joint response broadcast command refers to a command pre-agreed upon by the terminal device and the sensor, and which the sensor can decode in a known, specific manner. The joint response command may include a terminal device identifier. The terminal device identifier is used to uniquely identify the terminal. The terminal device identifier can consist of one or more of numbers, symbols, letters, and characters. A joint response broadcast command is a type of broadcast command. Broadcasting refers to a device sending data to other devices within communication range. Broadcast commands do not specify a particular recipient. Pre-connection mode is a mode for preparing for connection.

[0045] Specifically, the sensors operate in normal mode before receiving the common response broadcast command. In normal mode, each sensor executes a different communication protocol (i.e., a different encoding method), but they all respond to a unique common response broadcast command. The terminal device sends the common response broadcast command to the sensors. The sensors receive the common response broadcast command from the terminal device. Based on the common response command, the sensors enter a pre-connection mode. In pre-connection mode, the sensors wait for the response encoding command.

[0046] Step 304: In pre-connection mode, receive an encoded broadcast command containing the target encoding method sent by the terminal device.

[0047] The encoding method refers to the encoding method required by the communication protocol. The target encoding method is the encoding method specified by the terminal device. The target encoding method may include frequency band, modulation method, etc. The encoding broadcast command is also a command sent to unspecified devices within the communication range. The encoding broadcast command is used to cause the sensor in pre-connection mode to use the target encoding method for encoding in order to establish a communication connection with the terminal device.

[0048] Specifically, in pre-connection mode, the sensor receives an encoded broadcast command containing the target encoding method sent by the terminal device.

[0049] Step 306: Using the target encoding method, generate an encoded command response packet based on the sensor identifier.

[0050] The encoding command response packet is a data packet that responds to the encoding command. The encoding command response packet includes the sensor identifier. The sensor identifier is a unique identifier for the sensor, used to uniquely identify the sensor. Specifically, the sensor identifier can be, but is not limited to, the sensor's MAC (Media Access Control) address, IP (Internet Protocol) address, etc.

[0051] Specifically, the sensor uses this target encoding method to generate an encoded command response packet based on the sensor identifier in response to the encoded command.

[0052] Step 308: Send an encoded command response packet to the terminal device.

[0053] Step 310: Receive a sorting command containing sorting information sent by the terminal device; the sorting information is obtained by sorting the sensor identifiers.

[0054] The sorting command is a unicast command sent to a specific sensor. The sorting command includes sorting information, which refers to the sorting order corresponding to the sensor identifier.

[0055] Specifically, the terminal device receives sensor identifiers returned by multiple sensors and sorts these identifiers. The sorting can be based on the size of the sensor identifiers or the order of the received coded command response packets. The sensors receive a sorting command containing sorting information from the terminal device to obtain their own sorting information.

[0056] Step 312: Determine the target sending time of the broadcast response packet based on the sorting information. When the target sending time is reached, send a broadcast response packet to the terminal device to establish a connection with the terminal device. The broadcast response packet is a data packet that responds to the broadcast command sent by the terminal device.

[0057] In this context, a broadcast response packet refers to a data packet that responds to a subsequent broadcast command sent to the terminal device. For example, a broadcast response packet could be a data packet responding to a handshake broadcast command. The target sending time refers to the time the broadcast response packet was sent.

[0058] Specifically, the sensor can determine the transmission time of the broadcast response packet based on the product of the sorting information and the time window duration. For example, if sensor B's sorting is 2 and the time window duration is t, then the transmission time could be 2t hours after receiving the broadcast command. When the transmission time arrives, the sensor sends a broadcast response packet to the terminal device to establish a connection with the terminal device.

[0059] In this embodiment, the terminal device receives a common response broadcast command and enters a pre-connection mode based on the common response broadcast command. Therefore, only one command is needed to switch to the connection mode. Since the terminal device needs to establish a connection with sensors within the communication range, it needs to send commands to unspecified objects. Traditional methods require sensor adaptation, wasting a lot of resources and time. In this embodiment, the target encoding method is received in the pre-connection mode, and the sensor identifier is returned. The sorting information sent by the terminal device is received, and the target sending time of the subsequent broadcast response packet is determined. The encoding method is agreed upon with the terminal device, and the response packet is sent according to the sorting information. This can reduce the number of times matching signals are sent, avoid data conflicts between sensors, and save a lot of time and resources.

[0060] In one embodiment, sending an encoding command response packet to a terminal device includes: obtaining a random sending time for the encoding command response packet; and sending the encoding command response packet to the terminal device when the random sending time is reached.

[0061] This refers to the sending time of the randomly sent time-coded command response packet. The random sending time can be a randomly generated sending time within a certain time range, or it can be a sending time determined based on random numbers.

[0062] Specifically, the sensor generates a random number and determines the random transmission time of the coded command response packet based on this random number. The random number can be generated using a random number algorithm or a true random number generator. For example, if the random number is 2, the second time interval after receiving the coded broadcast command can be used as the random transmission time. Alternatively, if the random number is 2, the random transmission time can be 2 seconds, 2 milliseconds, etc., after receiving the coded broadcast command. When the random transmission time is reached, the sensor sends the coded command response packet to the terminal device.

[0063] In this embodiment, the random sending time of the encoded command response packet is obtained, and the encoded command response packet is sent to the terminal device when the random sending time is reached. This can reduce data conflicts and increase the probability of successful transmission of the encoded command response packet.

[0064] In one embodiment, when the target transmission time is reached, a broadcast response packet is sent to the terminal device, including:

[0065] Receive handshake broadcast commands sent by terminal devices;

[0066] Based on the handshake broadcast command, obtain random characters;

[0067] Encrypt random characters to obtain encrypted characters;

[0068] When the target transmission time is reached, the system returns a random character encoded using the target encoding method and an encrypted character to the terminal device, so that the terminal device can compare the reference encrypted character and the encrypted character to obtain the comparison result; the reference encrypted character is obtained by the terminal device encrypting the random character.

[0069] When the comparison result is successful, it enters the full connection mode with the terminal device.

[0070] The handshake broadcast command is used to establish a communication connection between the sensor and the terminal device. The handshake broadcast response packet in response to the handshake broadcast command contains random characters and encrypted characters. The random characters can include at least one of numbers, letters, symbols, and words. The encrypted characters are obtained by encrypting the random characters using an encryption algorithm employed by the sensor. The reference encrypted characters are obtained by encrypting the random characters using an encryption algorithm employed by the terminal device. Furthermore, the encryption algorithms used by the sensor and the terminal device should be consistent. Fully connected mode refers to a mode where the sensor and the terminal device are fully connected. It is understood that both the random characters and the encrypted characters are encoded using this target encoding method.

[0071] Specifically, upon receiving the handshake broadcast command, the sensor acquires random characters. The sensor then encrypts these random characters using an encryption algorithm, obtaining encrypted characters. When the target transmission time arrives, the sensor returns the random characters encoded using the target encoding method, along with the encrypted characters, to the terminal device. The terminal device compares the encrypted characters with a reference random character to obtain the comparison result. When the comparison is successful, the sensor enters full connectivity mode.

[0072] In this embodiment, a handshake broadcast command sent by a receiving terminal device is received, and a random character is obtained based on the handshake broadcast command. When the target transmission time is reached, a random character encoded using the target encoding method is returned to the terminal device. A character verification broadcast command sent by the receiving terminal device after receiving the random character is received is received. Based on the character verification broadcast command, when the target transmission time is reached, an encrypted character encoded using the target encoding method is sent to the terminal device so that the terminal device can compare the reference encrypted character with the encrypted random character and obtain the comparison result. When the comparison result is successful, the device enters a full connection mode with the terminal device.

[0073] In this embodiment, the handshake broadcast command sent by the terminal device is received and verified by encrypting the random characters. When the target sending time is reached, the random characters and encrypted characters are sent. By using the target sending time, data conflicts can be avoided during the handshake, reducing time and resource waste.

[0074] In one embodiment, when the target sending time is reached, a broadcast response packet is sent to the terminal device, including: when a broadcast command to enter normal mode is received from the terminal device, entering normal mode and generating a normal mode broadcast response packet;

[0075] When the target transmission time is reached, a normal mode broadcast response packet is sent to the terminal device.

[0076] The "Enter Normal Mode" broadcast command instructs the sensor to switch to normal mode. Normal mode is the mode in which the sensor is in use. Pre-connection mode and the mode for establishing a connection with the terminal device can be collectively referred to as "connection mode" to distinguish them from normal mode. The normal mode broadcast response packet includes the sensor's own identifier and its response to the normal mode broadcast command.

[0077] Specifically, the sensor receives a broadcast command to enter normal mode from the terminal device. This normal mode broadcast command is issued after the sensor completes the target operation, enters normal mode, and generates a normal mode broadcast response packet. When the target transmission time arrives, the sensor sends this normal mode broadcast response packet to the terminal device.

[0078] In this embodiment, after connecting to the terminal device, it is necessary to switch to normal mode. Then, the system receives the broadcast command to enter normal mode sent by the terminal device and enters normal mode. When the target sending time is reached, the system sends a normal mode broadcast response packet to the terminal device, which can avoid data conflicts and reduce time and resource waste.

[0079] In one embodiment, when a broadcast command to enter normal mode is received from a terminal device, entering normal mode includes:

[0080] When a broadcast command to enter normal mode is received from a terminal device, the system resumes normal mode, which supports multiple encoding methods.

[0081] In normal mode, it no longer responds to encoded broadcast commands, sorting commands, handshake broadcast commands, and enter normal mode broadcast commands.

[0082] Specifically, in normal mode, the sensor supports multiple encoding methods, i.e., multiple communication protocols, and no longer responds to encoding broadcast commands, sorting commands, handshake broadcast commands, and normal mode entry broadcast commands.

[0083] In this embodiment, when a broadcast command to enter normal mode is received from the terminal device, the normal mode supporting multiple encoding methods is restored, and the encoding broadcast command, sorting command, handshake broadcast command, and normal mode broadcast command are no longer responded to. This can avoid accidental triggering of connection mode and improve connection accuracy.

[0084] In one embodiment, a device connection method includes:

[0085] Step (a1): Receive the common response broadcast command sent by the terminal device, and enter the pre-connection mode based on the common response broadcast command.

[0086] Step (a2): In pre-connection mode, receive an encoded broadcast command containing the target encoding method sent by the terminal device.

[0087] Step (a3) ​​uses the target encoding method to generate an encoded command response packet based on the sensor identifier.

[0088] Step (a4): Obtain the random sending time of the encoded command response packet.

[0089] Step (a5): When the random transmission time is reached, send an encoded command response packet to the terminal device.

[0090] Step (a6): Receive a sorting command containing sorting information sent by the terminal device. The sorting information is obtained by sorting the sensor identifiers.

[0091] Step (a7): Receive the handshake broadcast command sent by the terminal device.

[0092] Step (a8): Obtain random characters based on the handshake broadcast command.

[0093] Step (a9) involves encrypting the random characters to obtain encrypted characters.

[0094] Step (a10): When the target transmission time is reached, the system returns the random character encoded using the target encoding method and the encrypted character to the terminal device, so that the terminal device can compare the reference encrypted character and the encrypted character to obtain the comparison result. The reference encrypted character is obtained by the terminal device encrypting the random character.

[0095] Step (a11): When the comparison result is successful, enter the full connection mode to establish a connection with the terminal device.

[0096] Step (a12): When a broadcast command to enter normal mode is received from the terminal device, the system enters normal mode and generates a normal mode broadcast response packet.

[0097] Step (a13): When the target transmission time is reached, a normal mode broadcast response packet is sent to the terminal device.

[0098] In this embodiment, the terminal device receives a common response broadcast command and enters a pre-connection mode based on the common response broadcast command. Therefore, only one command is needed to switch to the connected state. Since the terminal device needs to establish a connection with the sensors within the communication range, it needs to be achieved through a broadcast command. The traditional method requires sensor adaptation, which wastes a lot of resources and time. In this embodiment, the coded broadcast command is received in the pre-connection mode, and the sensor identifier is returned. The sorting information sent by the terminal device is received, and the target sending time of the subsequent broadcast response packet is determined. This reduces the number of times matching signals are sent, avoids data conflicts between sensors, and saves a lot of time and resources.

[0099] In one embodiment, such as Figure 4The diagram shown is a flowchart of a device connection method in another embodiment, illustrated using a terminal device as an example.

[0100] Step 402: Send a common response broadcast command, which is used to instruct the sensor to enter the pre-connection mode.

[0101] Specifically, the terminal device sends a low-frequency common response broadcast command, which instructs sensors within communication range to enter pre-connection mode. Communication range refers to the area within which the terminal device's low-frequency signal can propagate. The number of sensors can be at least two.

[0102] Step 404: Send an encoding broadcast command containing the target encoding method; the encoding broadcast command is used to instruct the sensor in pre-connection mode to encode using the target encoding method to establish a communication connection.

[0103] Specifically, the encoding broadcast command is used to instruct at least two sensors in pre-connection mode to use the target encoding method for encoding in order to establish a communication connection. Optionally, the terminal device can intermittently or continuously send the encoding broadcast command containing the target encoding method within a preset duration.

[0104] Step 406: Receive the encoded command response packet returned by the sensor based on the encoded broadcast command; the encoded command response packet includes the sensor identifier encoded using the target encoding method.

[0105] Specifically, the terminal device receives encoded command response packets returned by each of at least two sensors based on encoded broadcast commands.

[0106] Step 408: Sort the sensor identifiers and obtain a sorting command containing sorting information.

[0107] Specifically, the terminal device can sort at least two sensor identifiers based on the order in which they are received. Alternatively, the terminal device can sort at least two sensor identifiers based on their size. For example, the sorting information could be that sensor A is sorted as number 1 and sensor B as number 2.

[0108] Step 410: Send a sorting command to the sensor. The sorting command is used to instruct the sensor to determine the target transmission time of the broadcast response packet based on the sorting information in order to establish a communication connection. The broadcast response packet is a data packet that responds to the broadcast command.

[0109] Specifically, the terminal device sends a sorting command to the corresponding sensor. The sorting command is used to instruct the sensor to determine the target transmission time of the broadcast response packet based on the sorting information, so as to establish a communication connection between the sensor and the terminal device.

[0110] In this embodiment, by sending a common response broadcast command and an encoded broadcast command containing the target encoding method, initial communication with the sensor within the communication range is quickly achieved; the encoded command response packet returned by the sensor based on the encoded broadcast command is received, which includes the sensor identifier, and the sensor identifier is sorted so that the sensor can respond according to the sorting information, avoiding data conflicts, and also reducing the number of times matching signals are sent, thereby improving the utilization of resources and time.

[0111] In one embodiment, the device connection method further includes: sending a handshake broadcast command; receiving a random number encoded using a target encoding method and an encrypted random number returned by the sensor based on the handshake command; the target transmission time of both the random number encoded using the target encoding method and the encrypted random number is determined based on sorting information; encrypting the random number to obtain a reference encrypted random number; comparing the reference encrypted random number and the encrypted random number, and when the comparison is successful, entering a full connection mode with the sensor.

[0112] In this embodiment, by sending a handshake broadcast command and verifying based on the random number returned by the sensor and the encrypted random number, it is possible to handshake with multiple sensors at the same time. Furthermore, by comparison, the matching object can be determined, thereby improving the connection accuracy.

[0113] In one embodiment, the device connection method further includes: after the sensor completes the target operation, entering a normal mode and sending a broadcast command to the sensor to enter the normal mode, so that the sensor enters the normal mode.

[0114] Specifically, after establishing a communication connection with the sensor, the terminal device sends a target operation to the sensor. This target operation could be upgrading the sensor protocol or acquiring sensor parameters. After the sensor completes the target operation, the terminal device switches from connection mode to normal mode and sends a broadcast command to the sensor to enter normal mode, causing the sensor to also enter normal mode.

[0115] In this embodiment, after the sensor completes the target operation, it enters the normal mode. A broadcast command to enter the normal mode is sent to the sensor, so that the sensor enters the normal mode. Disconnection after connection does not affect the normal use of the sensor.

[0116] In one embodiment, a tire pressure sensor is used as the example. TPMS (Tire Pressure Monitoring System) is widely used in automotive safety to monitor tire pressure during vehicle operation and promptly alert drivers to abnormal pressure conditions, thus ensuring driving safety. In this direct TPMS embodiment, the number of matching signal transmissions is reduced by adding common response broadcast commands, increasing connection modes, and sorting the responding tire pressure sensors, thereby improving resource and time utilization efficiency. Figure 5 The diagram shown is a schematic representation of the device connection status in one embodiment. Figure 5 This includes normal mode, pre-connection mode, and fully connected mode. A common response broadcast command is added to the different protocols. When a terminal device needs to establish a connection, it first sends this command to cause sensors operating in normal mode to enter pre-connection mode. In pre-connection mode, all sensors use the same protocol (i.e., the communication protocol corresponding to the target encoding method) for connection-related protocols, even if they execute different protocols in normal mode.

[0117] Before a complete connection is established with the terminal device, the tire pressure sensors operate in pre-connection mode. When responding to a command, they randomly select a time period within a specified window to send a response packet. Upon receiving the response packet, the terminal device sorts the tire pressure sensors according to the receiving order and sends a sorting command to the tire pressure sensors after all their transmissions have finished. Once all tire pressure sensors have been sorted, the terminal device establishes a stable communication connection with all sensors within its effective range, i.e., it operates in full-connection mode.

[0118] The tire pressure sensor and the terminal device communicate via low-frequency signals, such as Bluetooth or NFC (Near Field Communication). The commands for the entire connection process between the terminal device and the tire pressure sensor are shown in the table below. The commands include a preamble, synchronization header, terminal device identifier, tire pressure sensor identifier (if any), command word, data block, checksum, and EOM (End of Message).

[0119]

[0120] Each terminal device has a unique terminal device identifier, and each tire pressure sensor has a unique tire pressure sensor identifier, which cannot be a special identifier. In the embodiments of this application, it is assumed that the special identifier is 0xFFFF. The tire pressure sensor only responds to commands whose tire pressure sensor identifier matches its own or matches the special identifier. This divides the commands in the entire connection mode into two types: broadcast commands and unicast commands. The tire pressure sensor determines whether to execute the connection command based on the terminal device identifier and the tire pressure sensor identifier.

[0121] The command word specifies how a data block of a command frame should be interpreted. The data block contains the data sent from the terminal device to the tire pressure sensor. It is understandable that a command frame may not contain a data block.

[0122] A complete connection process should involve the following steps:

[0123] 1. Tire pressure sensor enters pre-connection mode

[0124] Before receiving the common response command, the tire pressure sensors typically operate in normal mode. Tire pressure sensors operating in normal mode execute different communication protocols, but they all respond to the common response broadcast command. In this embodiment, it is assumed that the command word of the common response broadcast command is 0x01, and the common response broadcast command is referred to as the 01 command.

[0125] The common response command is:

[0126]

[0127] At this point, the terminal device is unaware of the tire pressure sensor identifiers for each tire pressure sensor within the communication range. Therefore, when a connection needs to be established, it first sends a common response command with the tire pressure sensor identifier 0xFFFF. In this way, all tire pressure sensors within the communication range, after receiving the command and verifying its integrity, will enter pre-connection mode based on 0xFFFF and the command word. The 01 command does not require the tire pressure sensors to issue a data response.

[0128] 2. Terminal equipment specifies the coding method and obtains tire pressure sensor identification.

[0129] Before sorting, the terminal device needs to obtain the unique identifier of the tire pressure sensor within the communication range. However, the tire pressure sensor cannot know the encoding methods supported by the terminal device (such as frequency band, modulation method, etc.). Therefore, the terminal device needs to issue an encoding method through a command, causing the tire pressure sensors to upload their respective tire pressure sensor identifiers. In this embodiment, the encoding broadcast command is called the O2 command, and the encoding command response packet is called the O2 command response packet.

[0130] The content of the 02 command issued by the terminal device should be:

[0131]

[0132] The command word for command 02 is 0x02. The data block of length N (where N is a positive integer) should contain the target encoding method for the tire pressure sensor response. This encoding method will be used throughout the subsequent connection process.

[0133] All tire pressure sensors within the communication range, after receiving a command and verifying its integrity, will send a 02 command response packet using a fixed encoding method, based on 0xFFFF, the command word, and the data block content. The content of the 02 command response packet should be:

[0134]

[0135] The data block of length M (M is a positive integer) should contain a unique identifier for each tire pressure sensor. Since the tire pressure sensor is unaware of the existence of other tire pressure sensors and has no sorting information from the terminal device, each tire pressure sensor will randomly select a time within a fixed time window (hereinafter referred to as Twindow) to send a 02 command response packet to minimize data packet collisions.

[0136] Within the Twindow timeframe, the terminal device continuously parses data packets according to the encoding method in the 02 command. After verifying data integrity, the terminal device can obtain the number of all tire pressure sensors and their corresponding identifiers within the current communication range based on the 02 command response packet.

[0137] 3. The terminal equipment is arranged for tire pressure sensors.

[0138] After obtaining the number and identifiers of all tire pressure sensors within the current communication range, the terminal device needs to sort the tire pressure sensor identifiers.

[0139] The reason for sorting is that the terminal device cannot parse data packets that conflict in time, therefore the tire pressure sensors need to send their data at different times. Since the tire pressure sensors operate on the same protocol in both pre-connected and fully connected modes, the runtime for parsing commands, executing commands, and sending response data is also consistent, with an error margin of a few microseconds. Therefore, if the tire pressure sensors are not sorted, their response data packets will inevitably conflict.

[0140] The sorting operation can be ignored for unicast commands because, in unicast mode, even if multiple tire pressure sensors exist, the tire pressure sensor identifier is unique, so only one response packet exists, avoiding data conflicts. The sorting method can be determined by the size of the identifier, the order in which the response packets are received, etc.

[0141] 4. The terminal device sends out sorting information.

[0142] After the terminal device has sorted all tire pressure sensors, it needs to send out sorting information. In this embodiment, the sorting command is referred to as the 03 command, and the response packet to the sorting command is referred to as the 03 command response packet. The content of the command to send the sorting information should be (here, it is assumed that the command word is 0x03, hereinafter referred to as the 03 command):

[0143]

[0144] As shown in the table above, the tire pressure sensor identifier in command 03 should be the unique identifier of each tire pressure sensor obtained in step 2, i.e., command 03 is in unicast mode. The data block of length N (N is a positive integer) should contain the sorting information of each tire pressure sensor before sending the response packet.

[0145] After receiving the 03 command and verifying data integrity, the tire pressure sensor first checks if its identifier matches its own unique identifier. Then, based on the sorting information in the data block, it calculates the fixed delay before sending the broadcast command response packet. The content of the 03 command response packet should be:

[0146]

[0147] The data block of the 03 command response packet needs to include the result of setting the sorting information. If the calculated sorting information is greater than the maximum value of the tire pressure sensor, the 03 command response packet will reply with an error message regarding the sorting information. It is important to note that the 03 command response packet does not require a sorting delay before transmission because, although the 03 command configures sorting information, it is unicast.

[0148] 5. The terminal device establishes a handshake with the tire pressure sensor and enters full connection mode.

[0149] The purpose of the handshake between the terminal device and the tire pressure sensor is to ensure that the tire pressure sensor establishing a connection with the terminal is legitimate. In this embodiment, the handshake method involves the tire pressure sensor uploading random and encrypted characters, and the terminal device ultimately verifies the legitimacy of the tire pressure sensor.

[0150] a) Terminal device obtains random characters

[0151] The content of the handshake start broadcast command should be as follows (assuming the command word is 0x04, hereinafter referred to as command 04):

[0152]

[0153] The tire pressure sensor identifier for command 04 can be either a unique identifier for the tire pressure sensor or 0xFFFF. The difference lies in whether it retrieves random characters from a single tire pressure sensor or random characters from all tire pressure sensors within the communication range.

[0154] The response packet for command 04 should contain random characters generated by the tire pressure sensor, and the tire pressure sensor must ensure the randomness of these characters. Its content is:

[0155]

[0156] A data block of length M (where M is a positive integer) should contain random characters generated by each tire pressure sensor.

[0157] Because the tire pressure sensors acquired sorting information in command 03, when command 04 is a broadcast command, it's possible to acquire random characters from multiple tire pressure sensors during a single interaction. Their interaction process is as follows: Figure 6 As shown. Figure 6 This is a timing diagram illustrating the acquisition of random characters in one embodiment.

[0158] b) Terminal device verification of random characters

[0159] The content of the character verification broadcast command should be (assuming the command word is 0x05, hereinafter referred to as command 05):

[0160]

[0161] The tire pressure sensor identifier for command 05 can be either a unique identifier for the tire pressure sensor or 0xFFFF. The difference is that 05 retrieves encrypted random characters from all tire pressure sensors within the communication range, while 0xFFFF retrieves encrypted random characters from a single tire pressure sensor.

[0162] The 05 command response packet should contain the encrypted result of the random characters generated in the 04 command by the tire pressure sensor, i.e., the encrypted characters, the content of which is:

[0163]

[0164] A data block of length M (M is a positive integer) should contain encrypted characters for each tire pressure sensor.

[0165] When the terminal device receives the response packet of command 05, it will encrypt the random characters obtained in command 04, compare the reference encrypted characters with the encrypted random characters obtained in command 05, and if they are the same, the tire pressure sensor is considered valid; otherwise, the communication with the tire pressure sensor will end.

[0166] Once all tire pressure sensors are valid, the terminal device and the tire pressure sensors enter a fully connected mode.

[0167] 6. Enter normal mode

[0168] After the terminal device completes the target operation (generally upgrading the tire pressure sensor protocol or obtaining tire pressure sensor parameters), it needs to issue a command to switch the tire pressure sensor to normal mode, i.e., execute a different protocol. The content of the broadcast command to enter normal mode should include (here, we assume the command word is 0x06, hereinafter referred to as command 06):

[0169]

[0170] The tire pressure sensor identifier for command 06 can be either a unique identifier for the tire pressure sensor or 0xFFFF. The difference lies in whether it puts all tire pressure sensors within the communication range into normal mode or a single tire pressure sensor into normal mode.

[0171] The content of the normal mode broadcast response packet, i.e., the 06 command response packet, is as follows:

[0172]

[0173] After sending the response packet, the tire pressure sensor will immediately enter normal mode and will no longer respond to commands 02-06, but will still respond to command 01.

[0174] like Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the process of four sensors executing different protocols entering a fully connected mode in one embodiment. Figure 7 This includes sensor 1, sensor 2, sensor 3, and sensor 4. Each column indicates the mode or state of the sensor. In normal mode, sensor 1 runs protocol A, sensor 2 runs protocol B, sensor 3 runs protocol C, and sensor 4 runs protocol D. Upon receiving command 01, all four sensors enter pre-connection mode. After commands 02 and 03, all four sensors know their own order, which are NO.1, NO.2, NO., and NO.4 respectively. After commands 04 and 05, all four sensors are valid and enter fully connected mode. Upon receiving command 06, they return to normal mode and execute different protocols.

[0175] In this embodiment, the number of times matching signals are sent is reduced by adding a common response broadcast command, adding a connection mode, and sorting the responding tire pressure sensors, thereby improving the efficiency of resource and time utilization. Since tire pressure sensor identifiers and terminal device identifiers are added, even if two terminal devices exist at the same time, as long as the 02 command is not sent at the same time, the two connection processes can still be executed normally, improving the anti-interference performance.

[0176] It should be understood that, although the above Figure 3 and Figure 4 In the flowchart, the steps are shown sequentially according to the arrows, and the steps (a1) to (a13) are shown sequentially according to their numbers. However, these steps are not necessarily executed in the order indicated by the arrows or numbers. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps; they can be executed in other orders. Figure 3At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0177] In one embodiment, a device connectivity system is applied to a terminal device and multiple sensors, including:

[0178] The terminal device is used to send a joint response broadcast command;

[0179] For each of the multiple sensors, the sensor is used to enter a pre-connection mode based on a common response broadcast command;

[0180] The terminal device is used to send an encoded broadcast command containing the target encoding method;

[0181] The sensor is used to generate an coded command response packet based on the sensor identifier using a target encoding method;

[0182] The terminal device is used to sort the sensor identifiers and obtain a sorting command containing sorting information;

[0183] The sensor is used to determine the target transmission time of the broadcast response packet based on the sorting information. When the target transmission time is reached, the sensor sends a broadcast response packet to the terminal device to establish a connection with the terminal device.

[0184] In this embodiment, the number of times matching signals are sent is reduced by adding a common response broadcast command, agreeing on a target encoding method, and sorting the responding sensors, thereby improving time and resource utilization.

[0185] In one embodiment, the sensor is used to obtain the random transmission time of the coded command response packet; when the random transmission time is reached, the coded command response packet is sent to the terminal device.

[0186] In one embodiment, the sensor is used to receive a handshake broadcast command sent by the terminal device; obtain random characters based on the handshake broadcast command; encrypt the random characters to obtain encrypted characters; when the target transmission time is reached, return the random characters encoded using the target encoding method and the encrypted characters to the terminal device, so that the terminal device can compare the reference encrypted characters and the encrypted characters to obtain a comparison result; the reference encrypted characters are obtained by the terminal device encrypting the random characters; when the comparison result is a successful comparison, enter the full connection mode.

[0187] In one embodiment, the sensor is configured to enter normal mode and generate a normal mode broadcast response packet when it receives a normal mode broadcast command from the terminal device; and to send the normal mode broadcast response packet to the terminal device when the target transmission time is reached.

[0188] In one embodiment, the sensor is used to restore the normal mode that supports multiple encoding methods when it receives a broadcast command to enter normal mode sent by the terminal device; in normal mode, it no longer responds to encoding broadcast commands, sorting commands, handshake broadcast commands and enter normal mode broadcast commands.

[0189] For specific limitations on the device connection system, please refer to the limitations on the device connection method mentioned above, which will not be repeated here.

[0190] In one embodiment, a terminal device is provided, the internal structure of which can be shown as follows: Figure 8 As shown, the terminal device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a device connection method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the terminal device's casing, or an external keyboard, touchpad, or mouse.

[0191] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0192] In one embodiment, a sensor is provided for implementing the steps in the above method embodiments.

[0193] In one embodiment, a terminal device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method embodiments.

[0194] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.

[0195] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer commands stored in a computer-readable storage medium. A processor of a computer device reads the computer commands from the computer-readable storage medium, and executes the computer commands, causing the computer device to perform the steps in the above method embodiments.

[0196] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes described in the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0197] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A device connection method, characterized in that, The method, applied to one of a plurality of sensors, includes: Receive a joint response broadcast command sent by the terminal device, and enter the pre-connection mode based on the joint response broadcast command; In the pre-connection mode, the terminal device sends an encoded broadcast command containing the target encoding method. Using the target encoding method, an encoded command response packet is generated based on the sensor identifier; Send the encoded command response packet to the terminal device; The terminal device receives a sorting command containing sorting information; the sorting information is obtained by the terminal device sorting the sensor identifiers. Based on the sorting information, the target transmission time of the broadcast response packet is determined. When the target transmission time is reached, the broadcast response packet is sent to the terminal device to establish a connection with the terminal device. The broadcast response packet is a data packet that responds to the broadcast command sent by the terminal device.

2. The method according to claim 1, characterized in that, Sending the encoded command response packet to the terminal device includes: Obtain the random sending time of the encoded command response packet; When the random sending time is reached, the encoded command response packet is sent to the terminal device.

3. The method according to claim 1, characterized in that, The step of sending the broadcast response packet to the terminal device when the target sending time is reached includes: Receive the handshake broadcast command sent by the terminal device; Based on the handshake broadcast command, obtain random characters; The random characters are encrypted to obtain encrypted characters; When the target transmission time is reached, the random character encoded using the target encoding method and the encrypted character are returned to the terminal device, so that the terminal device can compare the reference encrypted character and the encrypted character to obtain a comparison result; the reference encrypted character is obtained by the terminal device encrypting the random character. When the comparison result is successful, the device enters a full connection mode with the terminal device.

4. The method according to claim 1, characterized in that, The step of sending the broadcast response packet to the terminal device when the target transmission time is reached includes: When a broadcast command to enter normal mode is received from the terminal device, the system enters normal mode and generates a normal mode broadcast response packet. When the target transmission time is reached, the normal mode broadcast response packet is sent to the terminal device.

5. The method according to claim 4, characterized in that, The step of entering normal mode upon receiving a broadcast command to enter normal mode from the terminal device includes: When a broadcast command to enter normal mode is received from the terminal device, the normal mode supporting multiple encoding methods is restored; In the normal mode, the encoded broadcast command, sorting command, handshake broadcast command, and enter normal mode broadcast command are no longer responded to.

6. A device connection method, characterized in that, Applied to a terminal device, the method includes: Send a common response broadcast command, which is used to instruct the sensor to enter a pre-connection mode; Send an encoding broadcast command containing the target encoding method; the encoding broadcast command is used to instruct the sensor in the pre-connection mode to encode using the target encoding method to establish a communication connection; Receive the encoded command response packet returned by the sensor based on the encoded broadcast command; the encoded command response packet includes the sensor identifier encoded using the target encoding method; Sort the sensor identifiers to obtain a sorting command containing sorting information; The sorting command is sent to the sensor, which instructs the sensor to determine the target transmission time of the broadcast response packet based on the sorting information in order to establish a communication connection; the broadcast response packet is a data packet that responds to the broadcast command.

7. The method according to claim 6, characterized in that, The method further includes: Send handshake broadcast command; The sensor receives a random number encoded using the target encoding method and an encrypted random number returned by the handshake broadcast command; the target transmission time of the random number encoded using the target encoding method and the encrypted random number are both determined based on the sorting information. The random number is encrypted to obtain a reference encrypted random number; The reference encrypted random number and the encrypted random number are compared. When the comparison is successful, the system enters a fully connected mode with the sensor.

8. The method according to claim 6, characterized in that, The method further includes: After the sensor completes the target operation, it enters normal mode and sends a broadcast command to the sensor to enter normal mode, causing the sensor to enter normal mode.

9. A device connection system, characterized in that, include: The terminal device is used to send a joint response broadcast command; For each of the multiple sensors, the sensor is used to enter a pre-connection mode based on the common response broadcast command; The terminal device is used to send an encoded broadcast command containing the target encoding method; The sensor is used to generate an encoded command response packet based on the sensor identifier using the target encoding method. The terminal device is used to sort the sensor identifiers and obtain a sorting command containing sorting information; The sensor is used to determine the target transmission time of the broadcast response packet based on the sorting information. When the target transmission time is reached, the sensor sends the broadcast response packet to the terminal device to establish a connection with the terminal device.

10. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 6 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Communication connection method and system, and equipment

    CN108923819A

  • Equipment connection method and system, terminal equipment, detection device and storage medium

    CN114928816A