A configuration file generation method and device based on time slot encoding
Patent Information
- Application Number
- CN202611131174.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-07-29
AI Technical Summary
由于配置文件体积臃肿,在带宽受限的无线信道中传输时,会导致网络初始化时间过长,难以满足现代通信对快速组网的要求
[0027]本说明书实施例提供的一种基于时隙编码的配置文件生成方法及装置,先获取目标通信网络中的节点信息;根据所述目标通信网络中的节点信息,基于预设的时隙编码映射表,得到按时间顺序排列的多组时隙编码;其中,所述时隙编码包括类型编码以及标识编码;所述时隙编码映射表包括时隙类型,与所述时隙类型对应的类型编码,以及与所述类型编码对应的标识编码;生成所述目标通信网络对应的文件头;根据所述文件头以及多组时隙编码,生成所述目标通信网络的二进制的配置文件,用于进行目标通信网络的组网通信。如此,显著减小了配置文件的体积,降低了在网络传输中的带宽占用;同时,二进制格式的文件结构紧凑且规范,便于通信节点进行快速解析与加载,有效缩短了网络的初始化与组网时间;此外,通过预设的文件头与字节序组装,保证了配置文件的完整性与兼容性,提升了TDMA通信网络组网的效率与稳定性。
Smart Images

Figure CN122640450B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to network communication technology, and more particularly to a method and apparatus for generating configuration files based on time-slot coding. Background Technology
[0002] With the development of wireless communication technology, Time Division Multiple Access (TDMA) technology has been widely used in tactical communications, industrial IoT, and ad hoc networks due to its high efficiency and deterministic latency. In a TDMA communication system, network nodes need to communicate according to a unified scheduling strategy, which is usually distributed to each node in the form of a configuration file to ensure time slot synchronization across the entire network.
[0003] Currently, existing TDMA network configuration file generation methods typically use text formats (such as XML and JSON) or common structured data formats to describe time slot allocation information. These methods encapsulate information such as time slot type and device ID in redundant tags, resulting in large configuration files. Due to the bloated size of these files, network initialization time becomes excessively long when transmitted over bandwidth-constrained wireless channels, making it difficult to meet the requirements of modern communication for rapid network deployment. Furthermore, parsing text formats consumes significant computing resources and memory from node devices, increasing power consumption and parsing latency for resource-constrained embedded terminals. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for generating configuration files based on time slot coding, so as to achieve efficient, fast and stable networking of TDMA communication networks.
[0005] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:
[0006] According to a first aspect of the present invention, a method for generating configuration files based on time slot coding is provided, comprising:
[0007] Obtain node information in the target communication network;
[0008] Based on the node information in the target communication network, and using a preset time slot coding mapping table, multiple sets of time slot codes arranged in chronological order are obtained; wherein, the time slot codes include type codes and identifier codes; the time slot coding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes;
[0009] Generate the file header corresponding to the target communication network;
[0010] Based on the file header and multiple sets of time slot codes, a binary configuration file for the target communication network is generated for network communication of the target communication network.
[0011] Optionally, the step of obtaining multiple sets of time slot codes arranged in chronological order based on node information in the target communication network and a preset time slot coding mapping table includes:
[0012] Based on the node information in the target communication network, a time slot information unit is determined; wherein, the time slot information unit includes a time slot type and a device identifier corresponding to the time slot type;
[0013] Based on the preset time slot coding mapping table, each time slot information unit is encoded to obtain the time slot code corresponding to the time slot information unit.
[0014] Optionally, if the time slot type is a common time slot type, the identifier code in the time slot code is a preset invalid value; if the time slot type is a device-associated time slot type, the identifier code in the time slot code is the device number associated with the device.
[0015] Optionally, the time slot encoding is an n-bit binary encoding, wherein m bits of the n-bit binary encoding are type encodings, p bits of the n-bit binary encoding are identifier encodings, and the sum of p and m is n.
[0016] Optionally, n is 16, m is 4, and p is 12.
[0017] Optionally, the file header includes a magic number field, version number length, version number, maximum number of time slots, and time slot width.
[0018] Optionally, the target communication network is a TDMA communication network, and the configuration file is used to drive the nodes in the TDMA communication network to perform time-slot synchronization communication.
[0019] According to a second aspect of the present invention, a configuration file generation apparatus based on time slot coding is provided, comprising:
[0020] The acquisition module is used to acquire node information in the target communication network;
[0021] The encoding module is used to obtain multiple sets of time slot codes arranged in chronological order based on node information in the target communication network and a preset time slot encoding mapping table; wherein, the time slot codes include type codes and identifier codes; the time slot encoding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes;
[0022] The generation module is used to generate the file header corresponding to the target communication network;
[0023] The configuration module is used to generate a binary configuration file of the target communication network based on the file header and multiple sets of time slot codes, for network communication of the target communication network.
[0024] According to a third aspect of the present invention, an electronic device is provided, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned configuration file generation method based on time slot coding.
[0025] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the aforementioned time-slot-coded configuration file generation method.
[0026] The above-described one or more technical solutions in the embodiments of this specification have at least the following technical effects:
[0027] This specification provides a method and apparatus for generating a configuration file based on time slot coding. First, node information in a target communication network is obtained. Based on the node information in the target communication network and a preset time slot coding mapping table, multiple sets of time slot codes arranged in chronological order are obtained. Each time slot code includes a type code and an identifier code. The time slot coding mapping table includes a time slot type, a type code corresponding to the time slot type, and an identifier code corresponding to the type code. A file header corresponding to the target communication network is generated. Based on the file header and the multiple sets of time slot codes, a binary configuration file for the target communication network is generated for network communication. This significantly reduces the size of the configuration file and lowers bandwidth usage in network transmission. Simultaneously, the compact and standardized binary file structure facilitates rapid parsing and loading by communication nodes, effectively shortening network initialization and networking time. Furthermore, the preset file header and byte order assembly ensure the integrity and compatibility of the configuration file, improving the efficiency and stability of TDMA communication network networking. Attached Figure Description
[0028] Figure 1 A flowchart of a configuration file generation method based on time slot coding in an embodiment of the present invention is shown.
[0029] Figure 2 A block diagram of a configuration file generation device based on time slot coding according to an embodiment of the present invention is shown. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0031] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0032] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0033] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0034] Combination Figure 1 As shown, the present invention provides a configuration file generation method based on time slot coding, the method comprising steps 101 to 104:
[0035] Step 101: Obtain node information in the target communication network;
[0036] Step 102: Based on the node information in the target communication network and a preset time slot coding mapping table, obtain multiple sets of time slot codes arranged in chronological order; wherein, the time slot codes include type codes and identifier codes; the time slot coding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes;
[0037] Step 103: Generate the file header corresponding to the target communication network;
[0038] Step 104: Generate a binary configuration file of the target communication network based on the file header and multiple sets of time slot codes, for use in network communication of the target communication network.
[0039] In this embodiment, the target communication network is a TDMA (Time Division Multiple Access) communication network. In a TDMA communication network, all nodes (such as mobile phones, IoT devices, etc.) use the same frequency for communication. A TDMA communication network divides continuous time into extremely short, periodic time slots.
[0040] In this embodiment, node information refers to a set of data used to uniquely identify the identity attributes, functional roles, and communication resource requirements of each communication node in the TDMA communication network. The node information is the original basis for generating the time slot configuration file. Node information may include device identifiers, node types, service requirement parameters, etc.
[0041] A device identifier is a unique code used to distinguish different devices within a network. For example, a device identifier can be the device's MAC address, serial number (SN), or a user-defined number. It should be noted that when generating timeslot codes, this device identifier can be mapped to the identifier code portion of the timeslot code, used by the network receiver to confirm data ownership.
[0042] Node type is used to characterize the role or hardware attribute of a device in the network topology. Node types can include broadcast nodes, access nodes, terminal nodes, etc.
[0043] Broadcast nodes typically act as information transmission sources or beacon nodes in a network, primarily responsible for periodically sending synchronization signals, system broadcast messages, or public control information to other nodes within the network.
[0044] Access nodes typically serve as the core aggregation point or base station of the network, and are mainly responsible for managing network resources, coordinating time slot allocation, receiving uplink data from terminal nodes, and issuing control commands.
[0045] Terminal nodes typically function as edge devices or user terminals in a network. Their primary responsibility is to send service data to access nodes within their allocated dedicated time slots and to receive downlink information from broadcast nodes or access nodes.
[0046] Service requirement parameters describe the specific bandwidth or latency requirements of the node during communication. These include, for example, the "required number of uplink time slots," "maximum allowable transmission latency," and "data transmission frequency." Based on these service requirement parameters, the system can dynamically calculate the required time slot length or period for the node, thus enabling on-demand allocation.
[0047] After obtaining the node information, multiple sets of time slot codes arranged in chronological order can be obtained based on the node information in the target communication network and a preset time slot coding mapping table.
[0048] Specifically, a time slot information unit can be determined based on the node information in the target communication network; wherein, the time slot information unit includes a time slot type and a device identifier corresponding to the time slot type;
[0049] Based on the preset time slot coding mapping table, each time slot information unit is encoded to obtain the time slot code corresponding to the time slot information unit.
[0050] Based on the degree of association with the device, the time slot type can be divided into two categories: common time slot type and device-associated time slot type. Common time slot type can include broadcast time slots, shared time slots, etc.; device-associated time slot type can include access node time slots, terminal node time slots, uplink control time slots, downlink control time slots, etc.
[0051] When determining the device identifier of a time slot information unit, it can be determined through the device identifier in the node information. The time slot type in a time slot information unit can be determined through the node type in the node information.
[0052] By binding time slot types with device identifiers, the purpose and ownership of each time slot can be clearly defined.
[0053] The preset time slot coding mapping table includes a time slot type, a type code corresponding to the time slot type, and an identifier code corresponding to the type code.
[0054] Once the time slot information element is determined, the corresponding time slot code can be determined by looking up a table.
[0055] Optionally, the time slot coding is an n-bit binary code, where m bits are the type code, p bits are the identifier code, and the sum of p and m is n.
[0056] For example, if n is 16, m is 4, and p is 12, then the total length of the timeslot code is 16 bits, using a high-low bit partitioning design, where the high 4 bits are the timeslot type code and the low 12 bits are the code corresponding to the device identifier;
[0057] It should be noted that the time slot type, based on its association with the device, can be divided into two categories: common time slot type and device-associated time slot type. If the time slot type is a common time slot type, the identifier code in the time slot encoding is a preset invalid value; the time slot corresponding to this type is not bound to a specific device, and the lower 12 bits of the device identifier field are invalid (fixed to 0x000), applicable to common time slots such as broadcast time slots and isolated time slots.
[0058] If the time slot type belongs to the device-associated time slot type, then the identifier code in the time slot code is the device number associated with that device. The time slot corresponding to this type is bound to a specific device, and the lower 12 bits of the device identifier field are the actual device number (0x001-0xFFF). This is applicable to time slots such as service time slots that correspond one-to-one with devices, realizing the precise association between time slots and devices.
[0059] In this embodiment, the configuration file is used to drive nodes in the TDMA communication network to perform time-slot synchronization communication. The configuration file consists of two parts: a file header and a time-slot data area composed of multiple sets of time-slot codes.
[0060] The file header adopts a fixed-length design and contains several key fields to realize file self-description, version adaptation and legality verification. For specific field definitions, please refer to the file header field table in the specific implementation.
[0061] The time slot data area follows the file header and is stored in the form of a 16-bit binary array (i.e., time slot encoding). Each element in the array corresponds to the 16-bit encoded data of a time slot, arranged sequentially according to the time slot number. The structure is compact and facilitates fast reading and parsing.
[0062] The file header includes the magic number field, version number length, version number, maximum number of time slots, and time slot width.
[0063] For example, the binary file header is a fixed-length structure with a total length of 16 bytes. The offset, length, and meaning of each field are shown below. All fields are stored in little-endian byte order:
[0064] The magic number field, 2 bytes, with a fixed value of 0xABCD, is used to identify the file format;
[0065] Version number length, 1 byte, the length of the version number string;
[0066] Version number, variable length, UTF-8 encoded version number string;
[0067] Maximum number of time slots, 2 bytes, unsigned short integer, range 0-256;
[0068] Time slot width, 4 bytes, unsigned integer, in microseconds.
[0069] The following provides a complete example of a timeslot configuration binary file, including the file header and timeslot data area. The specific hex dump (hexadecimal) is shown below, along with a corresponding explanation of the parsing process:
[0070] Hex dump sequence (in byte order): CD AB 03 31 2E 30 00 00 00 00 04 00 E8 03 0000 00 00 01 60 02 70 00 20
[0071] Analysis process:
[0072] File header parsing (first 16 bytes):
[0073] 0xCD AB: The read byte sequence is 0xCD 0xAB. Parsing it in little-endian byte order corresponds to the magic value 0xABCD, confirming that the file is valid.
[0074] 0x03: Version number length, indicating that the subsequent version number string occupies 3 bytes;
[0075] 0x31 2E 30 00 00 00 00: The version number is a fixed 7-byte area. The first 3 bytes are the UTF-8 encoded version number "1.0", and the last 4 bytes are filled with 0x00.
[0076] 0x04 00: Maximum number of time slots, little-endian byte order, corresponding to 0x0004 (4 time slots);
[0077] 0xE8 03 00 00: Slot width, little-endian byte order, corresponding to 0x000003E8 (1000 microseconds);
[0078] Time slot data area parsing (last 8 bytes, i.e., 4 16-bit time slot codes, little-endian byte order):
[0079] 0x00 00: corresponds to the 16-bit timeslot code value 0x0000, with the high 4 bits being 0x0 (type index 0x0, broadcast timeslot, common timeslot type) and the low 12 bits being 0x000 (a preset invalid value that can be ignored and is fixed at 0x000).
[0080] 0x01 60: corresponds to the 16-bit timeslot code value 0x6001, with the high 4 bits being 0x6 (type index 0x6, access node timeslot, belonging to the device associated timeslot type) and the low 12 bits being 0x001 (the actual access node's device number).
[0081] 0x02 70: corresponds to the 16-bit timeslot code value 0x7002, with the high 4 bits being 0x7 (type index 0x7, terminal node timeslot, belonging to the device-associated timeslot type) and the low 12 bits being 0x002 (actual terminal device number).
[0082] 0x00 20: corresponds to the 16-bit time slot code value 0x2000, with the high 4 bits being 0x2 (type index 0x2, shared time slot, belonging to the common time slot type) and the low 12 bits being 0x000 (ignored, fixed as 0x000).
[0083] If the second time slot (access node time slot) is changed to a broadcast time slot, its encoding becomes 0x0000, and the corresponding hex is 0x00 0x00. At this time, the hex sequence of the time slot data area becomes 00 00 00 00 02 70 00 20. All time slots are restored to the basic type, not bound to a specific device, and are suitable for pure broadcast or shared frame structures.
[0084] The following example illustrates the specific process for generating and parsing configuration files:
[0085] First, determine the time slot type classification (e.g., common time slot type, device-associated time slot type, etc.) and the corresponding device identifier (the actual device number should be filled in for device-associated time slot type, and 0x000 for common time slot type); based on the time slot type, determine the type code in the time slot encoding; based on the device identifier corresponding to the time slot type, determine the identifier code in the time slot encoding. Combine the type code (high 4 bits) and the identifier code (low 12 bits) to generate a 16-bit time slot code; write all time slot codes sequentially into the time slot data area, and assemble them with the file header to form a complete binary configuration file.
[0086] When parsing the configuration file, the header of the binary configuration file is first read, and the parsing rules are determined by the version number field to verify the file's validity. Then, the array of 16-bit timeslot codes in the timeslot data area is read, and the timeslot type and device identifier of each timeslot are separated according to the high and low bits of the 16-bit code. The parsing method for the identifier code is determined based on the timeslot type classification. If it is a common timeslot type, the identifier code is ignored; if it is a device association type, the identifier code is extracted for subsequent device binding.
[0087] It should be noted that for time slots associated with device types, a mutual exclusion constraint is set between the device identifier and the time slot. That is, only one device identifier can be associated with the same time slot to avoid logical confusion of associating multiple devices with the same time slot and to ensure that the configuration data meets the timing requirements of the TDMA communication network.
[0088] In summary, the configuration file generation method based on time slot coding provided in this specification first obtains node information in the target communication network; based on the node information in the target communication network and a preset time slot coding mapping table, multiple sets of time slot codes arranged in chronological order are obtained; wherein, the time slot codes include type codes and identifier codes; the time slot coding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes; a file header corresponding to the target communication network is generated; based on the file header and the multiple sets of time slot codes, a binary configuration file of the target communication network is generated for network communication of the target communication network. This significantly reduces the size of the configuration file and lowers bandwidth consumption in network transmission; simultaneously, the binary format file structure is compact and standardized, facilitating rapid parsing and loading by communication nodes, effectively shortening network initialization and networking time; furthermore, the assembly of the configuration file through a preset file header and byte order ensures the integrity and compatibility of the configuration file, improving the efficiency and stability of TDMA communication network networking.
[0089] Based on the same inventive concept, combined with Figure 2 As shown, this embodiment of the invention also provides a configuration file generation apparatus based on time slot coding, comprising:
[0090] The acquisition module is used to acquire node information in the target communication network;
[0091] The encoding module is used to obtain multiple sets of time slot codes arranged in chronological order based on node information in the target communication network and a preset time slot encoding mapping table; wherein, the time slot codes include type codes and identifier codes; the time slot encoding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes;
[0092] The generation module is used to generate the file header corresponding to the target communication network;
[0093] The configuration module is used to generate a binary configuration file of the target communication network based on the file header and multiple sets of time slot codes, for network communication of the target communication network.
[0094] In one implementation, the encoding module is further configured to:
[0095] Based on the node information in the target communication network, a time slot information unit is determined; wherein, the time slot information unit includes a time slot type and a device identifier corresponding to the time slot type;
[0096] Based on the preset time slot coding mapping table, each time slot information unit is encoded to obtain the time slot code corresponding to the time slot information unit.
[0097] Optionally, if the time slot type is a common time slot type, the identifier code in the time slot code is a preset invalid value; if the time slot type is a device-associated time slot type, the identifier code in the time slot code is the device number associated with the device.
[0098] Optionally, the time slot encoding is an n-bit binary encoding, where m bits are the type encoding, p bits are the identifier encoding, and the sum of p and m is n.
[0099] Optionally, n is 16, m is 4, and p is 12.
[0100] Optionally, the file header includes a magic number field, version number length, version number, maximum number of time slots, and time slot width.
[0101] Optionally, the target communication network is a TDMA communication network, and the configuration file is used to drive the nodes in the TDMA communication network to perform time-slot synchronization communication.
[0102] In summary, the configuration file generation device based on time slot coding provided in this specification first obtains node information in a target communication network; based on the node information in the target communication network and a preset time slot coding mapping table, it obtains multiple sets of time slot codes arranged in chronological order; wherein, the time slot codes include type codes and identifier codes; the time slot coding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes; a file header corresponding to the target communication network is generated; based on the file header and the multiple sets of time slot codes, a binary configuration file of the target communication network is generated for network communication of the target communication network. This significantly reduces the size of the configuration file and lowers bandwidth consumption in network transmission; simultaneously, the binary format file structure is compact and standardized, facilitating rapid parsing and loading by communication nodes, effectively shortening network initialization and networking time; furthermore, the assembly of the configuration file through a preset file header and byte order ensures the integrity and compatibility of the configuration file, improving the efficiency and stability of TDMA communication network networking.
[0103] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the time-slot coding-based configuration file generation device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0104] Based on the same inventive concept, this embodiment provides an electronic device, including a configuration file generation device based on time slot coding, a memory, a processor, and a communication unit. The memory stores machine-readable instructions that can be executed by the processor. When the electronic device is running, the processor and the memory communicate through a bus. The processor executes the machine-readable instructions and performs the configuration file generation method based on time slot coding.
[0105] The memory, processor, and communication unit are electrically connected directly or indirectly to achieve signal transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The time-slot-coded configuration file generation device includes at least one software functional module that can be stored in the memory in the form of software or firmware. The processor is used to execute the executable module stored in the memory.
[0106] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc.
[0107] In some embodiments, the processor is used to perform one or more functions described in this embodiment. In some embodiments, the processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, the processor may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), an Application Specific Instruction-set Processor (ASIP), a Graphics Processing Unit (GPU), a Physics Processing Unit (PPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Device (PLD), a controller, a microcontroller unit, a Reduced Instruction Set Computing (RISC) computer, or a microprocessor, or any combination thereof.
[0108] In this embodiment, the memory is used to store the program, and the processor is used to execute the program after receiving the execution instruction. The process definition method disclosed in any implementation of this embodiment can be applied to the processor, or implemented by the processor.
[0109] The communication unit is used to establish communication connections between electronic devices and other devices via a network, and to send and receive data via the network.
[0110] In some implementations, the network can be any type of wired or wireless network, or a combination thereof. By way of example only, the network may include wired networks, wireless networks, fiber optic networks, telecommunications networks, intranets, the Internet, local area networks (LANs), wide area networks (WANs), wireless local area networks (WLANs), metropolitan area networks (MANs), public switched telephone networks (PSTNs), Bluetooth networks, ZigBee networks, or near field communication (NFC) networks, or any combination thereof.
[0111] In this embodiment, the electronic device may be, but is not limited to, a laptop, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other electronic devices. This embodiment does not impose any restrictions on the specific type of electronic device.
[0112] Based on the above, this embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the configuration file generation method based on time slot coding of any of the foregoing embodiments.
[0113] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the computer-readable storage medium described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0114] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating configuration files based on time-slot coding, characterized in that, include: Obtain node information in the target communication network; Based on the node information in the target communication network, and using a preset time slot coding mapping table, multiple sets of time slot codes arranged in chronological order are obtained; wherein, the time slot codes include type codes and identifier codes; the node information includes device identifiers used to distinguish different devices in the network, and the device identifiers are mapped to the identifier code portion of the time slot codes; the time slot coding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes; Generate the file header corresponding to the target communication network; Based on the file header and multiple sets of time slot codes, a binary configuration file for the target communication network is generated for network communication of the target communication network.
2. The method according to claim 1, characterized in that, The step of obtaining multiple sets of time slot codes arranged in chronological order based on node information in the target communication network and a preset time slot coding mapping table includes: Based on the node information in the target communication network, a time slot information unit is determined; wherein, the time slot information unit includes a time slot type and a device identifier corresponding to the time slot type; Based on the preset time slot coding mapping table, each time slot information unit is encoded to obtain the time slot code corresponding to the time slot information unit.
3. The method according to claim 2, characterized in that, If the time slot type is a common time slot type, the identifier code in the time slot code is a preset invalid value; if the time slot type is a device-associated time slot type, the identifier code in the time slot code is the device number associated with that device.
4. The method according to claim 1, characterized in that, The time slot encoding is an n-bit binary encoding, where m bits of the n-bit binary encoding are type encodings, p bits of the n-bit binary encoding are identifier encodings, and the sum of p and m is n.
5. The method according to claim 4, characterized in that, The value of n is 16, the value of m is 4, and the value of p is 12.
6. The method according to claim 1, characterized in that, The file header includes a magic number field, version number length, version number, maximum number of time slots, and time slot width.
7. The method according to claim 1, characterized in that, The target communication network is a TDMA communication network, and the configuration file is used to drive the nodes in the TDMA communication network to perform time-slot synchronization communication.
8. A configuration file generation device based on time slot coding, characterized in that, include: The acquisition module is used to acquire node information in the target communication network; An encoding module is used to obtain multiple sets of time slot codes arranged in chronological order based on node information in the target communication network and a preset time slot encoding mapping table; wherein, the time slot codes include type codes and identifier codes; the node information includes device identifiers used to distinguish different devices in the network, and the device identifiers are mapped to the identifier code portion of the time slot codes; the time slot encoding mapping table includes time slot types, type codes corresponding to the time slot types, and identifier codes corresponding to the type codes; The generation module is used to generate the file header corresponding to the target communication network; The configuration module is used to generate a binary configuration file of the target communication network based on the file header and multiple sets of time slot codes, for network communication of the target communication network.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the configuration file generation method based on time slot coding as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the configuration file generation method based on time slot coding as described in any one of claims 1-7.
Citation Information
Patent Citations
Adaptive modulation and coding adjustment method, device and equipment
CN114696945A
QoS time slot distribution method and system in TDMA ad hoc network
CN119485758A
