Data interaction method and system of radio frequency transceiver
Through protocol type hash recognition and unified frame structure, the complexity of hardware resource occupation and handover of RF transceivers in multi-protocol environments is solved, and stable and flexible data interaction and energy efficiency improvement are achieved.
Patent Information
- Application Number
- CN202510821776.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-19
AI Technical Summary
When existing RF transceivers support multiple communication protocols, their hardware resource occupancy is high and their protocol switching is complex, and they cannot efficiently support multi-protocol converged communication, resulting in resource-constrained terminal timing conflicts and energy waste.
The protocol type hash recognition mechanism is adopted to identify protocol types through hash functions, build a unified frame structure and perform security verification to realize cross-protocol parsing and uploading.
Improves the compatibility and parsing efficiency of RF transceivers, reduces power consumption, and realizes stable and flexible data interaction under multi-protocol hybrid deployment.
Smart Images

Figure CN120358291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things data interaction, and in particular to a data interaction method and system for a radio frequency transceiver. Background Art
[0002] Currently, low-power Internet of Things terminals are widely used in scenarios such as environmental monitoring, smart agriculture, and intelligent security. They usually need to support multiple communication protocols such as LoRa, ZigBee, and BLE to meet diverse communication requirements such as long-distance transmission, local networking, and short-distance interaction. However, there are significant differences in the physical layer modulation methods, frame structures, and security mechanisms of different protocols, resulting in the fact that existing radio frequency transceivers usually adopt the methods of "single-protocol dedicated" or "multi-protocol parallel independent processing", with high hardware resource occupancy, complex protocol switching, and inconsistent data structures, and are unable to efficiently support multi-protocol fusion communication. For example, in the prior art, the preamble, MHDR, and MIC fields in the LoRa frame structure cannot directly adapt to the field semantics of ZigBee or BLE, and the upper-layer application needs to process the data of each protocol separately, increasing the parsing complexity and communication power consumption. In resource-constrained terminals, frequent protocol switching will also cause timing conflicts and energy waste, and the prior art cannot fully meet the fusion communication requirements of coexistence of multi-protocol dynamic perception, parsing consistency, and energy consumption constraints. Therefore, there is an urgent need for a radio frequency transceiver data interaction method that can still achieve structured parsing, security verification, and unified upload of data frames of multiple communication protocols under the conditions of limited terminal resources and power sensitivity, so as to improve the compatibility, parsing efficiency, and operating energy efficiency of the system. Summary of the Invention
[0003] Aiming at the above-mentioned existing technical deficiencies, the purpose of the present invention is to propose a data interaction method for a radio frequency transceiver, aiming to solve the technical problem that it is difficult to achieve stable and flexible data interaction in the prior art for single-protocol customization or lack of unified parsing and control mechanisms, especially in the scenario of Internet of Things terminals that need to support multi-protocol hybrid deployment such as LoRa, ZigBee, and BLE.
[0004] To solve the above technical problems, the present invention adopts the following technical solutions: The present invention provides a data interaction method for a radio frequency transceiver.
[0005] The data interaction method for the radio frequency transceiver includes:
[0006] Step S10: After receiving a wireless data frame on the receiving path of the radio frequency transceiver terminal, extract the preamble bit sequence B[0:k] of the first k bits for protocol identification in the wireless data frame, and calculate the protocol candidate index value according to the preamble bit sequence B[0:k] using a pre-set hash function H(·) , according to the protocol candidate index value Look for a match in the pre-set protocol mapping table and output the protocol type P;
[0007] Step S20: Load the field parsing finite state machine corresponding to the protocol according to the protocol type P , and generate a field linked list , according to the field linked list Sequentially extract protocol fields and construct a protocol raw field vector ;
[0008] Step S30: Through the pre-set mapping function Map the protocol raw field vector to a unified abstract frame structure to obtain a protocol-independent unified data frame object ;
[0009] Step S40: Perform protocol security verification based on the protocol type P on the unified data frame object ;
[0010] Step S50: After the protocol security verification passes, perform interactive adaptation control and frame submission control to obtain cross-protocol parsing data, and adaptively upload the cross-protocol parsing data to the corresponding service layer.
[0011] Preferably, in step S10, the pre-set hash function H(·) includes CRC-16, BKDR Hash, JenkinsHash or FNV-1a function, which is used to adapt to the real-time protocol recognition requirements of low-power embedded devices; the output protocol type P ∈{LoRa, ZigBee, BLE}, where LoRa is a long-distance low-rate communication protocol based on spread-spectrum modulation, ZigBee is a low-power short-distance communication protocol supporting networking and confirmation mechanism, and BLE is a short-range Bluetooth communication protocol.
[0012] Preferably, in step S20, the formula expression of the field linked list is: , where is the th valid field in the protocol type P, including AdvA of the BLE protocol, SrcAddr of the ZigBee protocol, and DevAddr of the LoRa protocol, is the total number of valid fields in the protocol type P; the field parsing finite state machine is used to support the state jump of optional fields, variable-length fields and nested fields in the protocol type P; the protocol raw field vector includes an address field vector, a frame control field vector, a payload field vector, a frame checksum field vector and a special field vector.
[0013] Preferably, in step S30, the unified data frame object is expressed by the formula: , where is the length of the unified data frame object; is the standard field in the unified frame, including the source node address, frame type field, payload field, and security check field; the mapping function is used to perform field renaming, zero-padding, and word length alignment operations.
[0014] Preferably, in step S40, based on the protocol type P, the steps of performing protocol security verification on the unified data frame object are specifically as follows:
[0015] The unified data frame object is expressed by the formula: , where is the length of the unified data frame object; is the standard field in the unified frame, including the source node address, frame type field, payload field, and security check field;
[0016] Call the security verification function Verify P ( ) corresponding to the protocol type P according to the security check field in the unified data frame object to calculate the security verification result flag , ;
[0017] When the security verification result flag = 1, it is determined that the protocol security verification passes, otherwise it is determined that it fails.
[0018] Preferably, in step S50, after the protocol security verification passes, the steps of performing interaction adaptation control and frame submission control to obtain cross-protocol parsed data are specifically as follows:
[0019] According to the protocol type , call the behavior adaptation function to generate the processing action identifier of the current data frame, , where is used to represent , execute the ACK frame response, and set the retransmission window; is used to represent , based on the connection status maintenance, buffer the data into the GATT queue and wait for the service layer to pull; is used to represent skip the feedback process and schedule to enter the sleep state;
[0020] When generating the processing action identifier After that, calculate the protocol switching cost function and determine whether to perform cross - protocol forwarding processing according to the protocol switching cost function ; where where is the energy consumed when switching from protocol to protocol ; is the time consumed when switching from protocol to protocol ; is the delay weight factor of the switching process when switching from protocol to protocol ;
[0021] Preset cost threshold , if , then enter the protocol forwarding buffer queue, suspend forwarding, and wait for the scheduling window to be re - allocated, otherwise immediately perform cross - protocol forwarding processing to obtain cross - protocol parsing data
[0022] Preferably, in step S50, the step of adaptively uploading the cross - protocol parsing data to the corresponding service layer specifically includes:
[0023] Obtain the protocol type P from the cross - protocol parsing data; if is LoRa, upload the cross - protocol parsing data to the remote MQTT / HTTP gateway; if is ZigBee, forward the cross - protocol parsing data to the coordinator; if is BLE, send out BLE attribute notifications to the mobile terminal through the preset GATT service
[0024] After uploading, receive the return execution feedback content, and decide whether to clear the buffer or start the protocol reset according to the feedback content
[0025] The present invention also provides a data interaction system for a radio frequency transceiver, including:
[0026] A protocol recognition module, which is used to extract the preamble bit sequence B[0:k] of the first k bits for protocol recognition in the wireless data frame after the receiving path of the radio frequency transceiver terminal receives the wireless data frame, calculate the protocol candidate index value according to the preamble bit sequence B[0:k] by using the preset hash function H(·), and look up the matching item in the preset protocol mapping table according to the protocol candidate index value to output the protocol type P
[0027] A field parsing module, which is used to load the field parsing finite state machine corresponding to the protocol according to the protocol type P and generate a field linked list , extract protocol fields sequentially according to the field linked list and construct a protocol raw field vector ;
[0028] A field mapping module, which is used to map the protocol raw field vector to a unified abstract frame structure through a preset mapping function to obtain a protocol-independent unified data frame object ;
[0029] A protocol verification module, which is used to perform protocol security verification based on the protocol type P on the unified data frame object ;
[0030] An interaction and submission module, which is used to perform interaction adaptation control and frame submission control after the protocol security verification is passed, obtain cross-protocol parsing data, and adaptively upload the cross-protocol parsing data to the corresponding service layer.
[0031] The present invention also provides a data interaction device for a radio frequency transceiver, including: a memory, a processor, and a data interaction program for the radio frequency transceiver stored on the memory and executable on the processor. When the data interaction program for the radio frequency transceiver is executed by the processor, the data interaction method for the radio frequency transceiver is implemented.
[0032] The present invention also provides a computer program product, including a data interaction program for a radio frequency transceiver. When the data interaction program for the radio frequency transceiver is executed by a processor, the data interaction method for the radio frequency transceiver is implemented.
[0033] The beneficial effect of the present invention is that: compared with the prior art that is customized for a single protocol or lacks a unified parsing and control mechanism, especially in the scenario of Internet of Things terminals that need to support mixed deployment of multiple protocols such as LoRa, ZigBee, and BLE, it is difficult to achieve stable and flexible data interaction. Due to the introduction of a protocol type hash recognition mechanism, unified frame structure semantic mapping, and protocol behavior adaptive scheduling control in the present invention, the compatibility of radio frequency transceivers is improved. Description of the Drawings
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0035] Figure 1 It is a schematic flowchart of a data interaction method for a radio frequency transceiver according to the present invention.
[0036] Figure 2 This is a schematic structural diagram of a data interaction device for a radio frequency transceiver according to the present invention. Specific embodiments
[0037] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0038] Embodiment 1: As Figure 1 shown, this is a schematic flowchart of the data interaction method of the radio frequency transceiver of the present invention, and Embodiment 1 of the data interaction method of the radio frequency transceiver of the present invention is proposed.
[0039] In Embodiment 1, the data interaction method of the radio frequency transceiver includes:
[0040] Step S10: After receiving a wireless data frame on the receiving path of the radio frequency transceiver terminal, extract the preamble bit sequence B[0:k] of the first k bits for protocol identification in the wireless data frame, and calculate the protocol candidate index value according to the preamble bit sequence B[0:k] using a preset hash function H(·) , and according to the protocol candidate index value search for a matching item in a preset protocol mapping table and output the protocol type P;
[0041] It should be noted that in Step S10, the preset hash function H(·) includes CRC-16, BKDR Hash, Jenkins Hash, or FNV-1a function, which is used to adapt to the real-time protocol identification requirements of low-power embedded devices; the output protocol type P ∈ {LoRa, ZigBee, BLE}, where LoRa is a long-distance low-rate communication protocol based on spread-spectrum modulation, ZigBee is a low-power short-distance communication protocol that supports networking and confirmation mechanisms, and BLE is a short-range Bluetooth communication protocol.
[0042] It can be understood that the hash function identification mechanism effectively avoids the parsing delay caused by serially decoding the headers of each protocol through compression calculation and index matching, improves the recognition speed and resource utilization efficiency of the terminal for multiple wireless protocol frames, and is suitable for Internet of Things scenarios that require quickly judging the protocol type and switching the working mode.
[0043] It should be understood that although the protocol set in this embodiment is {LoRa, ZigBee, BLE}, the protocol recognition mechanism is not limited to these three types of protocols, and can also be extended to other low-power communication protocols with distinguishable frame header features, such as NB-IoT, Thread or UWB protocols. It only needs to add the corresponding hash features to the protocol mapping table.
[0044] For example, in a type of remote environmental monitoring terminal, the device defaultly reports sensing data periodically through the LoRa protocol. When the on-site maintenance personnel approach with a BLE controller, the device can identify the BLE broadcast frame in milliseconds and switch the communication mode, automatically entering the local configuration channel, thus realizing seamless switching between remote reporting and near-field maintenance, and significantly improving the system intelligence and user operation experience.
[0045] Step S20: Load the field parsing finite state machine corresponding to the protocol according to the protocol type P , and generate a field linked list , according to the field linked list sequentially extract protocol fields, and construct a protocol original field vector ;
[0046] It should be noted that in step S20, the formula expression of the field linked list is: , where is the th valid field in the protocol type P, including AdvA of the BLE protocol, SrcAddr of the ZigBee protocol, and DevAddr of the LoRa protocol, is the total number of valid fields in the protocol type P; the field parsing finite state machine is used to support the state jump of optional fields, variable-length fields, and nested fields in the protocol type P; the protocol original field vector includes an address field vector, a frame control field vector, a payload field vector, a frame checksum field vector, and a special field vector.
[0047] It can be understood that this field extraction mechanism based on the finite state machine can effectively accommodate the problems of variable field lengths, different field orders, and inconsistent field types existing in different communication protocols, thereby improving the flexibility and generality of the data decoding process, and reducing the coupling degree of the parsing code and the complexity during protocol switching.
[0048] It should be understood that the construction method of the state linked list FSM(P) is applicable not only to protocols with fixed or semi-fixed frame structures such as BLE, ZigBee, and LoRa, but also to subsequent protocols that support extended fields or optional parameter structures, such as NB-IoT, Wi-SUN, or Thread protocols. It can be adapted only by extending the state transition description.
[0049] For example, in an intelligent traffic monitoring device, the terminal defaults to uploading road condition data in the long term through the LoRa protocol. When it enters a high-density urban area, it automatically identifies and switches to the ZigBee network structure. Under the control of FSM(P), it quickly extracts the SrcAddr and MAC Payload fields, completes the scene-adaptive communication switch, and ensures the correct parsing and reporting of protocol fields.
[0050] Step S30: Through a preset mapping function Map the protocol raw field vector To a unified abstract frame structure to obtain a protocol-independent unified data frame object ;
[0051] It should be noted that in step S30, the formula expression of the unified data frame object Is: , where Is the length of the unified data frame object; Is the standard field in the unified frame, including the source node address, frame type field, payload field, and security check field; the mapping function Is used to perform field renaming, zero-padding, and word length alignment operations.
[0052] It can be understood that the mapping function In the process of implementing the protocol field vector format conversion, through field semantic alignment, bit width unification, and naming standardization operations, it significantly improves the processing consistency of different protocol frame structures within the same terminal, and avoids logical branches and redundant parsing codes caused by field structure differences in upper-layer service processing.
[0053] It should be understood that the abstract structure of the unified data frame object Is not only applicable to common protocols such as LoRa, ZigBee, and BLE, but its field set has good generality and can be extended to wireless protocols with similar frame semantic structures including UWB, NB-IoT, etc., thus improving the maintainability and protocol extension ability.
[0054] For example, in an intelligent electricity meter terminal, if the device needs to support both local networking based on ZigBee and remote upload communication based on LoRa at the same time, this method can use the mapping function Unify the SrcAddr in ZigBee and the DevAddr in LoRa into a unified frame field, so that the upper-layer metering system only needs to process standardized fields without being aware of the differences in underlying communication protocols, improving the integration efficiency and protocol decoupling ability.
[0055] Step S40: Perform protocol security verification based on the protocol type P on the unified data frame object ;
[0056] It should be noted that in step S40, the step of performing protocol security verification based on the protocol type P on the unified data frame object specifically includes: The formula expression of the unified data frame object is: , where is the length of the unified data frame object; is the standard field in the unified frame, including the source node address, frame type field, payload field, and security check field; Call the security verification function Verify P ( ) corresponding to the protocol type P according to the security check field in the unified data frame object ) to calculate the security verification result flag , ; When the security verification result flag = 1, it is determined that the protocol security verification passes, otherwise it is determined to fail.
[0057] It can be understood that in this solution, by mapping the multi-protocol security fields to the standard positions of the unified frame structure, the security verification function can process the data frames of different protocols in a consistent input format, avoiding the cumbersome processes of separately setting security check entrances, parsing paths, and field offsets for each protocol in the traditional technology. Especially in low-power terminals with limited resources and the need to dynamically switch protocols, this unified verification mechanism can significantly reduce code redundancy, the number of instruction cache switches, and operating power consumption, thereby improving the system response speed and stability after protocol switching.
[0058] It should be understood that although this embodiment takes three mainstream protocols, LoRa (MIC), ZigBee (FCS), and BLE (CRC), as examples, this unified frame structure and abstract verification mechanism can be applied to other communication protocols that support end check bits or embedded authentication mechanisms, such as Thread, NB-IoT, UWB, etc., and has good adaptability and scalability.
[0059] For example, in a type of intelligent meter reading terminal, the device uses the LoRa protocol to upload electricity consumption data during daily operation, but switches to the BLE connection mode for local configuration when maintenance personnel approach. Through the unified security verification mechanism described in the present invention, the same verification module can be reused during the protocol switching process to verify the consistency of different protocol data, without the need to dynamically switch the decoding logic or load different protocol drivers, thus achieving the goal of "unified security policy + fast switching + energy-saving operation".
[0060] Step S50: After the protocol security verification passes, perform interactive adaptation control and frame submission control to obtain cross-protocol parsing data, and adaptively upload the cross-protocol parsing data to the corresponding service layer.
[0061] It should be noted that in step S50, after the protocol security verification passes, the steps of performing interactive adaptation control and frame submission control to obtain cross-protocol parsing data specifically include: according to the protocol type , call the behavior adaptation function to generate the processing action identifier of the current data frame , , where is used to represent , execute the ACK frame response and set the retransmission window; is used to represent , based on the connection status maintenance, buffer the data into the GATT queue and wait for the service layer to pull it; is used to represent skip the feedback process and schedule to enter the sleep state; after generating the processing action identifier of the current data frame , calculate the protocol switching cost function , and judge whether to perform cross-protocol forwarding processing according to the protocol switching cost function ; where , where is the protocol to switch to protocol the energy consumed, is the protocol to switch to protocol the time consumed, is the protocol to switch to protocol the delay weight factor of the switching process; a preset cost threshold , if , then enter the protocol forwarding buffer queue, pause forwarding, and wait for the scheduling window to be reallocated, otherwise immediately perform cross-protocol forwarding processing to obtain cross-protocol parsing data. In step S50, the steps of adaptively uploading the cross-protocol parsing data to the corresponding service layer specifically include: obtaining the protocol type P from the cross-protocol parsing data; if LoRa uploads cross - protocol parsed data to a remote MQTT / HTTP gateway; if ZigBee forwards cross - protocol parsed data to a coordinator; if BLE sends BLE attribute notifications to a mobile terminal through a preset GATT service; after uploading, it will receive the execution feedback content and decide whether to clear the buffer or start a protocol reset according to the feedback content.
[0062] It can be understood that by introducing a protocol behavior abstraction function and a cost function evaluation mechanism, this solution establishes a "demand - driven dynamic routing" mechanism between protocol switching and data reporting, effectively avoiding the power consumption waste and communication conflict problems caused by hard - switching protocol paths and indiscriminate forwarding in traditional systems. Especially in the scenario where low - power IoT devices need to frequently switch between BLE local configuration and LoRa remote reporting, it can dynamically decide "whether to switch immediately" and "whether to delay caching", thus greatly improving the system operation efficiency and power consumption adaptability.
[0063] For example, in the scenario of intelligent manhole cover monitoring, the terminal defaults to using LoRa for periodic remote data reporting; when maintenance personnel connect to the terminal through mobile phone BLE on - site for maintenance, the system immediately switches to the BLE connection state through fast protocol recognition and adaptation, and buffers the maintenance instructions into the GATT channel, and then resumes the LoRa state after confirmation of success. By judging whether to immediately switch from BLE to LoRa through a cost function, the system intelligently selects "upload later" or "forward immediately", thus realizing an intelligent interaction process that crosses protocols, is secure, and saves energy.
[0064] Embodiment 2: In addition, a data interaction system of a radio frequency transceiver provided by the present invention adopts the data interaction method of a radio frequency transceiver in the above - mentioned embodiment, and can solve the technical problem of data interaction of a radio frequency transceiver. Compared with the prior art, the beneficial effects of the data interaction system of a radio frequency transceiver provided by the present invention are the same as those of the data interaction method of a radio frequency transceiver provided by the above - mentioned embodiment, and other technical features in the data interaction system of a radio frequency transceiver are the same as the features disclosed in the above - mentioned embodiment method, and will not be elaborated here.
[0065] Embodiment 3: The present invention provides a data interaction device of a radio frequency transceiver, please refer to Figure 2, a data interaction device for a radio frequency transceiver includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute a data interaction method for a radio frequency transceiver in Embodiment 1 above. A data interaction device for a radio frequency transceiver in an embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. A data interaction device for a radio frequency transceiver is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention. A data interaction device for a radio frequency transceiver may include a processor 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of a data interaction device for a radio frequency transceiver are also stored. The processor 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow a data interaction device for a radio frequency transceiver to communicate with other devices wirelessly or wiredly to exchange data. Although a data interaction device for a radio frequency transceiver with various systems is shown in the figure, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.
[0066] Embodiment 4: The present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of a data interaction method of a radio frequency transceiver as described above. The computer program product provided by the present invention can solve the technical problem of data interaction of a radio frequency transceiver. Compared with the prior art, the beneficial effects of the computer program product provided by the present invention are the same as those of the data interaction method of a radio frequency transceiver provided in the above embodiment, and will not be elaborated herein.
[0067] Specifically, according to the embodiments disclosed by the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment disclosed by the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processor 1001, it executes the above functions defined in the methods of the embodiments disclosed by the present invention.
[0068] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0069] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A data interaction method for a radio frequency transceiver, characterized in that, The method includes: Step S10: After the radio frequency transceiver terminal receives a wireless data frame on the receiving path, extract the preamble bit sequence B[0:k] of the first k bits for protocol identification in the wireless data frame, and calculate the protocol candidate index value according to the preamble bit sequence B[0:k] using a preset hash function H(·) , according to the protocol candidate index value search for a matching item in a preset protocol mapping table, and output the protocol type P; Step S20: Load the field parsing finite state machine corresponding to the protocol according to the protocol type P , and generate a field linked list , according to the field linked list sequentially extract protocol fields, and construct a protocol raw field vector ; Step S30: Through a preset mapping function map the protocol original field vector to a unified abstract frame structure to obtain a protocol-independent unified data frame object ; Step S40: Perform protocol security verification based on the protocol type P on the unified data frame object ; Step S50: After the protocol security verification passes, perform interactive adaptation control and frame submission control to obtain cross-protocol parsing data, and adaptively upload the cross-protocol parsing data to the corresponding service layer.
2. The data interaction method of a radio frequency transceiver according to claim 1, wherein In step S10, the preset hash function H(·) includes CRC-16, BKDR Hash, Jenkins Hash, or FNV-1a function, which is used to adapt to the real-time protocol recognition requirements of low-power embedded devices; the output protocol type P ∈ {LoRa, ZigBee, BLE}, where LoRa is a long-distance and low-rate communication protocol based on spread-spectrum modulation, ZigBee is a low-power short-distance communication protocol that supports networking and confirmation mechanisms, and BLE is a short-range Bluetooth communication protocol.
3. The data interaction method of a radio frequency transceiver according to claim 1, characterized in that, In step S20, the field linked list is expressed by the formula: , where is the th valid field in protocol type P, including AdvA of BLE protocol, SrcAddr of ZigBee protocol, and DevAddr of LoRa protocol, is the total number of valid fields in protocol type P; the field parsing finite state machine is used to support the state transition of optional fields, variable-length fields, and nested fields in protocol type P; the protocol raw field vector includes an address field vector, a frame control field vector, a payload field vector, a frame checksum field vector, and a special field vector.
4. The data interaction method of a radio frequency transceiver according to claim 1, characterized in that In step S30, the unified data frame object is expressed by the formula: , where is the length of the unified data frame object; are the standard fields in the unified frame, including the source node address, frame type field, payload field, and security check field; the mapping function is used to perform field renaming, zero-padding, and word length alignment operations.
5. The data interaction method of a radio frequency transceiver according to claim 1, characterized in that, In step S40, perform the protocol security verification step based on the protocol type P in the unified data frame object , which specifically includes: Unified data frame object The formula expression is as follows: , where is the length of the unified data frame object; is the standard field in the unified frame, including the source node address, frame type field, payload field, and security check field; Call the security verification function Verify P corresponding to the protocol type P according to the security verification field in the unified data frame object ( ) to calculate the security verification result flag , ; When the security verification result flag = 1, it is determined that the protocol security verification passes; otherwise, it is determined that the verification fails.
6. The data interaction method of a radio frequency transceiver according to claim 1, characterized in that In step S50, the steps of performing interactive adaptation control and frame submission control to obtain cross-protocol parsing data after the protocol security verification passes specifically include: According to the protocol type , call the behavior adaptation function to generate the processing action identifier of the current data frame , , where is used to indicate , execute the ACK frame response and set the retransmission window; is used to indicate , based on the connection status maintenance, buffer the data into the GATT queue and wait for the service layer to pull it; is used to indicate skip the feedback process and schedule to enter the sleep state After generating the processing action identifier of the current data frame calculate the protocol switching cost function and determine whether to perform cross - protocol forwarding processing according to the protocol switching cost function ; where where is the energy consumed when switching from protocol to protocol is the time consumed when switching from protocol to protocol is the delay weight factor of the switching process when switching from protocol to protocol Preset cost threshold If , it enters the protocol forwarding buffer queue, pauses forwarding, and waits for the scheduling window to reallocate. Otherwise, it immediately performs cross-protocol forwarding processing to obtain cross-protocol parsing data.
7. The data interaction method of a radio frequency transceiver according to claim 1, characterized in that, In step S50, the steps of adaptively uploading the cross-protocol parsing data to the corresponding service layer specifically include: Obtain the protocol type P from the cross-protocol parsed data; if LoRa, upload the cross-protocol parsed data to the remote MQTT / HTTP gateway; if ZigBee, forward the cross-protocol parsed data to the coordinator; if BLE, send out BLE attribute notifications to the mobile terminal through the preset GATT service; After uploading, receive the returned execution feedback content, and decide whether to clear the buffer or start a protocol reset according to the feedback content.
8. A data interaction system for a radio frequency transceiver, applied to the data interaction method of a radio frequency transceiver according to any one of claims 1-7, characterized in that, The data interaction system of the radio frequency transceiver includes: A protocol recognition module, which is configured to, after a wireless data frame is received by a receiving path of a radio frequency transceiver terminal, extract a preamble bit sequence B[0:k] of the first k bits for protocol recognition in the wireless data frame, and calculate a protocol candidate index value according to the preamble bit sequence B[0:k] by using a preset hash function H(·). , according to the protocol candidate index value search for a matching item in a preset protocol mapping table, and output a protocol type P; A field parsing module, which is used to load a field parsing finite state machine corresponding to a protocol according to a protocol type P , and generate a field linked list , extract protocol fields sequentially according to the field linked list , and construct a protocol raw field vector ; A field mapping module, which is used to map the original protocol field vector to a unified abstract frame structure to obtain a protocol-independent unified data frame object ; A protocol verification module, which is used to perform protocol security verification based on the protocol type P on the unified data frame object ; An interaction and submission module, which is used to perform interactive adaptation control and frame submission control to obtain cross-protocol parsing data after the protocol security verification passes, and adaptively upload the cross-protocol parsing data to the corresponding service layer.
9. A data interaction device for a radio frequency transceiver, characterized in that, The data interaction device of the radio frequency transceiver includes: a memory, a processor, and a data interaction program of the radio frequency transceiver stored on the memory and executable on the processor. When the data interaction program of the radio frequency transceiver is executed by the processor, it implements a data interaction method of a radio frequency transceiver according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a data interaction program of the radio frequency transceiver. When the data interaction program of the radio frequency transceiver is executed by a processor, it implements a data interaction method of a radio frequency transceiver according to any one of claims 1 to 7.
Citation Information
Patent Citations
Power grid intelligent terminal real-time interaction protocol deep analysis method and protocol security analysis tool
CN117061631A
Method for realizing cross-modal data protocol conversion on FPGA (Field Programmable Gate Array) and FPGA
CN118069653A
Communication device and communication control device for enabling operation of control protocol for one network on other types of networks
US20020169886A1
Multi-protocol data transmission method and apparatus, network, and storage medium
WO2023115367A1