Wireless data transmission method, programmable wireless transmission device and storage medium
Through the identification verification and encrypted data transmission channels between the client and the programmable wireless transmission device, the problems of data security and transmission efficiency in wireless debugging are solved, and efficient and secure data transmission in complex environments are achieved.
Patent Information
- Application Number
- CN202510549435.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-08-15
AI Technical Summary
Existing wireless debugging methods have problems with data security and transmission efficiency in equipment maintenance, especially in complex environments, it is difficult to ensure data integrity and security.
Through identification verification between the client and the programmable wireless transmission device, an encrypted data transmission channel is formed, and data transmission is processed using encrypted encoding, and data encryption is carried out after the handshake protocol is passed to ensure the security and integrity of the data.
It improves the security and transmission efficiency of wireless data transmission, prevents third-party tampering, and realizes efficient data transmission in complex environments.
Smart Images

Figure CN120499649A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data transmission, and in particular to a wireless data transmission method, a programmable wireless transmission device, and a storage medium. Background Art
[0002] Currently, for the post-debugging and maintenance of various installed equipment, the traditional method requires manual on-site maintenance through wired debugging operations. However, due to the poor installation environment of some equipment and the short distance of wired debugging, it will result in a large amount of manpower and time costs.
[0003] Prior art uses wireless debugging to maintain installed devices, reducing the labor and time associated with wired debugging. However, because device data can be easily tampered with by third parties during wireless debugging, the security and transmission efficiency of debugging data cannot be guaranteed during wireless debugging.
[0004] Regarding the problem in related technologies that data security and transmission efficiency need to be improved when performing wireless debugging operations on installed devices, no effective solution has been proposed so far. Summary of the Invention
[0005] In this embodiment, a wireless data transmission method, a programmable wireless transmission device, and a storage medium are provided to solve the problem in the related art that data security and transmission efficiency need to be improved when performing wireless debugging operations on installed devices.
[0006] In a first aspect, a wireless data transmission method is provided in this embodiment. The method is applied to a programmable wireless transmission device; the programmable wireless transmission device includes a first interface and a second interface; the method includes:
[0007] After the client obtains the communication identifier of the programmable wireless transmission device through the first interface, in response to a connection request received from the client, obtains a first ciphertext carried in the connection request, and sends the device identifier of the programmable wireless transmission device to the client according to the first ciphertext;
[0008] After the client verifies the communication identifier and the device identifier, the client is successfully connected, and the first interface and the second interface are connected to form a data transmission channel;
[0009] Receiving a communication start instruction sent by the client through the first interface, encrypting and encoding a second ciphertext carried by the received communication start instruction to obtain a handshake protocol, and sending the handshake protocol to the device to be debugged;
[0010] When the device to be debugged passes the handshake protocol verification, the communication interface data broadcast by the device to be debugged is received through the second interface, the received communication interface data is encoded and encrypted, and the encoded and encrypted communication interface data is sent to the client, so that the client and the device to be debugged perform data encryption transmission based on the communication interface data and the data transmission channel.
[0011] In some embodiments, the wireless data transmission method further includes:
[0012] receiving, through the first interface, a data transmission instruction sent by the client, and in response to the data transmission instruction, verifying a data transmission frame carried by the data transmission instruction to obtain a verification result;
[0013] Feedback the verification result to the client via the first interface, and update the baud rate of the first interface according to the data transmission frame control;
[0014] receiving, via the first interface, a data packet to be transmitted sent by the client, and verifying the data packet to be transmitted;
[0015] When the data packet to be transmitted passes the verification, a data transmission completion frame is returned to the client via the first interface, and the baud rate of the first interface is controlled and restored.
[0016] In some embodiments, the receiving, through the first interface, a data packet to be transmitted sent by the client, and verifying the data packet to be transmitted includes:
[0017] Based on the first interface, receiving a data packet to be transmitted sent by the client, where the data packet to be transmitted includes multiple sub-transmission data packets;
[0018] Based on the packet verification frames of the plurality of sub-transmission data packets, the sub-transmission data packets are verified in sequence according to a preset verification strategy;
[0019] If it is determined that the subpacket identifier corresponding to the subpacket number of the sub-transmission data packet is an end bit identifier, determining whether the subpacket number of the sub-transmission data packet is consistent with the number of subpackets in the data packet to be transmitted;
[0020] If the judgment is consistent, it is determined that the data packet to be transmitted passes the integrity check.
[0021] In some embodiments, the method further comprises:
[0022] receiving a storage instruction sent by the client through the first interface, and forwarding the storage instruction to the device to be debugged through the second interface;
[0023] Controlling and updating the baud rate of the first interface based on the storage function frame carried by the storage instruction;
[0024] After the device to be debugged sends the data packet to be stored to the client based on the storage instruction, receiving the data packet to be stored sent by the client based on the first interface, and verifying the data packet to be stored;
[0025] When the data packet to be transmitted passes the verification, the data packet to be stored is stored, and a data transmission completion frame is returned to the client through the first interface, and the baud rate of the first interface is controlled and restored.
[0026] In some embodiments, the controlling updating of the baud rate of the first interface includes:
[0027] Acquiring data attributes corresponding to the storage function frame and / or the data transmission frame;
[0028] Determining whether the data transmitted by the client is packet data based on the data attribute;
[0029] When it is determined that the data transmitted by the client is packet data, controlling and updating the baud rate of the first interface;
[0030] When it is determined that the data to be transmitted by the client is not packet data, the baud rate of the first interface is maintained.
[0031] In some embodiments, the method further comprises:
[0032] When the data packet to be transmitted passes the verification, according to the data transmission frame, the data packet to be transmitted is stored in a storage sector corresponding to the data transmission frame in a preset simulation memory area;
[0033] The operational attributes of the simulated memory area are consistent with the operational attributes of the preset non-volatile memory.
[0034] In some embodiments, the client is in communication with the cloud; after sending the device identification of the programmable wireless transmission device to the client according to the first ciphertext, the method further includes:
[0035] Receiving, according to the first interface, a verification result sent by the client; the verification result includes a result obtained by verifying the communication identifier and the device identifier according to the data identifier library in the cloud; the communication identifier and the device identifier are received by the client and forwarded to the cloud;
[0036] If the verification result indicates that the communication identifier and the device identifier fail verification, disconnect the first interface.
[0037] In some embodiments, the method further comprises:
[0038] In response to a data read request sent by the device to be debugged through the second interface, determining a storage sector where debugging data required to be read by the device to be debugged is located;
[0039] Reading the debugging data of the storage sector, and encrypting the read debugging data;
[0040] The encrypted debugging data is sent to the device to be debugged through the second interface.
[0041] In a second aspect, a programmable wireless transmission device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the wireless data transmission method described in the first aspect is implemented.
[0042] In a third aspect, a storage medium is provided in this embodiment, on which a computer program is stored. When the program is executed by a processor, the wireless data transmission method described in the first aspect is implemented.
[0043] Compared with the related art, a wireless data transmission method, a programmable wireless transmission device and a storage medium are provided in this embodiment. The client performs identification verification on the programmable wireless transmission device. After the verification is passed, the programmable wireless transmission device encrypts and encodes the multi-party transmission data. At the same time, there is no need to limit the debugging operation to a shorter distance range. When the entire wireless data transmission device achieves a handshake, data transmission is performed through the data transmission channel formed by the first interface and the second interface, which can realize encrypted communication of multi-party data, thereby improving the security and transmission efficiency of wireless transmission data operations.
[0044] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0046] Figure 1 This is a hardware structure block diagram of a terminal for the wireless data transmission method provided in an embodiment of the present application;
[0047] Figure 2 is a flowchart of a wireless data transmission method provided in an embodiment of the present application;
[0048] Figure 3 This is a flowchart of the Bluetooth device authentication and encryption communication method provided in this specific embodiment;
[0049] Figure 4 is a flowchart of the upgrade package transmission method provided in this specific embodiment;
[0050] Figure 5 This is a flow chart of the log storage method provided in this specific embodiment. DETAILED DESCRIPTION
[0051] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0052] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include unlisted steps or modules (units) or other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0053] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, it can be executed on a programmable wireless transmission device. Figure 1 This is a hardware structure diagram of a terminal of the wireless data transmission method provided in the embodiment of the present application. Figure 1 As shown, the programmable wireless transmission device may include one or more ( Figure 1 The programmable wireless transmission device may further include a transmission device 106 for communication functions and an input / output device 108. It will be appreciated by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0054] Memory 104 can be used to store computer programs and data transmitted by clients, such as application software programs and data such as log packets and upgrade packets. For example, the computer program corresponding to the wireless data transmission method in this embodiment is used. Processor 102 executes the computer program stored in memory 104 to perform various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include an emulated memory area whose operational properties are consistent with those of a pre-set non-volatile memory.
[0055] Transmission device 106 is used to receive or transmit data via a network. This network may include a wireless network provided by the terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0056] Conventional technology uses wireless debugging to maintain installed equipment, reducing the labor and time associated with wired debugging. However, because device data can be easily tampered with by third parties during wireless debugging, the security and transmission efficiency of debugging data cannot be guaranteed during wireless maintenance. Therefore, ensuring easy and secure maintenance of installed equipment components is crucial.
[0057] In this embodiment, a wireless data transmission method is provided, which uses a programmable wireless transmission device that supports storage expansion to perform data encryption and data transmission for a device to be debugged, which is not limited to debugging. Under the conditions of data packets, parameter packets, debugging instructions and log packets transmission, the security and integrity of the transmitted data are guaranteed, and the response is timely and the transmission speed is better. Figure 2is a flow chart of a wireless data transmission method provided in an embodiment of the present application, such as Figure 2 As shown, the method is applied to a programmable wireless transmission device; the programmable wireless transmission device is provided with a first interface and a second interface respectively; the process includes the following steps:
[0058] Step S210, after the client obtains the communication identifier of the programmable wireless transmission device through the first interface, in response to the connection request sent by the client, obtain the first ciphertext carried in the connection request, and send the device identifier of the programmable wireless transmission device to the client according to the first ciphertext.
[0059] In this step, when the client needs to perform wireless data transmission with the programmable wireless transmission device, the client will search for programmable wireless transmission devices within a certain range and obtain the unique communication identifier of the programmable wireless transmission device. For example, the communication identifier here includes an independent ID number of the programmable wireless transmission device, such as the Bluetooth ID corresponding to the programmable wireless transmission device. After the client establishes a connection with the programmable wireless transmission device through the communication identifier, it sends a connection request carrying a first ciphertext to the programmable wireless transmission device. The first ciphertext is used to obtain the device identifier of the programmable wireless transmission device. The programmable wireless transmission device receives the connection request sent by the client, obtains the first ciphertext, and sends the device identifier of the programmable wireless transmission device to the client. After the client obtains the communication identifier and device identifier, it will match them in the cloud database.
[0060] Step S220: After the client verifies the communication identifier and the device identifier, the client is successfully connected, and the first interface and the second interface are connected to form a data transmission channel.
[0061] In this step, if the client verifies that the communication identifier and device identifier are bound to the same programmable wireless transmission device, then the verification is successful and the client is now connected to the programmable wireless transmission device. Simultaneously, the programmable wireless transmission device internally connects the first interface and the second interface to form a data transmission channel. If the client verifies that the communication identifier and device identifier are not bound to the same programmable wireless transmission device, then the client has failed the verification. Upon receiving a signal from the client indicating that the identifier verification has failed, the programmable wireless transmission device disconnects from the client.
[0062] Furthermore, the client and the cloud are connected in communication; after sending the device identification of the programmable wireless transmission device to the client according to the first ciphertext, it also includes: receiving the verification result sent by the client according to the first interface; the verification result includes the result obtained after verifying the communication identification and the device identification according to the data identification library in the cloud; the communication identification and the device identification are received and forwarded to the cloud according to the client; when the verification result indicates that the communication identification and the communication identification verification fail, the first interface is disconnected.
[0063] The connection method between the cloud and the client can be wireless or wired, and the specific connection method is not limited. The cloud is provided with a data identification library, which stores communication identifications and device identifications corresponding to different programmable wireless transmission devices. The communication identification is an independent identification of the programmable wireless transmission device and can be directly searched by the client. After the client sends the first ciphertext included in the connection request according to the first interface, the client requests the device identification of the programmable wireless transmission device according to the protocol included in the first ciphertext. Exemplarily, the device identification here is the product internal ID of the programmable wireless transmission device. After obtaining the communication identification and device identification of the programmable wireless transmission device, the client sends the communication identification and device identification to the cloud. The cloud data identification library verifies whether the obtained communication identification and device identification correspond to the same programmable wireless transmission device and obtains a verification result. If the verification result indicates that the communication identification and communication identification correspond to the same programmable wireless transmission device, the verification is successful. At this time, the client is successfully connected to the programmable wireless transmission device, and the programmable wireless transmission device connects the first interface and the second interface to form a data transmission channel. If the verification result indicates that the communication identification and communication identification correspond to different programmable wireless transmission devices, the verification fails, and the first interface connecting the client to the programmable wireless transmission device is disconnected.
[0064] Step S230: receiving a communication start instruction sent by the client through the first interface, encrypting the second ciphertext carried in the received communication start instruction to obtain a handshake protocol, and sending the handshake protocol to the device to be debugged.
[0065] After the programmable wireless transmission device passes verification of its communication identifier and device identifier and connects to the first and second interfaces, the client sends a communication activation instruction to the programmable wireless transmission device, which is used to obtain the communication interface data of the device to be debugged through the data transmission channel in the programmable wireless transmission device, thereby enabling data transmission with the device to be debugged. After receiving the communication activation instruction sent by the client, the programmable wireless transmission device specifically encodes and encrypts the communication activation instruction according to a pre-stored key and a preset encoding method to obtain a corresponding handshake protocol. The programmable wireless transmission device then sends the encrypted handshake protocol to the device to be debugged connected to the second interface of the programmable wireless transmission device.
[0066] The handshake protocol is a mechanism for establishing a connection, negotiating parameters, or verifying identity. For example, the handshake protocol can be generated by encoding and encrypting the communication initiation instruction sent by the client using a multi-party supported encryption algorithm, key, and a preset protocol encoding format including data length, data content, and a checksum. This is not described in detail here.
[0067] Step S240, when the device to be debugged passes the handshake protocol verification, receives the communication interface data broadcast by the device to be debugged through the second interface, encodes and encrypts the received communication interface data, and sends the encoded and encrypted communication interface data to the client, so that the client and the device to be debugged perform data encryption transmission based on the communication interface data and the data transmission channel.
[0068] Among them, after the device to be debugged receives the handshake protocol, it needs to verify the handshake protocol. If the device to be debugged fails to verify the handshake protocol once, that is, the single handshake is unsuccessful, a signal indicating the single handshake failure is returned through the programmable wireless transmission device. At this time, the client sends a communication start instruction to the programmable wireless transmission device again, so that the programmable wireless transmission device encrypts the second ciphertext carried by the received communication start instruction to obtain the handshake protocol, and sends it to the device to be debugged through the second interface for verification of the handshake protocol; if the verification fails three times in a row, it is determined that the device to be debugged is not the device previously registered by the client, and the connection of the second interface is disconnected.
[0069] After the device to be debugged passes the verification handshake protocol, it broadcasts the device's communication interface data, allowing the programmable wireless transmission device to receive the data. After receiving the data, the programmable wireless transmission device encrypts the data and sends it to the client. Upon receiving the encrypted data, the client decodes and decrypts it to obtain the data. The client then establishes a communication connection with the device to be debugged based on the data transmitted via the first and second interfaces, using the data transmitted via the communication interface data to achieve encrypted data transmission.
[0070] Furthermore, after the client establishes a communication connection with the device to be debugged, a debugging interface including the communication information of the device to be debugged is displayed on the client. After the user performs debugging operations on the debugging interface, the client sends the corresponding device debugging instructions to the programmable wireless transmission device; thereafter, the programmable wireless transmission device encrypts the device debugging instructions and sends them to the device to be debugged, and the device to be debugged decrypts the device debugging instructions and performs debugging based on the device debugging instructions.
[0071] Through the above steps, the client obtains the communication identification and device identification of the programmable wireless transmission device through the first interface and verifies them. After the verification is passed, the programmable wireless transmission device connects the first interface and the second interface, so that the client obtains the communication interface data of the device to be debugged through the fully closed communication data transmission channel formed by the first interface and the second interface; then the client realizes data transmission between the device to be debugged based on the communication interface data and the data transmission channel. The programmable wireless transmission device encrypts and encodes the multi-party transmission data, and there is no need to limit the debugging operation to a short distance. After the entire wireless data transmission device completes the handshake, data is transmitted through the data transmission channel formed by the first interface and the second interface, which can realize encrypted communication of multi-party data. A third party cannot obtain the plaintext data of the communication process, thereby improving the security and transmission efficiency of the wireless debugging operation.
[0072] After the client establishes a communication connection with the device to be debugged based on the communication interface data and the data transmission formed by connecting the first interface and the second interface, it needs to transmit the data packet to be transmitted and store the data packet to be stored.
[0073] In some embodiments, the method for transmitting a data packet to be transmitted further includes: receiving a data transmission instruction sent by a client through a first interface, and in response to the data transmission instruction, verifying a data transmission frame carried by the data transmission instruction to obtain a verification result; feeding back the verification result to the client through the first interface, and controlling and updating the baud rate of the first interface according to the data transmission frame; receiving a data packet to be transmitted sent by the client through the first interface, and verifying the data packet to be transmitted; if the data packet to be transmitted passes the verification, returning a data transmission completion frame to the client through the first interface, and controlling and restoring the baud rate of the first interface.
[0074] Among them, when the client needs to transmit the data packet to be transmitted to the programmable wireless transmission device, so that the device to be debugged can obtain the data packet to be transmitted through the programmable wireless transmission device and realize the device debugging and upgrading of the device to be transmitted, a data transmission instruction is first sent to the programmable wireless transmission device. The programmable wireless transmission device receives the data packet to be transmitted sent by the client through the first interface and verifies the data packet to be transmitted.
[0075] Before sending a data packet to be transmitted to the device to be debugged, to ensure the integrity of the data packet and the accuracy of the file attributes in the upgrade data packet, the client first sends data transmission instruction data, including a data transmission frame, to the programmable wireless transmission device. The programmable wireless transmission device verifies the frame header, specific instruction frame, and verification frame of the data transmission frame. If the verification is successful, the programmable wireless transmission device sends a verification result indicating the verification is successful to the client via the first interface. After receiving the verification result, the client begins transmitting the data packet to be transmitted and verifies the data packet to be transmitted.
[0076] At the same time, after the programmable wireless transmission device obtains a verification result indicating that the verification has passed, it determines whether the data transmitted by the client is packet data based on the data attributes corresponding to the data transmission frame; when the data transmitted by the client is determined to be packet data, it controls the update of the baud rate of the first interface; when it is determined that the data to be transmitted by the client is not packet data, it maintains the baud rate of the first interface. For example, when the above-mentioned data packet to be transmitted is a single piece of data to be transmitted, there is no need to update or restore the baud rate of the first interface. That is, all data packets to be transmitted that have been packaged by the client will use high-speed transmission with the updated baud rate of the first interface. For single pieces of data information, there is no need to update or restore the baud rate of the first interface, and normal transmission is directly used.
[0077] After the programmable wireless transmission device verifies that the data transmission frame has passed and updates the baud rate of the first interface of the client communication, it starts to receive the data packet to be transmitted sent by the client. When the client needs to transmit the data packet to be transmitted to the programmable wireless transmission device and the device to be debugged, since the transmission of the data packet to be transmitted is subject to the transmission speed and the maximum single transmission size allowed by the programmable wireless transmission device, it is necessary to split the data packet to be transmitted into multiple sub-transmission data packets and send them to the programmable wireless transmission device, and verify the multiple sub-transmission data packets.
[0078] Furthermore, the method for verifying the data packet to be transmitted includes: based on the first interface, receiving the data packet to be transmitted sent by the client, the data packet to be transmitted includes multiple sub-transmission data packets; based on the subpacket verification frames of the multiple sub-transmission data packets, according to a preset verification strategy, verifying the sub-transmission data packets in turn; when it is determined that the subpacket identifier corresponding to the subpacket number of the sub-transmission data packet is an end bit identifier, determining whether the subpacket number of the sub-transmission data packet is consistent with the number of subpackets in the data packet to be transmitted; if they are consistent, determining that the data packet to be transmitted has passed the integrity check.
[0079] Among them, the data frame corresponding to each sub-transmission data packet has a packet number. The programmable wireless transmission device calculates whether the reception is complete based on the total number of packets parsed from the attributes of the data packet to be transmitted and the packet number of the sub-transmission data packet with the sub-packet identifier as the end bit identifier.
[0080] Among them, the data frames of multiple sub-transmission data packets all carry check frames, and the multiple sub-transmission data packets are checked in turn based on the check frames and the sub-packet numbers of the sub-transmission data packets; for example, CRC check frames or hash checks, which are not specifically limited here. When the check frames in the multiple sub-transmission data packets are checked and passed, it is determined whether the sub-packet identifier corresponding to the sub-packet number of the sub-transmission data packet is the end bit identifier. When determining that the sub-packet number of the current sub-transmission data packet corresponds to the end bit identifier, it is determined whether the sub-packet number is consistent with the total number of sub-packets. If they are consistent, it means that the entire data packet to be transmitted has passed the integrity check. Afterwards, the programmable wireless transmission device returns the data transmission completion frame to the client through the first interface, and controls the baud rate of the restored first interface.
[0081] By sequentially verifying the sub-transmission data packets in the data packet to be transmitted, the integrity of the data packet to be stored is determined after the verification is completed, thereby improving the security of receiving the data packet to be stored.
[0082] In some embodiments, the method for transmitting a data packet to be stored includes: receiving a storage instruction sent by a client according to a first interface, and forwarding the storage instruction to the device to be debugged according to a second interface; controlling the baud rate of the first interface to be updated based on a storage function frame carried by the storage instruction; after the device to be debugged sends the data packet to be stored to the client based on the storage instruction, receiving the data packet to be stored sent by the client based on the first interface, and verifying the data packet to be stored; if the data packet to be transmitted passes the verification, storing the data packet to be stored, returning a data transmission completion frame to the client through the first interface, and controlling the baud rate of the first interface to be restored.
[0083] Among them, the method for verifying and saving the data packet to be stored can refer to the method for verifying the data packet to be transmitted in the previous embodiment, and will not be described in detail here.
[0084] Furthermore, in one specific embodiment, the method for controlling and updating the baud rate of the first interface includes: obtaining data attributes corresponding to the storage function frame and / or the data transmission frame; judging whether the data transmitted by the client is packet data based on the data attributes; when it is judged that the data transmitted by the client is packet data, controlling and updating the baud rate of the first interface; when it is judged that the data to be transmitted by the client is not packet data, maintaining the baud rate of the first interface.
[0085] Among them, when the client needs data to be stored, it is classified and transmitted according to the corresponding attributes of the data to be stored. For example, the data packets to be stored that have been packaged on the client side will use high-speed transmission, and ordinary transmission is directly used for single information, that is, there is no need to update the baud rate of the first interface.
[0086] The programmable wireless transmission device switches the receiving rate of the first interface according to the functional frame sent by the client, wherein the functional frame includes the storage functional frame; each data frame carries a packet number, and the transmission device calculates whether the reception is complete based on the total number of packets parsed according to the attributes of the data packet that the client needs to transmit or store. As long as it is data that needs to be stored, it will be packaged in advance on the client side, and according to the protocol before the packet transmission begins, it will be determined whether the data packet is an upgrade packet / log packet / other packet, etc., and encrypted and stored in the designated area using the specified encryption storage method; all data will be converted into data packets when they need to be stored, so during the data transmission process between the client and the programmable wireless transmission device, the baud rate of the first interface needs to be updated. Through the above steps, encryption and high-speed communication of client transmitted data are achieved, thereby improving the security and transmission efficiency of wireless upgrade operations.
[0087] In some embodiments, the wireless data transmission method further includes: when the data packet to be transmitted passes verification, according to the data transmission frame, storing the data packet to be transmitted in a storage sector corresponding to the data transmission frame in a preset simulation memory area; the operating properties of the simulation memory area are consistent with the operating properties of the preset non-volatile memory.
[0088] The data storage area is divided based on the packet attributes of the data packets to be transmitted or stored, resulting in multiple storage sectors corresponding to the packet attributes. Specifically, the data storage area in the simulated memory area can be divided into multiple storage sectors based on the data type of the data packets to be transmitted or stored, as well as the data capacity corresponding to different data types. Different storage sectors store data packets to be transmitted or stored with different packet attributes, thereby achieving orderly and efficient data storage.
[0089] Thereafter, the data packet to be transmitted or the data packet to be stored that has passed the integrity check is written into the storage sector corresponding to the packet attribute of the data packet to be transmitted or the data packet to be stored.
[0090] In some embodiments, the wireless data transmission method further includes: determining the storage sector where the debugging data required to be read by the device to be debugged is located in response to a data read request sent by the device to be debugged through the second interface; reading the debugging data from the storage sector and encrypting the read debugging data; and sending the encrypted debugging data to the device to be debugged through the second interface.
[0091] The data read request is generated based on the client's determination that the storage key in the key storage area is inconsistent with the client's last transmitted storage key, or when the programmable wireless transmission device is not connected to the client; the debug data in the storage sector is read, the debug data is symmetrically encrypted, and the symmetrically encrypted debug data is sent to the device to be debugged. If the client determines that the storage key in the key storage area is inconsistent with the client's last transmitted storage key, or when the programmable wireless transmission device is not connected to the client, after the device to be debugged sends the data read request, the programmable wireless transmission device determines the storage sector where the debug data to be read by the device to be debugged is located and sends the erroneous encrypted data to the device to be debugged; or it randomly sends the erroneous encrypted data to the device to be debugged to prevent the leakage of data in the storage sector of the programmable wireless transmission device.
[0092] In one specific embodiment, the simulated memory area also includes a key storage area. While obtaining the packet attributes corresponding to the transmission data frame / storage function frame of the data packet to be transmitted or the data packet to be stored, the storage key corresponding to the transmission data frame / storage function frame is obtained and written into the key storage area in the simulated memory area. The memory pointer of the simulated memory area is moved until the memory pointer points to the address of the storage sector corresponding to the data packet to be transmitted or the data packet to be stored, and a data transmission return frame or a data storage return frame is sent to the client to indicate that the client can start the encrypted transmission of the data packet to be stored. Based on the data transmission return frame or the data storage return frame, the client encrypts the data packet to be transmitted or the data packet to be stored according to the storage key and transmits and stores it.
[0093] By storing the storage key in the key storage area in the simulated memory area, the storage key can be prevented from being obtained by a third party; at the same time, based on whether the memory pointer of the simulated memory area points to the address of the storage sector corresponding to the data to be stored, it is determined whether to instruct the client to start encrypted transmission and storage of the data packet to be stored, which is conducive to further improving data security during data transmission and storage.
[0094] In some embodiments, the programmable wireless transmission device includes a register; the wireless data transmission method provided in the present application also includes: responding to a data read request of a device to be debugged that is communicatively connected to the programmable wireless transmission device, determining a data processing status of the register based on a chip select signal in the data read request; and determining whether to send data to the device to be debugged based on the data processing status.
[0095] During the data transmission process, when the client allows the programmable wireless transmission device to transmit data to the device to be debugged, the programmable wireless transmission device communicates with the device to be debugged via a serial peripheral interface (SPI) and a communication port configured on the programmable wireless transmission device. At this point, a register within the programmable wireless transmission device determines a chip select signal (i.e., a level signal) based on the data read request sent by the device to be debugged. The chip select signal then determines the corresponding data processing state of the register, thereby determining the data processing request of the device to be debugged. Exemplarily, the data processing state may include erase, write, and read processing states, which are not specifically limited herein.
[0096] The present embodiment is described and illustrated below through specific examples.
[0097] With the development of the elevator industry and the continued rise in home ownership, the installation, commissioning, and maintenance of elevator components have become a major priority. Elevator maintenance consumes significant manpower and time annually. Traditional wired commissioning methods can also present drawbacks such as poor hoistway conditions and insufficient commissioning distances. Wireless commissioning, on the other hand, can allow third parties to access or modify elevator control cabinet information via Bluetooth devices or mobile apps. Therefore, simplicity and safety are paramount when maintaining components.
[0098] This specific embodiment provides a method for replacing a traditional elevator debugger with a programmable Bluetooth device that supports storage expansion. The above-mentioned debugging encryption and transmission method takes the debugging of an elevator as an example, where the programmable wireless transmission device is a Bluetooth device, the client is a mobile phone, and the device to be debugged is an elevator control cabinet. A transmission mode combining the Bluetooth device, the mobile phone, and the elevator control cabinet is adopted. By classifying the debugging status of the elevator control cabinet by the mobile phone, and performing different encryption and transmission processing according to each debugging status, the security of the debugging process and the effect of wider coverage functions are achieved.
[0099] The elevator control cabinet is debugged by combining a mobile phone APP with a Bluetooth device to control the data transmission of the elevator control cabinet. To achieve the above-mentioned purpose of debugging the elevator control cabinet and then debugging the elevator, this embodiment combines the real-time processing of the CPU of the Bluetooth device. The Bluetooth device monitors and forwards the data of the mainboard communication interface of the elevator control cabinet to the mobile phone through the data transmission channel formed by the first interface and the second interface, and identifies whether the debugging instruction on the mobile phone is a control cabinet debugging instruction or a self-debugging instruction. After the identification, the corresponding processing is performed. If the Bluetooth device determines that the debugging instruction on the mobile phone is an elevator control cabinet debugging instruction, it will directly perform the corresponding encryption encoding and forward it to the control cabinet; if it is a self-debugging instruction, such as adjusting the transmission speed of the Bluetooth device, the maximum transmission data, etc., the Bluetooth device verifies that the debugging instruction is passed and performs the corresponding function.
[0100] Before this, when the mobile phone connects to the Bluetooth device, it searches for nearby Bluetooth devices and obtains the unique ID of the Bluetooth device. Here, the unique ID of the Bluetooth device is the communication identifier of the programmable wireless transmission device in the above embodiment. After the connection is successful, the unique product ID of the elevator control cabinet is obtained, which is the device identifier of the device to be debugged in the above embodiment. The client will then send the currently connected Bluetooth ID and product ID together to the cloud database for matching. If the two IDs are bound to the same Bluetooth device in the cloud data identification library, the verification will pass. If any of the above IDs fail to pass the verification, or if both IDs do not match, the Bluetooth device will directly disconnect from the mobile phone, and the Bluetooth device will not send any external commands, and the communication interface of the elevator control cabinet will not send any messages.
[0101] Figure 3 This is a flowchart of the Bluetooth device authentication and encryption communication method provided by this specific embodiment. Figure 3 As shown, this Bluetooth device verification and encrypted communication method for elevator controller debugging is based on connecting an integrated wireless communication and storage device to the elevator control cabinet, replacing traditional separate external storage devices and wired debuggers, and using a single CPU for control. The CPU processes, monitors, and forwards data from the mainboard communication interface to the mobile phone in real time. It also distinguishes between control cabinet debugging commands from the mobile phone and its own debugging commands, and processes them accordingly. If the command is a control cabinet debugging command, it is directly encrypted and forwarded to the control cabinet. If the command is a self-debugging command, it performs the corresponding function after verification.
[0102] The specific timing steps are as follows: When the mobile phone is connected to the Bluetooth device, the mobile phone will search for nearby Bluetooth devices and obtain the unique ID of the Bluetooth device. After the mobile phone and the Bluetooth device are successfully connected, the mobile phone sends the first ciphertext to the Bluetooth device to obtain the product identification. The first ciphertext is used to obtain the unique identity ID of the elevator control cabinet, that is, the product ID. If this Bluetooth device is a correct device that can communicate, connect and transmit, then the Bluetooth device will send the unique identity ID of the elevator control cabinet, that is, the product ID, to the mobile phone based on the first ciphertext. After the mobile phone obtains the unique identity ID of the elevator control cabinet, it will send it together with the unique ID of the currently connected Bluetooth device to the cloud database for dual ID verification. If the two IDs are found to be bound to one device in the cloud database, the dual ID verification will pass. When the mobile phone passes the dual ID verification, the mobile phone is connected to the first communication interface and the second communication interface of the Bluetooth device respectively. If any of the above ID verifications fails, or the two IDs do not match, the Bluetooth device will be disconnected directly, and the Bluetooth device will not send any instructions.
[0103] After the two IDs of the Bluetooth device are successfully verified in the cloud, the first and second communication interfaces of the Bluetooth device are connected, forming a data transmission channel. When the mobile phone needs to send a debugging command to the elevator control cabinet, it sends a PASS command frame and a command to enable elevator control cabinet communication to the Bluetooth device via the first communication interface. The Bluetooth device unlocks and receives the elevator control cabinet communication command. After encoding the elevator control cabinet communication command into a handshake protocol, it forwards it to the elevator control cabinet via the second communication interface. After receiving the handshake protocol, the elevator control cabinet verifies it. Once the handshake protocol is verified, the elevator control cabinet begins broadcasting the control cabinet communication interface data. The Bluetooth device then receives the elevator control cabinet communication interface data, encodes and encrypts it, and sends it to the mobile phone. The mobile phone obtains the elevator control cabinet communication interface data and, after successfully handshaking with the elevator control cabinet via the data transmission channel formed by the connection between the first and second communication interfaces, encrypts the communication content from the elevator control cabinet, including the control cabinet data, and forwards it to the mobile phone via the second communication interface of the Bluetooth device. The debugging content can then be displayed on the mobile phone app. The mobile phone then forwards the encrypted debugging command to the elevator control cabinet via the Bluetooth device to implement wireless debugging operations on the elevator control cabinet by the mobile phone. The first communication interface and the second communication interface here are the first interface and the second interface in the aforementioned embodiment.
[0104] Furthermore, this specific embodiment also provides an encryption and transmission method that is not limited to realizing debugging functions: under the working conditions of data transmission such as data packets, parameter packets, and logs, the encryption transmission method can enable the system to respond more quickly and obtain faster transmission speeds while ensuring the security and integrity of the transmitted packets.
[0105] Figure 4 This is a flowchart of the upgrade package transmission method provided in this specific embodiment, refer to Figure 4 Before the upgrade data packet is sent, in order to ensure the integrity of the upgrade data packet and the correctness of the relevant file attributes, the APP on the mobile phone needs to first send the upgrade data packet transmission frame to the Bluetooth device through the first communication interface. The Bluetooth device receives the upgrade data packet transmission frame and performs verification feedback based on the frame header, specific instruction frame and check frame included in the upgrade data packet transmission frame.
[0106] At the same time, since the transmission of the upgrade data packet is limited by the speed and the maximum single transmission size allowed by Bluetooth (MTU, Maximum Transmission Unit), the upgrade data packet needs to be sent in packets, and the transmission baud rate of the first communication interface between the mobile phone and the Bluetooth device needs to be changed based on actual needs.
[0107] Afterwards, the Bluetooth device increases the rate of the first communication interface to the highest speed without packet loss, and at this time will no longer forward the encrypted elevator control cabinet data, and only establishes a high-speed transmission channel with the mobile phone.
[0108] After the Bluetooth device passes the verification feedback, the mobile phone sends each data frame within the allowed MTU of each packet to the Bluetooth device via the first communication interface in the format of number + check code + encoded data + check code, and officially begins to transmit the upgrade data packet. That is, it sends the checksum of the entire upgrade data packet as well as the file name and file size to the Bluetooth device. The Bluetooth device is responsible for writing the file name corresponding to the upgrade data packet to the designated storage area of the memory, and calculating the total number of packets based on the file size corresponding to the upgrade data packet. After that, it sequentially performs operations such as recording the packet number, verification, decoding, and verification. Specifically, it verifies whether the upgrade data packet has been completely received based on the total number of upgrade data packets and the packet number of the last sub-upgrade packet.
[0109] After the Bluetooth device verifies the upgrade data packet and passes it, the data will be saved in the memory until the verification of the entire upgrade data packet is completed. At this time, the Bluetooth device returns a completion frame to the mobile phone and switches the baud rate of the first communication interface to the original baud rate. At this point, the upgrade data packet transmission process ends and the Bluetooth device automatically enters the control cabinet data forwarding mode.
[0110] Figure 5 This is a flow chart of the log storage method provided by this specific embodiment. Figure 5 When the relevant parameters and log data of the elevator control cabinet need to be stored, the mobile phone app directly sends a log acquisition instruction to the control cabinet through the first and second communication interfaces of the Bluetooth device. Based on this log acquisition instruction, the elevator control system returns various log parameter information to the mobile phone. The mobile phone then processes and integrates the log parameter information and packages the log information data to obtain a log data packet including multiple sub-log packets. The mobile phone app then sends a log transmission frame for storage to the Bluetooth device through the first communication interface of the Bluetooth device, so that the log data packet is stored in the storage area of the Bluetooth device.
[0111] Furthermore, after the Bluetooth device verifies that the log transmission frame has passed the feedback, the mobile phone sends the data frame of each sub-log packet MTU allowed in the format of number + check code + encoded data + check code to the Bluetooth device through the first communication interface to start the formal transmission of the log data packet, that is, sending the checksum of the entire log data packet as well as the file name and file size to the Bluetooth device. The Bluetooth device is responsible for writing the file name corresponding to the log data packet to the designated storage area of the memory, and calculating the total number of packets based on the file size corresponding to the log data packet. After that, the operations of recording the packet number, checking, decoding, and verifying are carried out in sequence. Specifically, the total number of packets in the log data packet and the packet number of the last sub-log packet are used to verify whether the log data packet has been received completely.
[0112] After the Bluetooth device verifies that the log data packet has passed, the data will be saved in the memory until the verification of the entire log data packet is completed. At this time, the Bluetooth device returns a completion frame to the mobile phone and switches the baud rate of the first communication interface to the original baud rate. At this point, the log data packet transmission process ends, and the log data packet is stored in the storage area corresponding to the Bluetooth device.
[0113] Furthermore, the storage areas of the log data packet and the upgrade data packet in the Bluetooth device are different, that is, data packets of different data types have different storage areas in the Bluetooth device.
[0114] In the above-mentioned communication transmission method, each piece of information broadcast by the elevator control cabinet is encrypted in real time, different transmission processing is established for different transmission data types, and debugging instructions, file information, data packets, logs, etc. are differentially encrypted and transmitted, so as to enable the CPU to process various different information in real time; for the forwarded encrypted information including elevator control cabinet and mobile phone data, third-party APP or Bluetooth device cannot capture it, and the communication link is completely blocked, making the processing of data packets more secure and the storage level clear.
[0115] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0116] In addition, in conjunction with the wireless data transmission method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program that, when executed by a processor, implements any of the wireless data transmission methods in the above embodiments.
[0117] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0118] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.
[0119] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.
[0120] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A wireless data transmission method, characterized in that: The method is applied to a programmable wireless transmission device; the programmable wireless transmission device includes a first interface and a second interface; the method includes: After the client obtains the communication identifier of the programmable wireless transmission device through the first interface, in response to a connection request received from the client, obtains a first ciphertext carried in the connection request, and sends the device identifier of the programmable wireless transmission device to the client according to the first ciphertext; After the client verifies the communication identifier and the device identifier, the client is successfully connected, and the first interface and the second interface are connected to form a data transmission channel; Receiving a communication start instruction sent by the client through the first interface, encrypting and encoding a second ciphertext carried by the received communication start instruction to obtain a handshake protocol, and sending the handshake protocol to the device to be debugged; When the device to be debugged passes the handshake protocol verification, the communication interface data broadcast by the device to be debugged is received through the second interface, the received communication interface data is encoded and encrypted, and the encoded and encrypted communication interface data is sent to the client, so that the client and the device to be debugged perform data encryption transmission based on the communication interface data and the data transmission channel.
2. The wireless data transmission method according to claim 1, wherein: The wireless data transmission method further includes: receiving, through the first interface, a data transmission instruction sent by the client, and in response to the data transmission instruction, verifying a data transmission frame carried by the data transmission instruction to obtain a verification result; Feedback the verification result to the client via the first interface, and update the baud rate of the first interface according to the data transmission frame control; receiving, via the first interface, a data packet to be transmitted sent by the client, and verifying the data packet to be transmitted; When the data packet to be transmitted passes the verification, a data transmission completion frame is returned to the client via the first interface, and the baud rate of the first interface is controlled and restored.
3. The wireless data transmission method according to claim 2, wherein: The receiving, through the first interface, a data packet to be transmitted sent by the client, and verifying the data packet to be transmitted includes: Based on the first interface, receiving a data packet to be transmitted sent by the client, where the data packet to be transmitted includes multiple sub-transmission data packets; Based on the packet verification frames of the plurality of sub-transmission data packets, the sub-transmission data packets are verified in sequence according to a preset verification strategy; If it is determined that the subpacket identifier corresponding to the subpacket number of the sub-transmission data packet is an end bit identifier, determining whether the subpacket number of the sub-transmission data packet is consistent with the number of subpackets in the data packet to be transmitted; If the judgment is consistent, it is determined that the data packet to be transmitted passes the integrity check.
4. The wireless data transmission method according to claim 2, wherein: The method further comprises: receiving a storage instruction sent by the client through the first interface, and forwarding the storage instruction to the device to be debugged through the second interface; Controlling and updating the baud rate of the first interface based on the storage function frame carried by the storage instruction; After the device to be debugged sends the data packet to be stored to the client based on the storage instruction, receiving the data packet to be stored sent by the client based on the first interface, and verifying the data packet to be stored; When the data packet to be transmitted passes the verification, the data packet to be stored is stored, and a data transmission completion frame is returned to the client through the first interface, and the baud rate of the first interface is controlled and restored.
5. The wireless data transmission method according to claim 2 or claim 4, wherein: The controlling and updating the baud rate of the first interface includes: Acquiring data attributes corresponding to the storage function frame and / or the data transmission frame; Determining whether the data transmitted by the client is packet data based on the data attribute; When it is determined that the data transmitted by the client is packet data, controlling and updating the baud rate of the first interface; When it is determined that the data to be transmitted by the client is not packet data, the baud rate of the first interface is maintained.
6. The wireless data transmission method according to claim 3, wherein: The method further comprises: When the data packet to be transmitted passes the verification, according to the data transmission frame, the data packet to be transmitted is stored in a storage sector corresponding to the data transmission frame in a preset simulation memory area; The operational attributes of the simulated memory area are consistent with the operational attributes of the preset non-volatile memory.
7. The wireless data transmission method according to claim 2 or claim 4, wherein: The client is connected to the cloud; after the device identification of the programmable wireless transmission device is sent to the client according to the first ciphertext, the method further includes: Receiving, according to the first interface, a verification result sent by the client; the verification result includes a result obtained by verifying the communication identifier and the device identifier according to the data identifier library in the cloud; the communication identifier and the device identifier are received by the client and forwarded to the cloud; If the verification result indicates that the communication identifier and the device identifier fail verification, disconnect the first interface.
8. The wireless data transmission method according to claim 6, wherein: The method further comprises: In response to a data read request sent by the device to be debugged through the second interface, determining a storage sector where debugging data required to be read by the device to be debugged is located; Reading the debugging data of the storage sector, and encrypting the read debugging data; The encrypted debugging data is sent to the device to be debugged through the second interface.
9. A programmable wireless transmission device, characterized in that: The programmable wireless transmission device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform the wireless data transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the wireless data transmission method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Internet of Things module test method, intermediate device, terminal device and test system
CN110784379A
Method and system for remotely debugging smart home equipment and storage medium
CN112153144A
Internet of Things complete machine equipment debugging method and device, computer equipment and storage medium
CN113132961A
Virtual debugging communication method and device, equipment and storage medium
CN118740899A
Debugging method, electronic equipment and computer readable storage medium
CN119743274A