Bidirectional protocol conversion method and device between Bluetooth and LoRaWAN
By providing a two-way protocol conversion method between Bluetooth and LoRaWAN protocol, the problems of poor compatibility between existing protocols and difficulty in communication are solved, seamless communication and improved protocol compatibility are achieved, and the needs of IoT applications are met.
Patent Information
- Application Number
- CN202411903453.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Poor compatibility and communication difficulties between existing Bluetooth and LoRaWAN protocols have led to difficulties in complementing the advantages of achieving short-range communication and remote data transmission in IoT applications.
By providing a two-way protocol conversion method between Bluetooth and LoRaWAN, including data sharding module, protocol conversion module, LoRaWAN module, etc., it processes Bluetooth protocol data, performs data type identification matching, compression priority allocation, data packet conversion and packaging, and realizes seamless communication between Bluetooth and LoRaWAN protocols.
It realizes seamless communication between Bluetooth and LoRaWAN protocols, improves protocol compatibility, simplifies system complexity and cost, and meets the needs of short-range communication and remote data transmission in IoT applications.
Smart Images

Figure CN119603376A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for bidirectional protocol conversion between Bluetooth and LoRaWAN. Background Art
[0002] With the rapid development of Internet of Things technology, Bluetooth and LoRaWAN, as two common wireless communication protocols, are widely used in different scenarios. Bluetooth is suitable for short-range, high-data-rate device communication, while LoRaWAN is characterized by long-range, low-power consumption, and is suitable for long-distance, low-data-volume communication. However, there are significant differences between the two protocols in data format, transmission method, and network architecture, leading to interoperability and compatibility issues between them. Many devices and application scenarios need to support both protocols at the same time to achieve the complementary advantages of short-range communication and long-range data transmission. Traditional methods usually rely on additional hardware adaptation or protocol stack conversion, which increases system complexity and cost. Therefore, how to efficiently achieve protocol conversion and interoperability between Bluetooth and LoRaWAN has become a technical problem that needs to be solved in Internet of Things applications.
[0003] At the current stage, there are technical problems in the relevant technologies, such as poor compatibility between Bluetooth and LoRaWAN protocols and difficulty in communication. Summary of the invention
[0004] The present application solves the technical problems of poor compatibility and communication difficulties between the existing Bluetooth and LoRaWAN protocols by providing a two-way protocol conversion method and device between Bluetooth and LoRaWAN.
[0005] This application provides a two-way protocol conversion method between Bluetooth and LoRaWAN, including: The Bluetooth protocol data received by the Bluetooth module is processed by the data segmentation module to obtain a plurality of data packets, wherein the plurality of data packets have a plurality of data type identifiers and a plurality of dependency identifiers; after the protocol conversion module receives the plurality of data packets sent by the data segmentation module, the compression tool matching scheduling is performed according to the plurality of data type identifiers to obtain M compression operation units; after the protocol conversion module performs compression priority allocation of the M compression operation units according to the plurality of dependency identifiers, the M compression operation units are started to perform compression processing of the plurality of data packets to obtain M groups of compressed packets; the M groups of compressed packets are converted into M groups of LoRaWAN protocol data by the protocol conversion module; after the LoRaWAN module receives the M groups of compressed packets transmitted by the protocol conversion module, the M groups of compressed packets are packaged into M groups of LoRaWAN protocol packets and sent to a remote device through the LoRaWAN network; the remote device receives the M groups of LoRaWAN protocol packets and performs data restoration according to the plurality of data type identifiers and the plurality of dependency identifiers; in a reverse operation, the protocol conversion module and the LoRaWAN module are reversely applied to convert the return of the data sent by the remote device into Bluetooth protocol data.
[0006] The present application also provides a bidirectional protocol conversion device between Bluetooth and LoRaWAN, including: A data packet acquisition module, the data packet acquisition module is used to process the Bluetooth protocol data received by the Bluetooth module through the data segmentation module to obtain multiple data packets, wherein the multiple data packets have multiple data type identifiers and multiple dependency identifiers; a tool matching scheduling module, the tool matching scheduling module is used for the protocol conversion module to receive the multiple data packets sent by the data segmentation module, and then perform compression tool matching scheduling according to the multiple data type identifiers to obtain M compression operation units; a compression processing module, the compression processing module is used for the protocol conversion module to assign compression priorities to the M compression operation units according to the multiple dependency identifiers, and then start the M compression operation units to perform compression processing on the multiple data packets to obtain M groups of compressed packets; a protocol data conversion module, the protocol data conversion The module is used to convert the M groups of compressed packets into M groups of LoRaWAN protocol data through the protocol conversion module; the remote device sending module is used for the LoRaWAN module to receive the M groups of compressed packets transmitted by the protocol conversion module, package the M groups of compressed packets into M groups of LoRaWAN protocol packets, and send them to the remote device through the LoRaWAN network; the data restoration module is used for the remote device to receive the M groups of LoRaWAN protocol packets and restore the data according to the multiple data type identifiers and multiple dependency identifiers; the backhaul conversion module is used for reversely applying the protocol conversion module and the LoRaWAN module in the reverse operation to convert the backhaul of the data sent by the remote device into Bluetooth protocol data.
[0007] The two-way protocol conversion method and device between Bluetooth and LoRaWAN proposed in this application first processes the Bluetooth protocol data through the data segmentation module and divides it into multiple data packets, each of which contains a data type and a dependency identifier. The protocol conversion module selects a suitable compression tool according to the data type identifier, starts multiple compression operation units, gives priority to data packets with strong dependencies, and generates multiple compressed packets. The compressed packet is converted into LoRaWAN protocol data, which is received by the LoRaWAN module and packaged into a LoRaWAN protocol packet, which is sent to the remote device through the LoRaWAN network. After receiving it, the remote device restores the data according to the data type and dependency identifier. In the reverse operation, the LoRaWAN module converts the LoRaWAN data sent by the remote device back to Bluetooth protocol data. Through the two-way protocol conversion method, the technical effect of realizing seamless communication between Bluetooth and LoRaWAN protocols and improving protocol compatibility is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the accompanying drawings of the embodiment of the present invention will be briefly introduced below. A flow chart is used in the present application to illustrate the operations performed by the device according to the embodiment of the present application. It should be understood that the previous or following operations are not necessarily performed precisely in order. On the contrary, various steps can be processed in reverse order or simultaneously as needed. At the same time, other operations can also be added to these processes, or one or more operations can be removed from these processes.
[0009] Figure 1 A flowchart of a two-way protocol conversion method between Bluetooth and LoRaWAN provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a bidirectional protocol conversion device between Bluetooth and LoRaWAN provided in an embodiment of the present application.
[0010] Explanation of the reference numerals: data packet acquisition module 10 , tool matching and scheduling module 20 , compression processing module 30 , protocol data conversion module 40 , remote device sending module 50 , data restoration module 60 , return conversion module 70 . DETAILED DESCRIPTION
[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
[0012] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0013] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict, and the terms "first\second" involved are merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, device, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of this application. The terms used herein are for the purpose of describing the embodiments of the present application only.
[0014] The present application embodiment provides a bidirectional protocol conversion method between Bluetooth and LoRaWAN, such as Figure 1 As shown, the method includes: Step S100, the Bluetooth protocol data received by the Bluetooth module is processed by the data slicing module to obtain multiple data packets, wherein the multiple data packets have multiple data type identifiers and multiple dependency identifiers. Specifically, after the Bluetooth module receives the Bluetooth communication data from the terminal device, the data slicing module first interacts with the LoRaWAN module to obtain the transmission load limit and uses this as a scale to initialize the structure of the Bluetooth protocol data to obtain multiple data subsets, and the data subsets have dependencies. Then, the data classification model storing the sample field sets of multiple sample data types is called to traverse the data subset record recurrence frequency to determine the subset type, and the adjacent dependencies of the same type of subsets are merged according to the subset type and dependency to construct a data structure tree, and the data packet is located in the structure tree and the data dependency and data type information are extracted. Finally, the data packet is identified with information, thereby obtaining multiple data packets with multiple data type identifiers and multiple dependency identifiers, providing an accurate information basis for subsequent processing to enable efficient advancement of the process.
[0015] In a possible implementation, the Bluetooth protocol data received by the Bluetooth module is processed by a data segmentation module to obtain a plurality of data packets, wherein the plurality of data packets have a plurality of data type identifiers and a plurality of dependency identifiers, and step S100 further includes step S110, wherein the Bluetooth module receives the Bluetooth protocol data from the terminal device. Specifically, the Bluetooth module receives the Bluetooth protocol data from the terminal device. The terminal device can be a variety of smart devices, such as smart phones, smart bracelets, smart home sensors, etc. The device will generate a large amount of data that needs to be transmitted during operation, and send it out in the form of Bluetooth protocol. The Bluetooth module can accurately capture the data signal by virtue of the designed Bluetooth communication interface and protocol stack, and convert it into a format that can be processed by subsequent modules, providing the original data source for the entire data processing process.
[0016] Step S120, the data structure analysis of the Bluetooth protocol data is performed by the data segmentation module to obtain a data structure tree. Specifically, after receiving the Bluetooth protocol data, the data segmentation module performs data structure analysis on the Bluetooth protocol data, and the data segmentation module needs to analyze the organizational structure of the data. Through data processing technology, the various components in the data and the relationships between them are identified. For example, different data blocks are distinguished based on the characteristics such as the specific format mark and field length of the data. Then, based on the analysis results, a data structure tree is gradually constructed. The construction process of the data structure tree is similar to building a family tree, which displays the affiliation and connection paths between the data in a hierarchical manner. Each node represents a data unit, and the branch represents the association between the data units, which organizes the Bluetooth protocol data that originally seemed to be chaotic into a clear and orderly structure model, laying the foundation for the positioning and information extraction of subsequent data packets.
[0017] Step S130, after locating the multiple data packets in the data structure tree, extract multiple data dependencies and multiple data type information of the multiple data packets from the data structure tree. Specifically, when the data structure tree is constructed, the data slicing module locates the multiple data packets in the data structure tree. After locating the data packets, the data slicing module further analyzes the intrinsic information of the data packets and extracts multiple data dependencies and multiple data type information from the data structure tree. The data dependency reflects the logical association between the data packets, for example, the data of some data packets is the basis for other data packets to be processed or calculated, and there is a sequence or causal relationship between the data packets. The data type information clarifies the nature of the data contained in each data packet, such as audio data, video data, sensor measurement data (such as temperature, humidity, pressure data, etc.) or control instruction data, etc. The information is crucial for subsequent data processing and transmission, and will serve as an important identifier of the data packet to help the system accurately understand and process the characteristics and uses of each data packet.
[0018] Step S140, using the multiple data dependencies and multiple data type information to identify the multiple data packets. Specifically, the data segmentation module uses the extracted multiple data dependencies and multiple data type information to identify the multiple data packets. In the subsequent processing flow, whether it is a protocol conversion module, a compression module or other related modules, it can quickly and accurately identify the content and characteristics of the data packet, so as to adopt a corresponding processing strategy according to the identification information. For example, the protocol conversion module can select a suitable conversion rule according to the type information of the data packet, and the compression module can determine the order and method of compression according to the data dependency, so as to ensure the efficiency and accuracy of data processing, and ensure the smooth transmission and conversion process between the entire Bluetooth and LoRaWAN.
[0019] In a possible implementation, the data structure of the Bluetooth protocol data is analyzed by the data slicing module to obtain a data structure tree, and step S120 further includes step S121, interacting with the LoRaWAN module to obtain the transmission load limit. Specifically, the data slicing module interacts with the LoRaWAN module to obtain the transmission load limit information. The transmission load limit is usually determined by the LoRaWAN protocol specification or network configuration, for example, the maximum size of the transmittable data packet is specified. The restriction information is crucial for the subsequent data processing steps because it will serve as the key basis for data partitioning to ensure that the data can be effectively processed and transmitted within the transmission capacity of the LoRaWAN network.
[0020] Step S122, using 1 / N of the transmission load limit as a data division scale, performing structural initialization on the Bluetooth protocol data, and obtaining multiple data subsets, wherein the multiple data subsets have multiple subset dependencies. Specifically, after obtaining the transmission load limit, the data slicing module uses 1 / N of the transmission load limit as a data division scale, and performs structural initialization operations on the Bluetooth protocol data. A large data set is divided according to a specific size standard to obtain multiple data subsets. The data subsets are not completely unrelated, but have multiple subset dependencies. For example, the data in some subsets is a prerequisite for processing other subset data, or there is a logical sequence relationship, and the dependency relationship reflects the internal structure and logic of the Bluetooth protocol data.
[0021] Step S123, pre-constructing a data classification model, wherein the data classification model stores K sample field sets of K sample data types. Specifically, a data classification model is pre-constructed, and the model stores K sample field sets of K sample data types. The sample data types cover various data categories that appear in Bluetooth protocol data, such as sensor data, control instruction data, device status data, etc. The sample field set corresponding to each sample data type is a typical feature identifier of this type of data, and the type of data in the data subset can be identified through the feature identifier. For example, for temperature sensor data, its sample field set may include a temperature value field, a sensor number field, etc.
[0022] Step S124, using the data classification model to traverse the multiple data subsets to record the recurrence frequency of the K sample field sets, and obtain multiple sets of field recurrence records. Specifically, the constructed data classification model is used to traverse the multiple data subsets obtained before, and the recurrence frequency of the K sample field sets is recorded during the traversal process, so as to obtain multiple sets of field recurrence records. The recurrence record reflects the frequency of occurrence of different sample field sets in the data subset, that is, the repeatability and redundancy information of the data.
[0023] Step S125, locate the data types of the multiple data subsets according to the multiple sets of field recurrence records, and obtain multiple subset types. Specifically, based on the multiple sets of field recurrence records, the data types of the multiple data subsets can be located, and it is determined which sample data type each data subset belongs to, thereby obtaining multiple subset types. For example, if in a certain data subset, the sample field set of temperature sensor data has a high recurrence frequency, then it can be determined that the type of the data subset is the temperature sensor data type.
[0024] Step S126, according to described multiple subset types and multiple subset dependencies, described multiple data subsets are carried out the adjacent dependency merging of same type subsets, complete the construction of described data structure tree.Particularly, according to determined multiple subset types and multiple subset dependencies, multiple data subsets are carried out the adjacent dependency merging operation of same type subsets.The data subsets with the same type and having adjacent dependency are integrated to form a hierarchical, structured whole, thereby complete the construction of data structure tree.In this data structure tree, each node represents a data subset or the larger data unit after merging, the connection relationship between the nodes has embodied the dependency between the data subsets, and the nodes at different levels have reflected the classification of data, such data structure tree provides clear framework and basis for subsequent operations such as locating data packets, extracting data dependency and data type information therein, helps to improve the efficiency and accuracy of whole data processing flow.
[0025] Step S200, after the protocol conversion module receives the multiple data packets sent by the data segmentation module, it matches and schedules the compression tools according to the multiple data type identifiers to obtain M compression operation units. Specifically, after the protocol conversion module receives the multiple data packets sent by the data segmentation module, it first reads the multiple data type identifiers of each data packet, analyzes the data features, and then performs efficient search and matching according to the data type identifier in a compression tool library that is pre-built and stores multiple compression tools and their configuration information according to different data types. For data packets identified as different data types such as images, audio, and text, the appropriate compression tools are selected from the corresponding tool set to form compression operation units based on comprehensive compression efficiency, compression ratio, and quality retention of compressed data. The operation is repeated until compression tools are determined for all data packets, and finally M compression operation units are obtained, so that the data packets can be compressed and processed later to achieve optimized transmission and storage of data.
[0026] Step S300, after the protocol conversion module allocates compression priorities to the M compression operation units according to the multiple dependency identifiers, the M compression operation units are started to perform compression processing of the multiple data packets to obtain M groups of compressed packets. Specifically, after receiving the data packets, the protocol conversion module analyzes multiple dependency identifiers, comprehensively considers the dependency, importance and redundancy of the data packets to build a priority sorting system, formulates strategies for the M compression operation units, assigns high priority to the units corresponding to the data packets with strong dependencies and high importance, and assigns low priority to the units corresponding to the data packets with high redundancy, and then starts the M compression operation units in order of priority, using appropriate compression algorithms such as dictionary encoding for text and discrete cosine transform for image to compress the data packets, the high priority units first process the key data packets, and the low priority units subsequently process other data packets, and finally obtain M groups of compressed packets, while reducing the amount of data and ensuring data integrity and compression effect, so as to facilitate subsequent transmission and storage.
[0027] In one possible implementation, after the protocol conversion module assigns compression priorities to the M compression operation units according to the multiple dependency identifiers, the M compression operation units are started to perform compression processing on the multiple data packets to obtain M groups of compressed packets, and step S300 further includes step S310, performing data packet aggregation according to the multiple data type identifiers to obtain M groups of data packets. Specifically, data packet aggregation is performed based on multiple data type identifiers. The data type identifier is an important attribute label of the data packet. By identifying and classifying it, data packets with the same or similar data types can be grouped together. For example, if there are several data packets with audio data type identifiers, several data packets with video data type identifiers, etc., the data packets with the same data type identifiers are integrated separately to finally obtain M groups of data packets, providing an ordered set of data packets for subsequent precise processing.
[0028] Step S320, pre-construct multiple sample compression units for multiple sample data types, wherein the multiple sample compression units have multiple groups of compression execution nodes built in, and the multiple sample compression units rely on multiple compression coding books to perform data compression operations. Specifically, multiple sample compression units for multiple sample data types are pre-constructed. Each sample compression unit is internally provided with multiple groups of compression execution nodes, and the nodes are core components for actually performing data compression tasks, and process data according to specific compression algorithms and rules. At the same time, multiple sample compression units rely on multiple compression coding books to perform data compression operations. The compression coding stores information such as compression coding methods, algorithm flows, and parameter settings for different data types. For example, for image data types, the compression coding book may contain detailed steps and parameter specifications of the JPEG encoding algorithm; for text data types, there are specific operation flows based on Huffman coding.
[0029] Step S330, the plurality of sample data types and the plurality of sample compression units are stored in association with each other, and the configuration of the compression tool library is completed. Specifically, the plurality of sample data types and the plurality of sample compression units corresponding thereto are stored in association with each other, and the compression tool library is constructed in an associated storage manner. When a data packet of a specific data type needs to be compressed, the corresponding sample compression unit and its related resources can be quickly found in the compression tool library, so that the compression work can be carried out efficiently.
[0030] Step S340, according to the M data type identifiers of the M groups of data packets, compression tool matching scheduling is performed in the compression tool library to obtain M compression operation units. Specifically, according to the M data type identifiers of each of the M groups of data packets, compression tool matching scheduling is performed in the constructed compression tool library. When a specific data type identifier of a group of data packets is identified, a sample compression unit matching it is searched in the compression tool library. For example, if a group of data packets is identified as a video data type, a sample compression unit specifically for video data is found in the compression tool library and determined as the compression operation unit of the group of data packets. Through the matching scheduling process, appropriate compression operation units are determined for the M groups of data packets, and finally M compression operation units are obtained. It ensures that each data packet can be processed by the compression tool that best suits its data type, thereby improving the efficiency and quality of compression.
[0031] Step S350, extracting M groups of data dependencies from the M groups of data packets. Specifically, extracting M groups of data dependencies from the M groups of data packets. These data dependencies reflect the logical correlation between the data packets. For example, the data of some data packets may be the basis for processing or parsing other data packets, and there is a sequence or causal relationship between them.
[0032] Step S360, after performing compression priority allocation according to the M groups of data dependencies, obtain M compression node allocations. Specifically, after obtaining the data dependencies, compression priority allocation is performed according to the dependencies. For those data packets that are at the front end of the data dependency chain and have an important impact on the subsequent data packet processing, a higher compression priority is allocated; while for relatively independent data packets or data packets at the end of the dependency, a lower priority is allocated. Through allocation, M compression node allocations are obtained, so that the subsequent compression process can be carried out in a reasonable order, which not only ensures the integrity of the data, but also improves the overall efficiency of compression.
[0033] Step S370, with the M compression node allocation as a constraint, start the M compression operation units to perform cluster compression on the M groups of data packets, and obtain the M groups of compressed packets. Specifically, with the M compression node allocation as a constraint, start the M compression operation units to perform cluster compression on the M groups of data packets. Each compression operation unit uses the built-in compression execution node and the dependent compression code book to carry out compression work according to the compression node priority assigned to itself and the corresponding data packet characteristics. For example, the compression operation unit with a high priority first performs efficient compression processing on its corresponding key data packet, using a more sophisticated but slightly longer compression algorithm to ensure the accuracy and integrity of the data; while the compression operation unit with a lower priority uses a relatively fast but slightly lower compression ratio algorithm to compress non-key data packets. After each compression operation unit completes the compression task in accordance with the established order and rules, M groups of compressed packets are finally obtained, which will provide a more optimized data format for subsequent data transmission or storage, reducing the amount of data while retaining the core value and logical relationship of the data.
[0034] In a possible implementation, after compression priority is allocated according to the M groups of data dependencies, M compression node allocations are obtained, and step S360 further includes step S361, constructing a data association topology for the first group of data packets according to the first group of data dependencies. Specifically, for the first group of data packets, a data association topology is constructed based on their data dependencies. Each data packet is regarded as a topological node. If a data packet has data dependencies with other data packets, a connection relationship is established between their corresponding nodes. For example, if the data processing of data packet B requires the result of data packet A, then a directed edge will be constructed between the nodes representing A and B, indicating the data flow dependency from A to B. The complex dependencies between the first group of data packets are clearly presented in the form of a topological diagram, providing an intuitive structural model for subsequent analysis and processing.
[0035] Step S362, extracting and obtaining multiple dangling data points from the data association topology. Specifically, in the constructed data association topology, carefully search and extract multiple dangling data points. Dangling data points refer to data packets corresponding to nodes that only have in-degree connections or no connection relationships in the topology structure. Data packets are relatively independent in the data dependency chain and do not directly affect the processing order of other data packets. For example, some data packets that only contain their own device status information and do not participate in other data calculations or processing processes may become dangling data points. Extracting dangling data points helps to further optimize the topology structure so as to more accurately determine the compression priority of data packets.
[0036] Step S363, after removing the multiple dangling data points from the data association topology, the topological nodes in the data association topology are graded based on the out-degree connection relationship to obtain multiple layers of out-degree connection points. Specifically, after removing the multiple extracted dangling data points from the data association topology, the remaining topological nodes are graded based on the out-degree connection relationship to obtain multiple layers of out-degree connection points. The out-degree connection relationship reflects the number of connections from a node to other nodes. The larger the out-degree, the more influence the data of the node has on subsequent data packets. By counting and analyzing the out-degree connection relationship, the topological nodes are divided into different levels. For example, a node with an out-degree of 0 may be classified as the lowest level, while a node with a higher out-degree is classified into a higher level, forming a structure of multiple layers of out-degree connection points. The grading method can intuitively reflect the importance and influence level of the data packet in the entire data dependency system.
[0037] Step S364, configure multiple compression priority levels for the multi-layer out-degree connection points, and configure compression terminal levels for the multiple dangling data points. Specifically, according to the classification results of the topological nodes, multiple compression priority levels are configured for the multi-layer out-degree connection points, and compression terminal levels are configured for the multiple dangling data points extracted previously. For multi-layer out-degree connection points at a higher level, that is, the data packets corresponding to the nodes that provide important data for more subsequent data packets, a higher compression priority level is assigned, because the accurate transmission and rapid processing of data packets are crucial to the integrity and efficiency of the entire data processing process. Due to their relative independence, dangling data points have little impact on the overall data dependency, so they are configured as the compression terminal level, which means that they can be compressed after the compression processing of other important data packets is completed. The configuration method can improve the overall compression efficiency under the premise of ensuring data integrity.
[0038] Step S365, configure the compression execution node with the compression terminal level and multiple compression priority levels as constraints to obtain the first compression node allocation. Specifically, configure the compression execution node with the configured compression terminal level and multiple compression priority levels as constraints to obtain the first compression node allocation. According to different compression priority levels, corresponding compression execution node resources are allocated to data packets of each level. For example, for data packets of high compression priority levels, compression execution nodes with better performance and faster processing speed are allocated to ensure that they can complete compression quickly and accurately; and for data packets corresponding to dangling data points of the compression terminal level, compression execution nodes that are relatively simple and occupy less resources are allocated. Through the configuration method, the node allocation scheme for the first group of data packets during the compression process, that is, the first compression node allocation, is determined.
[0039] Step S366, and so on, compression priority allocation is performed according to the M groups of data dependencies, and the M compression node allocations are obtained. Specifically, the M groups of data packets are processed in turn according to the same method and steps. According to the respective data dependencies of each group of data packets, a data association topology is constructed, dangling data points are extracted, and after removing the dangling data points, topological node classification is performed, and compression priority levels and compression terminal levels are configured. Finally, compression execution node configuration is performed with the level as a constraint, so as to obtain compression node allocations corresponding to each group of data packets, and finally M compression node allocations are obtained. The compression node allocation scheme will provide precise execution guidance for subsequent cluster compression operations, ensuring that the dependencies between data packets can be fully considered during the compression process, and compression resources can be efficiently used to achieve optimized data compression processing.
[0040] In a possible implementation, the M compression nodes are allocated as a constraint, the M compression operation units are started to perform cluster compression of the M groups of data packets, and the M groups of compressed packets are obtained. Step S370 further includes step S371, which starts the first group of compression execution nodes of the first compression operation unit with the first compression node allocation as a constraint. Specifically, according to the first compression node allocation scheme, the first group of compression execution nodes in the first compression operation unit is started. The first compression node allocation clarifies the compression execution resources and priority corresponding to each data packet, which directly affects the compression operation. For example, if a data packet is allocated to a high-performance compression execution node and has a high priority, then the node will be activated and started first to ensure that important data can be processed in a timely manner.
[0041] Step S372, the first group of compression execution nodes uses the data volume of the first group of data packets as a computing power allocation constraint, and uses the compression terminal level and multiple compression priority levels as activation constraints to perform step-by-step data compression of the first group of data packets to obtain a first group of compressed packets. Specifically, when the first group of compression execution nodes compress, the data volume of the first group of data packets is used as a computing power allocation constraint, and computing resources are reasonably allocated according to the size of the data packets. For data packets with a large data volume, more computing resources are allocated to speed up the compression speed; for data packets with a small data volume, relatively fewer resources are allocated to avoid resource waste. At the same time, the compression terminal level and multiple compression priority levels are used as activation constraints, and compression is performed in a pre-set priority order. High-priority data packets are compressed first, and a more sophisticated compression algorithm that may consume more resources is used to ensure the accuracy and integrity of the data; low-priority data packets are compressed using a relatively simple and fast algorithm after the high-priority data packets are processed. For example, when processing video data, key frame data packets, as high-priority data, will use a high-quality compression algorithm to ensure picture quality, while non-key frame data packets use a higher compression ratio algorithm to reduce the amount of data. Under the above constraints, the first group of compression execution nodes compress the first group of data packets step by step. Starting from the data packet with the highest priority, each data packet is compressed in turn. During the compression process, some additional processing will be performed based on the dependency between data packets, such as waiting or preloading data packets that depend on other data packets to ensure that the compressed data can be correctly restored when decompressed. After such a step-by-step compression process, the first group of compressed packets is finally obtained.
[0042] Step S373, and so on, with the M compression nodes allocated as constraints, start the M compression operation units to perform cluster compression on the M groups of data packets, and obtain the M groups of compressed packets. Specifically, in the same way, with the M compression nodes allocated as constraints, start the M compression operation units to perform cluster compression on the M groups of data packets. Each compression operation unit follows its corresponding compression node allocation scheme, and compresses the corresponding data packet group under the computing power allocation and activation constraints. The compression operation units cooperate with each other, work in parallel or serially, and jointly complete the compression task of all data packets, and finally obtain M groups of compressed packets. This cluster compression method makes full use of compression resources, improves compression efficiency, and ensures data integrity and validity through reasonable priority setting, so that the compressed data packets can better meet the needs of subsequent data transmission, storage or processing.
[0043] Step S400, converting the M groups of compressed packets into M groups of LoRaWAN protocol data through the protocol conversion module. Specifically, after receiving the M groups of compressed packets, the protocol conversion module first initializes and verifies the data accuracy and format, reversely unpacks and extracts the original data based on the corresponding compression algorithm, and then performs various data format conversions according to the requirements of the LoRaWAN protocol, including data structure, type, encoding conversion, and filling, segmentation or reorganization operations according to the specifications. After a series of conversions, M groups of LoRaWAN protocol data are finally generated, and they are verified and sorted when they are generated to ensure that they can be received by the LoRaWAN module and accurately and completely transmitted in the LoRaWAN network.
[0044] Step S500: After the LoRaWAN module receives the M groups of compressed packets transmitted by the protocol conversion module, it packages the M groups of compressed packets into M groups of LoRaWAN protocol packets and sends them to the remote device through the LoRaWAN network. Specifically, after the LoRaWAN module receives the M groups of compressed packets transmitted by the protocol conversion module, it first performs a preliminary check on their integrity and accuracy, and then adds header information (such as sequence number, source and destination address, length, etc.) and tail information (such as verification data) to the M groups of compressed packets in accordance with the LoRaWAN protocol specification to package them into M groups of LoRaWAN protocol packets, and then connects and interacts with the LoRaWAN network, negotiates parameters such as transmission rate, power, and frequency band based on network load and signal quality, and completes the handshake operation, sends the protocol packet to the remote device through the LoRaWAN network and monitors the transmission status in real time, and adjusts the transmission strategy based on feedback to ensure the complete delivery of data.
[0045] Step S600, the remote device receives the M groups of LoRaWAN protocol packets, and performs data restoration according to the multiple data type identifiers and multiple dependency identifiers. Specifically, the remote device first turns on the receiving function to receive the M groups of LoRaWAN protocol packets from the LoRaWAN network and performs integrity check, and ensures that there is no transmission error in the data packet through technical means such as checksum or CRC, and then extracts multiple data type identifiers and multiple dependency identifiers from the protocol packet, and then constructs multiple sample decompression units based on the compression code book of multiple sample data types and stores them in association to complete the construction of the decompression tool library, and then matches the decompression tool in the decompression tool library according to the data type identifier, and restores the structure of the protocol packet according to the data dependency, and uses the matching decompression tool and the restored data structure as the basis, and uses the corresponding decompression algorithm to decompress the protocol packet and convert the decompressed data according to the data type identifier, and finally completes the data restoration, so that the remote device obtains consistent information with the sending end for subsequent operations.
[0046] In a possible implementation, the remote device receives the M groups of LoRaWAN protocol packets, and performs data restoration according to the multiple data type identifiers and the multiple dependency identifiers, and step S600 further includes step S610, constructing and obtaining multiple sample decompression units according to the multiple compression code books of the multiple sample data types. Specifically, multiple sample decompression units are constructed according to the multiple compression code books corresponding to the multiple sample data types. Each sample data type, such as audio data, video data, text data, etc., has its specific compression encoding method recorded in the corresponding compression code book. Based on the information in these compression code books, a sample decompression unit capable of decompressing a specific data type is developed. For audio data types, its sample decompression unit may include decompression algorithms and related processing logic for audio compression formats such as MP3 and WAV; for video data types, the sample decompression unit covers decompression function modules for video compression formats such as H.264 and H.265. The sample decompression unit is the core component of the subsequent decompression operation, and they are carefully designed to cope with the decompression requirements of different types of data to ensure that the original data can be accurately restored.
[0047] Step S620, the multiple sample data types and the multiple sample decompression units are stored in association with each other to complete the construction of the decompression tool library. Specifically, after the multiple sample decompression units are constructed, the multiple sample data types and the corresponding multiple sample decompression units are stored in association to complete the construction of the decompression tool library. The associated storage method allows the corresponding decompression unit to be quickly found according to the type of data when data is received. For example, in the decompression tool library, a clear mapping relationship is established between the audio data type and the audio sample decompression unit, and the video data type and the video sample decompression unit correspond to each other. When a certain type of data needs to be decompressed, the decompression tool library can quickly locate and call the appropriate decompression unit, improve the efficiency and accuracy of the decompression operation, and provide powerful tool support for the entire data restoration process.
[0048] Step S630, extracting and obtaining the M groups of data dependencies and M data type identifiers from the M groups of LoRaWAN protocol packets. Specifically, extracting M groups of data dependencies and M data type identifiers from the M groups of LoRaWAN protocol packets. Data dependencies reflect the logical correlation between data packets. For example, the data processing of some data packets needs to rely on the data results of other data packets. The relationship information is crucial for the subsequent correct restoration of the data structure. The data type identifier clarifies the category to which the data in each data packet belongs. As mentioned above, it may be one of the types such as audio, video, and text. By accurately extracting this information, a key basis is provided for the next step of structural restoration and decompression operations, so that subsequent operations can be carried out in a targeted manner.
[0049] Step S640, after structural restoration of the M groups of LoRaWAN protocol packets according to the M groups of data dependencies, the M data type identifiers are used as constraints, and the decompression operation tool calls and data decompression and restoration are performed in multiple rounds in the decompression tool library. Specifically, the M groups of LoRaWAN protocol packets are structurally restored according to the M groups of data dependencies. Since there are dependencies between data packets, the data packets need to be reassembled into the original data structure according to these relationships. For example, if the data of data packet A is a prerequisite for processing data packet B, then when restoring the data structure, data packet A will be processed first, and then its results will be associated and integrated with data packet B to gradually build a complete data structure framework. After completing the structural restoration, the M data type identifiers are used as constraints, and multiple rounds of decompression operation tool calls and data decompression and restoration are performed in the decompression tool library. In each round, for data packets with different data type identifiers, the corresponding sample decompression unit is called to perform decompression operations. For example, when the data type of a data packet is identified as video data, the video sample decompression unit is called from the decompression tool library to decompress it, and the compressed data is restored to the original video data format. Through multiple rounds of such operations, the decompression and restoration of M groups of LoRaWAN protocol packets are finally completed, so that the data can be presented in an original form that can be directly used by the application, laying the foundation for subsequent data processing, analysis or storage operations.
[0050] Step S700, in the reverse operation, the protocol conversion module and the LoRaWAN module are reversely applied to convert the return of the data sent by the remote device into Bluetooth protocol data. Specifically, in the reverse operation process, the remote device first sends the data, which is received and checked and collated by the LoRaWAN module after entering the LoRaWAN network through the communication link. After confirmation, the data is pre-processed to adapt to the protocol conversion module, remove the LoRaWAN protocol specific identifier, restore the main content and transmit it. After receiving the data, the protocol conversion module parses the data, adjusts the structure and converts the code according to the Bluetooth and LoRaWAN protocol specifications and mapping relationships, such as converting the length representation, re-encoding and adding the Bluetooth protocol header and check bit to construct a complete Bluetooth protocol data format, and then transmits it to the Bluetooth module. The Bluetooth module receives and processes it according to the Bluetooth protocol communication mechanism, and then transmits it to the terminal device, thereby realizing data return and conversion to Bluetooth protocol data, achieving two-way communication and solving protocol compatibility and interoperability problems.
[0051] The embodiment of the present application processes Bluetooth protocol data through a data segmentation module, dividing it into multiple data packets, each of which contains a data type and a dependency identifier. The protocol conversion module selects a suitable compression tool according to the data type identifier, starts multiple compression operation units, gives priority to processing data packets with strong dependencies, and generates multiple compressed packages. The compressed package is converted into LoRaWAN protocol data, which is received by the LoRaWAN module and packaged into a LoRaWAN protocol package, which is sent to a remote device through the LoRaWAN network. After receiving the data, the remote device restores the data according to the data type and dependency identifier. In the reverse operation, the LoRaWAN module converts the LoRaWAN data sent by the remote device back to Bluetooth protocol data. Through the two-way protocol conversion method, the technical effect of realizing seamless communication between Bluetooth and LoRaWAN protocols and improving protocol compatibility is achieved.
[0052] In the above, refer to Figure 1 The bidirectional protocol conversion method between Bluetooth and LoRaWAN according to an embodiment of the present invention is described in detail. Figure 2 A bidirectional protocol conversion device between Bluetooth and LoRaWAN according to an embodiment of the present invention is described.
[0053] The bidirectional protocol conversion device between Bluetooth and LoRaWAN according to the embodiment of the present invention is used to solve the technical problems of poor compatibility and difficult communication between the existing Bluetooth and LoRaWAN protocols. Through the bidirectional protocol conversion method, the technical effect of achieving seamless communication between the Bluetooth and LoRaWAN protocols and improving protocol compatibility is achieved. The bidirectional protocol conversion device between Bluetooth and LoRaWAN includes: a data packet acquisition module 10, a tool matching scheduling module 20, a compression processing module 30, a protocol data conversion module 40, a remote device sending module 50, a data restoration module 60, and a return conversion module 70.
[0054] The data packet acquisition module 10 is used to process the Bluetooth protocol data received by the Bluetooth module through the data segmentation module to obtain multiple data packets, wherein the multiple data packets have multiple data type identifiers and multiple dependency identifiers.
[0055] The tool matching and scheduling module 20 is used for performing compression tool matching and scheduling according to the multiple data type identifiers after the protocol conversion module receives the multiple data packets sent by the data segmentation module to obtain M compression operation units.
[0056] The compression processing module 30 is used for the protocol conversion module to allocate compression priorities of the M compression operation units according to the multiple dependency identifiers, and then start the M compression operation units to perform compression processing on the multiple data packets to obtain M groups of compressed packets.
[0057] The protocol data conversion module 40 is used to convert the M groups of compressed packets into M groups of LoRaWAN protocol data through the protocol conversion module.
[0058] The remote device sending module 50 is used for the LoRaWAN module to receive the M groups of compressed packets transmitted by the protocol conversion module, package the M groups of compressed packets into M groups of LoRaWAN protocol packets, and send them to the remote device through the LoRaWAN network.
[0059] The data restoration module 60 is used for the remote device to receive the M groups of LoRaWAN protocol packets and perform data restoration according to the multiple data type identifiers and the multiple dependency identifiers.
[0060] The backhaul conversion module 70 is used to reversely apply the protocol conversion module and the LoRaWAN module in the reverse operation to convert the backhaul of the data sent by the remote device into Bluetooth protocol data.
[0061] The specific configuration of the data packet acquisition module 10 will be described in detail below. As described above, the Bluetooth protocol data received by the Bluetooth module is processed by the data segmentation module to obtain multiple data packets, wherein the multiple data packets have multiple data type identifiers and multiple dependency identifiers, and the data packet acquisition module 10 further includes: a Bluetooth protocol data receiving unit, the Bluetooth protocol data receiving unit is used for the Bluetooth module to receive Bluetooth protocol data from the terminal device; a data structure analysis unit, the data structure analysis unit is used to perform data structure analysis on the Bluetooth protocol data through the data segmentation module to obtain a data structure tree; a data packet locating unit, the data packet locating unit is used to extract multiple data dependency relationships and multiple data type information of the multiple data packets from the data structure tree after locating the multiple data packets in the data structure tree; a data packet identification unit, the data packet identification unit is used to identify the multiple data packets using the multiple data dependency relationships and multiple data type information.
[0062] The data structure analysis of the Bluetooth protocol data is performed through the data slicing module to obtain a data structure tree. The data structure analysis unit further includes: a transmission load limit acquisition subunit, which is used to interact with the LoRaWAN module to obtain the transmission load limit; a data partition scale subunit, which is used to use 1 / N of the transmission load limit as the data partition scale to perform structural initialization on the Bluetooth protocol data to obtain multiple data subsets, wherein the multiple data subsets have multiple subset dependencies; a data classification model pre-construction subunit, which is used to pre-construct a data classification model, wherein the data The class model stores K sample field sets of K types of sample data; a recurrence frequency record subunit, which is used to use the data classification model to traverse the multiple data subsets to perform recurrence frequency records of the K sample field sets, and obtain multiple groups of field recurrence records; a subset type acquisition subunit, which is used to locate the data types of the multiple data subsets according to the multiple groups of field recurrence records, and obtain multiple subset types; an adjacent dependency merging subunit, which is used to perform adjacent dependency merging of subsets of the same type on the multiple data subsets according to the multiple subset types and multiple subset dependencies, and complete the construction of the data structure tree.
[0063] The specific configuration of the compression processing module 30 will be described in detail below. As described above, after the protocol conversion module allocates compression priorities to the M compression operation units according to the multiple dependency identifiers, the M compression operation units are started to perform compression processing on the multiple data packets to obtain M groups of compressed packets. The compression processing module 30 further includes: a data packet aggregation unit, the data packet aggregation unit is used to aggregate data packets according to the multiple data type identifiers to obtain M groups of data packets; a compression unit pre-construction unit, the compression unit pre-construction unit is used to pre-construct multiple sample compression units of multiple sample data types, wherein the multiple sample compression units have multiple groups of compression execution nodes built in, and the multiple sample compression units rely on multiple compression encoding books to perform data compression operations; a tool library configuration unit, the tool library configuration unit is used to associate and store the multiple A sample data type and a plurality of sample compression units are used to complete the configuration of the compression tool library; a compression operation unit acquisition unit, the compression operation unit acquisition unit is used to perform compression tool matching scheduling in the compression tool library according to the M data type identifiers of the M groups of data packets, and obtain M compression operation units; a dependency extraction unit, the dependency extraction unit is used to extract and obtain M groups of data dependencies from the M groups of data packets; a compression priority allocation unit, the compression priority allocation unit is used to perform compression priority allocation according to the M groups of data dependencies, and obtain M compression node allocations; a cluster compression unit, the cluster compression unit is used to start the M compression operation units to perform cluster compression of the M groups of data packets with the M compression node allocations as constraints, and obtain the M groups of compressed packets.
[0064] Wherein, after performing compression priority allocation according to the M groups of data dependencies to obtain M compression node allocations, the compression priority allocation unit further includes: a data association topology construction subunit, the data association topology construction subunit is used to construct a data association topology of a first group of data packets according to the first group of data dependencies; a dangling data point extraction subunit, the dangling data point extraction subunit is used to extract and obtain multiple dangling data points from the data association topology; a topology node classification subunit, the topology node classification subunit is used to perform the data association topology based on the out-degree connection relationship after removing the multiple dangling data points from the data association topology. The topological nodes in the grading are classified to obtain multiple layers of out-degree connection points; a compression priority level configuration subunit, the compression priority level configuration subunit is used to configure multiple compression priority levels for the multiple layers of out-degree connection points, and configure a compression terminal level for the multiple dangling data points; a node configuration execution subunit, the node configuration execution subunit is used to perform compression execution node configuration with the compression terminal level and multiple compression priority levels as constraints to obtain a first compression node allocation; a compression priority allocation subunit, the compression priority allocation subunit is used to perform compression priority allocation according to the M groups of data dependencies and so on, to obtain the M compression node allocations.
[0065] Among them, with the M compression node allocation as a constraint, the M compression operation units are started to perform cluster compression on the M groups of data packets to obtain the M groups of compressed packets. The cluster compression unit further includes: a node allocation constraint subunit, the node allocation constraint subunit is used to start the first group of compression execution nodes of the first compression operation unit with the first compression node allocation as a constraint; a computing power allocation constraint subunit, the computing power allocation constraint subunit is used for the first group of compression execution nodes to use the data volume of the first group of data packets as the computing power allocation constraint, and the compression end level and multiple compression priority levels as activation constraints to perform step-by-step data compression on the first group of data packets to obtain a first group of compressed packets; a cluster compression subunit, the cluster compression subunit is used to start the M compression operation units to perform cluster compression on the M groups of data packets with the M compression node allocation as a constraint, and so on, to obtain the M groups of compressed packets.
[0066] The specific configuration of the data restoration module 60 will be described in detail below. As described above, the remote device receives the M groups of LoRaWAN protocol packets and performs data restoration according to the multiple data type identifiers and the multiple dependency identifiers. The data restoration module 60 further includes: a sample decompression unit acquisition unit, the sample decompression unit acquisition unit is used to construct and obtain multiple sample decompression units according to the multiple compression code books of the multiple sample data types; a decompression tool library construction unit, the decompression tool library construction unit is used to associate and store the multiple sample data types and the multiple sample decompression units to complete the construction of the decompression tool library; a protocol packet extraction unit, the protocol packet extraction unit is used to extract and obtain the M groups of data dependencies and M data type identifiers from the M groups of LoRaWAN protocol packets; a structure restoration unit, the structure restoration unit is used to perform structural restoration on the M groups of LoRaWAN protocol packets according to the M groups of data dependencies, and then perform decompression operation tool calls and data decompression restoration in multiple rounds in the decompression tool library with the M data type identifiers as constraints.
[0067] The bidirectional protocol conversion device between Bluetooth and LoRaWAN provided in the embodiment of the present invention can execute the bidirectional protocol conversion method between Bluetooth and LoRaWAN provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0068] Although the present application makes various references to certain modules in the device according to the embodiments of the present application, any number of different modules may be used and run on the user terminal and / or server, and the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0069] The above specific implementation manner does not constitute a limitation to the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application. In some cases, the actions or steps recorded in the present application can be performed in an order different from that in the embodiment and can still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A bidirectional protocol conversion method between Bluetooth and LoRaWAN, characterized in that: The method comprises: Processing the Bluetooth protocol data received by the Bluetooth module through the data segmentation module to obtain a plurality of data packets, wherein the plurality of data packets have a plurality of data type identifiers and a plurality of dependency identifiers; After receiving the multiple data packets sent by the data segmentation module, the protocol conversion module performs compression tool matching scheduling according to the multiple data type identifiers to obtain M compression operation units; After the protocol conversion module allocates compression priorities to the M compression operation units according to the multiple dependency identifiers, the M compression operation units are started to perform compression processing on the multiple data packets to obtain M groups of compressed packets; The M groups of compressed packets are converted into M groups of LoRaWAN protocol data by the protocol conversion module; After receiving the M groups of compressed packets transmitted by the protocol conversion module, the LoRaWAN module packages the M groups of compressed packets into M groups of LoRaWAN protocol packets, and sends them to the remote device through the LoRaWAN network; The remote device receives the M groups of LoRaWAN protocol packets, and performs data restoration according to the multiple data type identifiers and the multiple dependency identifiers; In the reverse operation, the protocol conversion module and the LoRaWAN module are reversely applied to convert the return data sent by the remote device into Bluetooth protocol data.
2. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 1, characterized in that: After the protocol conversion module allocates compression priorities of the M compression operation units according to the multiple dependency identifiers, the M compression operation units are started to perform compression processing of the multiple data packets to obtain M groups of compressed packets. The method further includes: Aggregate data packets according to the multiple data type identifiers to obtain M groups of data packets; Pre-constructing a plurality of sample compression units of a plurality of sample data types, wherein the plurality of sample compression units have a plurality of groups of compression execution nodes built in, and the plurality of sample compression units rely on a plurality of compression codebooks to perform data compression operations; The plurality of sample data types and the plurality of sample compression units are stored in association with each other to complete the configuration of the compression tool library; Perform compression tool matching scheduling in the compression tool library according to the M data type identifiers of the M groups of data packets to obtain M compression operation units; Extracting and obtaining M groups of data dependencies from the M groups of data packets; Performing compression priority allocation according to the M groups of data dependencies to obtain M compression node allocations; Taking the M compression node allocations as constraints, the M compression operation units are started to perform cluster compression of the M groups of data packets to obtain the M groups of compressed packets.
3. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 2, characterized in that: After performing compression priority allocation according to the M groups of data dependencies to obtain M compression node allocations, the method further includes: constructing a data association topology of a first group of data packets according to the first group of data dependency relationships; Extracting and obtaining a plurality of dangling data points from the data association topology; After removing the plurality of dangling data points from the data association topology, grading the topological nodes in the data association topology based on the out-degree connection relationship to obtain multiple layers of out-degree connection points; configuring a plurality of compression priority levels for the multi-layer out-degree connection points, and configuring a compression terminal level for the plurality of dangling data points; Perform compression execution node configuration based on the compression terminal level and multiple compression priority levels as constraints to obtain a first compression node allocation; Similarly, compression priority allocation is performed according to the M groups of data dependencies to obtain the M compression node allocations.
4. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 3, characterized in that: Taking the M compression node allocations as constraints, starting the M compression operation units to perform cluster compression of the M groups of data packets to obtain the M groups of compressed packets, the method further comprising: Starting a first group of compression execution nodes of a first compression operation unit with the first compression node allocation as a constraint; The first group of compression execution nodes uses the data volume of the first group of data packets as a computing power allocation constraint and the compression terminal level and the plurality of compression priority levels as activation constraints to perform step-by-step data compression of the first group of data packets to obtain a first group of compressed packets; By analogy, with the M compression node allocations as constraints, the M compression operation units are started to perform cluster compression on the M groups of data packets to obtain the M groups of compressed packets.
5. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 1, characterized in that: Processing the Bluetooth protocol data received by the Bluetooth module through the data segmentation module to obtain multiple data packets, the method further includes: The Bluetooth module receives Bluetooth protocol data from the terminal device; Performing data structure analysis on the Bluetooth protocol data through a data segmentation module to obtain a data structure tree; After locating the plurality of data packets in the data structure tree, extracting and obtaining a plurality of data dependency relationships and a plurality of data type information of the plurality of data packets from the data structure tree; The plurality of data packets are identified using the plurality of data dependency relationships and the plurality of data type information.
6. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 5, characterized in that: The data structure of the Bluetooth protocol data is analyzed by a data segmentation module to obtain a data structure tree, and the method further includes: Interact with LoRaWAN modules to obtain transmission load limits; Using 1 / N of the transmission load limit as a data division scale, initializing the structure of the Bluetooth protocol data to obtain multiple data subsets, wherein the multiple data subsets have multiple subset dependencies; Pre-constructing a data classification model, wherein the data classification model stores K sample field sets of K sample data types; Using the data classification model to traverse the multiple data subsets to record the recurrence frequency of the K sample field sets, and obtain multiple groups of field recurrence records; Locating the data types of the multiple data subsets according to the multiple groups of field recurrence records to obtain multiple subset types; According to the multiple subset types and the multiple subset dependency relationships, adjacent dependencies of the same type of subsets are merged for the multiple data subsets to complete the construction of the data structure tree.
7. The method for bidirectional protocol conversion between Bluetooth and LoRaWAN as claimed in claim 2, characterized in that: The remote device receives the M groups of LoRaWAN protocol packets, and performs data restoration according to the multiple data type identifiers and the multiple dependency identifiers, and the method further includes: Constructing and obtaining a plurality of sample decompression units according to the plurality of compression codebooks of the plurality of sample data types; The plurality of sample data types and the plurality of sample decompression units are stored in association with each other to complete the construction of a decompression tool library; Extracting and obtaining the M groups of data dependencies and M data type identifiers from the M groups of LoRaWAN protocol packets; After structural restoration of the M groups of LoRaWAN protocol packets is performed according to the M groups of data dependencies, the decompression operation tool call and data decompression restoration are performed in multiple rounds in the decompression tool library with the M data type identifiers as constraints.
8. A bidirectional protocol conversion device between Bluetooth and LoRaWAN, characterized in that: The device is used to implement the bidirectional protocol conversion method between Bluetooth and LoRaWAN according to any one of claims 1 to 7, and the device includes: A data packet acquisition module, the data packet acquisition module is used to process the Bluetooth protocol data received by the Bluetooth module through the data segmentation module to obtain multiple data packets, wherein the multiple data packets have multiple data type identifiers and multiple dependency identifiers; A tool matching and scheduling module, wherein the tool matching and scheduling module is used for performing compression tool matching and scheduling according to the multiple data type identifiers after the protocol conversion module receives the multiple data packets sent by the data segmentation module, so as to obtain M compression operation units; A compression processing module, wherein the compression processing module is used to start the M compression operation units to perform compression processing on the multiple data packets after the protocol conversion module allocates compression priorities to the M compression operation units according to the multiple dependency identifiers, so as to obtain M groups of compressed packets; A protocol data conversion module, the protocol data conversion module is used to convert the M groups of compressed packets into M groups of LoRaWAN protocol data through the protocol conversion module; A remote device sending module, wherein after the LoRaWAN module receives the M groups of compressed packets transmitted by the protocol conversion module, the remote device sending module packages the M groups of compressed packets into M groups of LoRaWAN protocol packets and sends them to the remote device through the LoRaWAN network; A data restoration module, wherein the data restoration module is used for the remote device to receive the M groups of LoRaWAN protocol packets and restore the data according to the multiple data type identifiers and the multiple dependency identifiers; A backhaul conversion module is used to reversely apply the protocol conversion module and the LoRaWAN module in a reverse operation to convert the backhaul of the data sent by the remote device into Bluetooth protocol data.
Citation Information
Patent Citations
LoRaWAN protocol-based communication method, device and system
CN110099066A
Self-adaptive matching method and system for power protocol of Internet of Things
CN118869837A
Information configuration method and apparatus, and related devices and storage medium
WO2023116356A1