Single-node gateway intelligent scheduling method, system and device and storage medium
By combining protocol detectors and two-layer schedulers with reinforcement learning, multi-protocol intelligent scheduling of IoT devices was achieved, solving the problems of frequent changes in data semantic models and static configuration of resource scheduling, and improving the flexibility and stability of the system.
Patent Information
- Application Number
- CN202511349103.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-06
AI Technical Summary
In existing technologies, the coexistence of multiple protocols in IoT devices leads to frequent changes in data semantic models, lack of a unified data abstraction layer, static configuration of resource scheduling strategies that cannot be dynamically adjusted, inability to achieve cross-protocol and cross-node collaborative optimization and elastic scaling, and lack of runtime load status awareness.
It employs a protocol detector to automatically identify protocol families, encapsulates data in USP format, and combines a two-layer scheduler and reinforcement learning methods to achieve load-aware dynamic scheduling, supporting intelligent scheduling and offloading of multiple protocols.
It achieves unified semantic packet processing and dynamic resource scheduling for multi-protocol devices, improving the system's flexibility and stability, and supporting cross-protocol and cross-node collaborative optimization and elastic scaling.
Smart Images

Figure CN121283801A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of IoT edge computing technology, and particularly relates to a single-node gateway intelligent scheduling method, system, device and storage medium. Background Technology
[0002] With the development of the Internet of Things (IoT), the number of IoT devices connected to networks in large companies has exceeded one million. These include various controllers, sensors, actuators, and edge nodes in industrial settings, widely distributed across manufacturing lines, energy facilities, warehousing and logistics, and remote monitoring sites. However, due to the diverse sources of IoT devices, the long construction cycles, and the different technical approaches of manufacturers, multiple communication protocols such as MQTT, Modbus-TCP / RTU, OPC UA, and CoAP are commonly used. This results in a high degree of coupling and high cost at the gateway level, involving "multi-protocol adaptation—parsing—forwarding."
[0003] In existing technologies, to address the access complexity caused by the coexistence of multiple protocols in IoT devices, the current mainstream technical solutions mainly include the following three categories: Multi-protocol conversion gateways: These configure parsing rules for each protocol using a "template-script" approach, enabling rapid on-site access for multiple protocols; Workflow / script gateways: These gateways dynamically configure protocol processes through REST-API and script-based workflows, providing flexibility for developers; Node-level load balancing: By standardizing the minimum security configuration of TLS / DTLS in IoT, these gateways point out that a lack of runtime security can lead to risks of tampering and forgery.
[0004] The existing technology has the following technical problems: 1. The data semantic model changes with the underlying protocol, and upper-layer applications still need to be aware of and handle differences in field naming, units, and encoding between different protocols, lacking a unified data abstraction layer. At the same time, resource scheduling strategies are mostly statically configured and cannot be dynamically adjusted according to runtime load, limiting system elasticity.
[0005] 2. Parsing rules are scattered across various scripts, lacking a unified data structure description and verification mechanism, resulting in inconsistent data packet formats and ambiguous field semantics. Furthermore, due to the lack of awareness of runtime load status, load-based dynamic scheduling and closed-loop optimization cannot be implemented in millisecond-level control loops.
[0006] 3. Existing node-level load balancing methods mostly focus on communication security, but do not address the unified abstraction of protocol semantics, nor do they deeply integrate resource scheduling with protocol processing flow, making it difficult to achieve cross-protocol and cross-node collaborative optimization and elastic scaling. Summary of the Invention
[0007] This invention provides a single-node gateway intelligent scheduling method, system, device, and storage medium, aiming to solve the technical problem in the prior art that it is impossible to form a closed loop of "unified semantic packet + load-aware two-layer scheduling + reinforcement learning adaptive optimization" within a single gateway node.
[0008] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A single-node gateway intelligent scheduling method, comprising: It receives data from IoT devices using multiple communication protocols and automatically identifies the protocol family to which the IoT device data belongs through a protocol detector; Based on the protocol family described in the IoT device data, the corresponding protocol adapter is used to parse the IoT device data to obtain the parsed data; The parsed data is converted to USP format to obtain converted data; wherein, the USP format includes a header and a payload; The transformed data is sent to a two-level scheduler for task scheduling to obtain a scheduling strategy. The action value score after an action is performed is calculated using a reinforcement learning method, and the scheduling strategy is dynamically updated based on the action value score. During task execution according to the updated scheduling policy, the overall load of a single-node gateway is monitored in real time. When the overall load continues to be higher than the load threshold and exceeds the preset time, the task unloading process is triggered and an unloading task is generated. The unloading task is packaged into an OCI image and pushed to the access point. When the overall load is lower than the load threshold and the scheduling window is idle, the OCI image is pulled from the access point and execution is resumed.
[0009] Furthermore, the aforementioned automatic identification of the protocol family to which the IoT device data belongs via the protocol detector specifically includes: The communication messages are automatically identified and processed by the protocol detector to obtain identification data; Based on the port number, first packet characteristics, or half-byte start character, the identification data is matched with a preset protocol family, and it is determined whether the match is successful: If a match is found, the corresponding protocol family will be output. If a match fails, the feature learning branch based on the Naive Bayes model is invoked to classify the protocol and obtain the corresponding protocol family.
[0010] Furthermore, the data obtained from the analysis specifically includes: Obtain data from IoT devices, match the hash table maintained internally by the protocol adapter according to the corresponding protocol type, and obtain the parsed data; If a match fails in the local hash table, the IoT device data is parsed, field structure information is extracted and mapped to obtain a field mapping table. The field mapping table is then registered in the template repository and a unique version identifier is written back. Parsed data is generated based on the unique version identifier.
[0011] Furthermore, the aforementioned header includes: proto_id, codec_id, ver, and payload_len; the payload is serialized using a CBORmap structure, all keys and values are replaced with 8-bit dictionary indices instead of the original strings, and a system-level status field is set at the end.
[0012] Furthermore, the aforementioned two-layer scheduler includes a resource quota layer and a task scheduling layer; The resource quota layer is used to calculate the CPU resources that can be allocated to each communication protocol based on the current proportion of available CPU resources and the service importance of each protocol family, as shown in the following formula: quota_cpu[pf]=ρ_cpu*SLA_weight(pf) Where ρ_cpu represents the proportion of available CPU resources, and SLA_weight(pf) represents the weight of the communication protocol, with a value range of 0.1 to 1.0; The task scheduling layer is used to calculate the overall load based on CPU utilization, memory usage, power consumption, and temperature, and to generate a scheduling strategy based on the CPU resources that can be allocated to each communication protocol and the overall load. The overall load is calculated as follows: W=ω1·CPU+ω2·Mem+ω3·Power+ω4·Temp Where ω1, ω2, ω3 and ω4 represent the preset first weight, second weight, third weight and fourth weight respectively, CPU represents CPU utilization, Mem represents memory usage, Power represents power consumption and Temp represents temperature.
[0013] Furthermore, the reinforcement learning method described above is the Q-learning reinforcement learning method, and the action value score after performing the action is calculated as shown in the following formula: Q(s,a)←(1–η)Q+η[R+γmaxQ'] Where Q(s,a) represents the action value score after performing action a in state s, η represents the learning rate, Q represents the current action value score, R represents the reward value after performing action a, γ represents the discount factor, and maxQ' represents the expected value of the action value score.
[0014] Furthermore, after the aforementioned unloading task is packaged into an OCI image and pushed to the access point, the access point starts a container to execute the task, and the central node receives and transmits the task's running logs and status information in real time through gRPC streaming communication.
[0015] Secondly, to solve the above-mentioned technical problems, the present invention also provides a single-node gateway intelligent scheduling system, comprising: The data receiving module is used to receive data from IoT devices using various communication protocols and to automatically identify the protocol family to which the IoT device data belongs through a protocol detector. The data parsing module is used to parse the IoT device data according to the protocol family described in the IoT device data and use the corresponding protocol adapter to obtain parsed data. The data conversion module is used to convert the format of the parsed data into the USP format to obtain converted data; wherein the USP format includes a header and a payload; The scheduling strategy module is used to send the transformed data into a two-level scheduler for task scheduling to obtain a scheduling strategy. The policy update module is used to calculate the action value score after the action is executed based on the reinforcement learning method, and to dynamically update the scheduling policy based on the action value score. The unloading and recycling module is used to monitor the overall load of a single-node gateway in real time during task execution according to the updated scheduling policy. When the overall load is continuously higher than the load threshold and exceeds the preset time, the task unloading process is triggered and an unloading task is generated. The unloading task is packaged into an OCI image and pushed to the access point. When the overall load is lower than the load threshold and the scheduling window is idle, the OCI image is pulled from the access point and execution is resumed.
[0016] Thirdly, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the single-node gateway intelligent scheduling method of the present application.
[0017] Fourthly, in order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the single-node gateway intelligent scheduling method of the present application.
[0018] Compared with the prior art, the present invention has the following advantages: 1. This invention uses a hybrid identification mechanism that combines a protocol detector with port and message feature matching and a Naive Bayes model. This not only supports the rapid classification of known protocols, but also enables intelligent identification of unknown or variant protocols, significantly improving the gateway's access compatibility and scalability for heterogeneous IoT devices.
[0019] 2. This invention uses the compact USP format to encapsulate data. The header contains metadata such as protocol, encoding, and version. The payload uses CBOR encoding and replaces strings with 8-bit dictionary indexes, which greatly compresses the data volume. The end is appended with a system-level status field sys.loadHint to achieve context awareness and provide a data foundation for intelligent scheduling.
[0020] 3. This invention employs a two-layer scheduling architecture. The first layer, the quota layer, dynamically allocates resources for each protocol family based on available CPU resources and SLA weights to prevent resource contention. The second layer, the scheduling layer, combines comprehensive load W (weighted by CPU, memory, power consumption, and temperature) for fine-grained scheduling, ensuring that critical tasks are executed first and improving system stability.
[0021] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A flowchart illustrating a single-node gateway intelligent scheduling method according to an embodiment of the present invention is shown. Figure 2 A schematic diagram of the structure of a single-node gateway intelligent scheduling system according to an embodiment of the present invention is shown; Figure 3 A schematic diagram of an electronic device structure according to an embodiment of the present invention is shown. Detailed Implementation
[0024] 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, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Figure 1 A flowchart illustrating a single-node gateway intelligent scheduling method according to an embodiment of the present invention is shown, as follows: Figure 1 As shown, an embodiment of the present invention provides a single-node gateway intelligent scheduling method, comprising: It receives data from IoT devices using multiple communication protocols and automatically identifies the protocol family to which the IoT device data belongs through a protocol detector; Based on the protocol family described in the IoT device data, the corresponding protocol adapter is used to parse the IoT device data to obtain the parsed data; The parsed data is converted to USP format to obtain converted data; wherein, the USP format includes a header and a payload; The transformed data is sent to a two-level scheduler for task scheduling to obtain a scheduling strategy. The action value score after an action is performed is calculated using a reinforcement learning method, and the scheduling strategy is dynamically updated based on the action value score. During task execution according to the updated scheduling policy, the overall load of a single-node gateway is monitored in real time. When the overall load continues to be higher than the load threshold and exceeds the preset time, the task unloading process is triggered and an unloading task is generated. The unloading task is packaged into an OCI image and pushed to the access point. When the overall load is lower than the load threshold and the scheduling window is idle, the OCI image is pulled from the access point and execution is resumed.
[0026] In this embodiment, the communication protocols include MQTT, Modbus-TCP / RTU, OPC UA, and CoAP. All protocol parsers, scheduling policies, and model files are encapsulated as standard OCI image layers. During upgrades, the central node only distributes the base layer and delta layer. The smart gateway pulls the image layer through the containerd client, mounts it locally using the unionfs file system, and enables hot updates. For 50 MB incremental packets, the average upgrade time is only 3.2 minutes, significantly reducing bandwidth consumption and ensuring business continuity.
[0027] Optionally, automatically identifying the protocol family to which the IoT device data belongs through the protocol detector specifically includes: The communication messages are automatically identified and processed by the protocol detector to obtain identification data; Based on the port number, first packet characteristics, or half-byte start character, the identification data is matched with a preset protocol family, and it is determined whether the match is successful: If a match is found, the corresponding protocol family will be output. If a match fails, the feature learning branch based on the Naive Bayes model is invoked to classify the protocol and obtain the corresponding protocol family.
[0028] Optionally, the parsed data may specifically include: Obtain data from IoT devices, match the hash table maintained internally by the protocol adapter according to the corresponding protocol type, and obtain the parsed data; If a match fails in the local hash table, the IoT device data is parsed, field structure information is extracted and mapped to obtain a field mapping table. The field mapping table is then registered in the template repository and a unique version identifier is written back. Parsed data is generated based on the unique version identifier.
[0029] In this embodiment, a unique template_hash is calculated using SHA-256 or a lightweight hash algorithm as a unique version identifier for rapid matching and version management of subsequent packets. In subsequent packet processing, when the same device sends data again, the protocol adapter looks up the local hash table using protocol + template_hash, directly loads the corresponding field mapping rules, and quickly completes data parsing without having to repeatedly analyze the structure.
[0030] Optionally, the header includes: proto_id, codec_id, ver, and payload_len; the payload is serialized using a CBORmap structure, all keys and values are replaced with 8-bit dictionary indices instead of the original strings, and a system-level status field is set at the end.
[0031] In this embodiment, `proto_id` (1 byte): protocol identifier, indicating the protocol type; `codec_id` (1 byte): encoder identifier, indicating the encoding method used by the payload; `ver` (1 byte): version number, used to identify the version of the USP encapsulation format; `payload_len` (2 bytes): payload length. A system-level status field `sys.loadHint{cpu,mem,pwr,temp}` is fixedly appended to the end of the payload. This field contains the current gateway's runtime resource status: `cpu`: CPU utilization; `mem`: memory usage; `pwr`: power consumption; `temp`: device temperature. Optionally, a `delta_seq` field and / or a `patch_list` field can also be appended to the end of the payload for differential patch transmission.
[0032] Optionally, the two-layer scheduler includes a resource quota layer and a task scheduling layer; The resource quota layer is used to calculate the CPU resources that can be allocated to each communication protocol based on the current proportion of available CPU resources and the service importance of each protocol family, as shown in the following formula: quota_cpu[pf]=ρ_cpu*SLA_weight(pf) Where ρ_cpu represents the proportion of available CPU resources, and SLA_weight(pf) represents the weight of the communication protocol, with a value range of 0.1 to 1.0; The task scheduling layer is used to calculate the overall load based on CPU utilization, memory usage, power consumption, and temperature, and to generate a scheduling strategy based on the CPU resources that can be allocated to each communication protocol and the overall load. The overall load is calculated as follows: W=ω1·CPU+ω2·Mem+ω3·Power+ω4·Temp Where ω1, ω2, ω3 and ω4 represent the preset first weight, second weight, third weight and fourth weight respectively, CPU represents CPU utilization, Mem represents memory usage, Power represents power consumption and Temp represents temperature.
[0033] In this embodiment, the gateway performs resource evaluation and quota updates at a fixed period Δt (default 200 milliseconds) to ensure timely response. Within each period, the system statistically analyzes the input queues of each protocol family (such as MQTT, Modbus, OPCUA, etc.), collecting the P90 arrival rate or P90 packet length of their data packets. The task scheduling layer sorts tasks based on their criticality and priority, and formulates scheduling strategies.
[0034] Optionally, the reinforcement learning method is Q-learning reinforcement learning, and the action value score after performing the action is calculated as shown in the following formula: Q(s,a)←(1–η)Q+η[R+γmaxQ'] Where Q(s,a) represents the action value score after performing action a in state s, η represents the learning rate, Q represents the current action value score, R represents the reward value after performing action a, γ represents the discount factor, and maxQ' represents the expected value of the action value score.
[0035] In this embodiment, the state s is abstracted as a two-dimensional vector, S = ⟨W_bucket, queue_len_bucket>, where W_bucket represents the level of the overall load W, divided into 10 intervals, and queue_len_bucket represents the level of the current task queue length, also divided into 10 intervals. Therefore, the state s is discretized into a 10×10 grid space. Under each state S, the executable action A is as follows: A={↑T1,↓T1,adjust_ω,offload_k} Where ↑T1 means increasing the load threshold T1, ↓T1 means decreasing the load threshold T1, adjust_ω means adjusting the weight coefficients ω1~ω4, offload_k means unloading k non-critical tasks, and optionally, select up to 3 (k≤3) low-priority tasks from the tail of the task queue, package them and send them to the access point.
[0036] After each action A is performed, the reward value is calculated as shown in the following formula: R=–(α·latency_avg+β·power_avg) Where α and β represent weights, in this embodiment, α can be 0.7 and β can be 0.3, latency_avg represents the average processing latency of the task and power_avg represents the average power consumption of the system.
[0037] In this embodiment, in the formula for calculating the action value score, η can be 0.1, γ can be 0.9, and ε-greedy exploration decays to 0.05 with each cycle.
[0038] Optionally, after the unloading task is packaged into an OCI image and pushed to the access point, the access point starts a container to execute the task, and the central node receives and transmits the task's running logs and status information in real time through gRPC streaming communication.
[0039] In this embodiment, the overall load W of the gateway is continuously monitored. When W > T2(T1+15%) and lasts for 1 second, non-critical containers are converted into OCI images and pushed to the access point.
[0040] Based on and Figure 1 Using the same principle as the method shown, this embodiment of the invention also provides a single-node gateway intelligent scheduling system, such as... Figure 2 As shown, it includes: The data receiving module is used to receive data from IoT devices using various communication protocols and to automatically identify the protocol family to which the IoT device data belongs through a protocol detector. The data parsing module is used to parse the IoT device data according to the protocol family described in the IoT device data and use the corresponding protocol adapter to obtain parsed data. The data conversion module is used to convert the format of the parsed data into the USP format to obtain converted data; wherein the USP format includes a header and a payload; The scheduling strategy module is used to send the transformed data into a two-level scheduler for task scheduling to obtain a scheduling strategy. The policy update module is used to calculate the action value score after the action is executed based on the reinforcement learning method, and to dynamically update the scheduling policy based on the action value score. The unloading and recycling module is used to monitor the overall load of a single-node gateway in real time during task execution according to the updated scheduling policy. When the overall load is continuously higher than the load threshold and exceeds the preset time, the task unloading process is triggered and an unloading task is generated. The unloading task is packaged into an OCI image and pushed to the access point. When the overall load is lower than the load threshold and the scheduling window is idle, the OCI image is pulled from the access point and execution is resumed.
[0041] In this embodiment, a three-tier deployment of "central node - access point - smart gateway" is adopted: Central node: Responsible for receiving and unloading tasks, storing scheduling strategy models, and distributing differential OTA (Over-The-Air) updates.
[0042] Access point: Located in the core of the local area network, it provides caching, offloading of warm backup resources, and log aggregation.
[0043] Intelligent gateway: Deployed on the field side, all core modules of this invention are encapsulated in this node.
[0044] The single-node gateway intelligent scheduling system of this invention can execute the single-node gateway intelligent scheduling method provided in this invention. The implementation principle is similar. The actions performed by each module and unit in the single-node gateway intelligent scheduling system in each embodiment of this invention correspond to the steps in the single-node gateway intelligent scheduling method in each embodiment of this invention. For detailed functional descriptions of each module of the single-node gateway intelligent scheduling system, please refer to the descriptions in the corresponding single-node gateway intelligent scheduling methods shown above, which will not be repeated here.
[0045] The aforementioned single-node gateway intelligent scheduling system can be a computer program (including program code) running on a computer device, such as an application software; the application software can be used to execute the corresponding steps in the method provided in the embodiments of the present invention.
[0046] The modules described in the embodiments of the present invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0047] Based on the same principles as the methods shown in the embodiments of the present invention, the embodiments of the present invention also provide an electronic device, which may include, but is not limited to: a processor and a memory; the memory for storing computer programs; and the processor for executing the methods shown in any embodiment of the present invention by invoking the computer programs.
[0048] In one alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The illustrated electronic device includes a processor and a memory. The processor and memory are connected, for example, via a bus. Optionally, the electronic device may also include a transceiver, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver is not limited to one unit, and the structure of this electronic device does not constitute a limitation on the embodiments of the present invention.
[0049] The memory stores application code (computer program) that executes the present invention, and its execution is controlled by a processor. The processor executes the application code stored in the memory to implement the content shown in the foregoing method embodiments.
[0050] Among these, electronic devices can also be terminal devices. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0051] This invention provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.
[0052] According to another aspect of the present invention, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various embodiments described above.
[0053] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0054] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. A single-node gateway intelligent scheduling method, characterized in that, The method comprises: receiving Internet of Things device data from multiple communication protocols, and automatically identifying the protocol family to which the Internet of Things device data belongs through a protocol detector; parsing the Internet of Things device data according to the protocol family of the Internet of Things device data by using a corresponding protocol adapter to obtain parsed data; converting the format of the parsed data into a USP format to obtain converted data; wherein the USP format comprises a header and a payload; sending the converted data to a double-layer scheduler for task scheduling to obtain a scheduling strategy; calculating an action value score after an action is performed based on a reinforcement learning method, and dynamically updating the scheduling strategy based on the action value score; during task execution according to the updated scheduling strategy, monitoring the comprehensive load of a single-node gateway in real time, triggering a task offloading process and generating an offloading task when the comprehensive load continuously exceeds a load threshold and exceeds a preset time length, packaging the offloading task into an OCI image and pushing the OCI image to an access point; when the comprehensive load is lower than the load threshold and the scheduling window is idle, pulling the OCI image from the access point and resuming execution.
2. The single-node gateway intelligent scheduling method of claim 1, wherein, The automatic identification of the protocol family to which the Internet of Things device data belongs by the protocol detector specifically comprises: automatically identifying the communication message by the protocol detector to obtain identification data; matching the identification data with a preset protocol family based on a port number, a first packet feature or a half-byte starting symbol, and determining whether the matching is successful: if the matching is successful, outputting the corresponding protocol family; if the matching fails, calling a feature learning branch based on a Naive Bayes model to perform protocol classification to obtain the corresponding protocol family.
3. The single-node gateway intelligent scheduling method of claim 1, wherein, The parsed data specifically comprises: obtaining the Internet of Things device data, matching a hash table maintained inside the protocol adapter according to the corresponding protocol type to obtain the parsed data; if the matching fails in the local hash table, parsing the Internet of Things device data, extracting field structure information and performing mapping to obtain a field mapping table, registering the field mapping table in a template warehouse and writing back a unique version identifier, and generating parsed data based on the unique version identifier.
4. The single-node gateway intelligent scheduling method of claim 1, wherein, The header comprises proto_id, codec_id, ver and payload_len; the payload is serialized in a CBORmap structure, all keys and values are replaced by 8-bit dictionary indexes instead of original strings, and a system-level state field is set at the end.
5. The single-node gateway intelligent scheduling method of claim 1, wherein, The double-layer scheduler comprises a resource quota layer and a task scheduling layer; The resource quota layer is used to calculate the CPU resources that can be allocated to each communication protocol according to the current available CPU resource ratio and the business importance of each protocol family, as shown in the following formula: quota_cpu[pf]=ρ_cpu*SLA_weight(pf) wherein ρ_cpu represents the available CPU resource ratio, and SLA_weight(pf) represents the weight of the communication protocol, with a value range of 0.1-1.
0. The task scheduling layer is used to calculate the comprehensive load according to the CPU usage, the memory occupancy, the power consumption and the temperature, and generate a scheduling strategy based on the CPU resources that can be allocated by each communication protocol and the comprehensive load. The comprehensive load is calculated as follows: W = ω1·CPU + ω2·Mem + ω3·Power + ω4·Temp wherein ω1, ω2, ω3 and ω4 represent the first preset weight, the second preset weight, the third preset weight and the fourth preset weight respectively, CPU represents the CPU usage, Mem represents the memory occupancy, Power represents the power consumption, and Temp represents the temperature.
6. The single-node gateway intelligent scheduling method of claim 5, wherein, The reinforcement learning method is a Q-learning reinforcement learning method, and the action value score after executing an action is calculated as follows: Q(s, a)←(1–η)Q + η[R + γmaxQ’] wherein Q(s, a) represents the action value score after executing an action a in a state s, η represents the learning rate, Q represents the current action value score, R represents the reward value after executing the action a, γ represents the discount factor, and maxQ’ represents the expected value of the action value score.
7. The single-node gateway intelligent scheduling method of claim 1, wherein, After the offloading task is packaged as an OCI image and pushed to the access point, the access point starts a container to execute the task, and the central node receives and returns the running log and state information of the task in real time through gRPC streaming communication.
8. A single-node gateway intelligent dispatch system, characterized by, It comprises: a data receiving module, configured to receive Internet of Things device data from multiple communication protocols, and automatically identify the protocol family to which the Internet of Things device data belongs through a protocol detector; a data analysis module, configured to analyze the Internet of Things device data according to the protocol family thereof, using a corresponding protocol adapter, to obtain analysis data; a data conversion module, configured to convert the format of the analysis data into a USP format to obtain conversion data; wherein the USP format comprises a header and a payload; a scheduling strategy module, configured to send the conversion data to a double-layer scheduler for task scheduling to obtain a scheduling strategy; a strategy updating module, configured to calculate the action value score after executing an action based on a reinforcement learning method, and dynamically update the scheduling strategy based on the action value score; an offloading and recycling module, configured to monitor the comprehensive load of a single-node gateway in real time during the task execution process according to the updated scheduling strategy, trigger a task offloading process and generate an offloading task when the comprehensive load continuously exceeds a load threshold value and exceeds a preset time length, package the offloading task as an OCI image and push it to an access point, and pull the OCI image from the access point and resume execution when the comprehensive load is lower than the load threshold value and the scheduling window is idle.
9. An electronic device, comprising: The computer storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7.
10. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7.