Low-latency data concurrency processing system for internet of things terminals

By identifying event types and distributing them to dedicated thread pools, concurrently parsing JSON payloads, generating concurrent processing scheduling sequences, and adjusting instructions in real time, the latency and stability issues in concurrent data processing of IoT terminals are resolved, achieving efficient and low-latency data processing.

CN122053502BActive Publication Date: 2026-06-16XIAN DAMAI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN DAMAI NETWORK TECH CO LTD
Filing Date
2026-04-16
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

The concurrent processing of data from IoT terminals suffers from problems such as complex message types, chaotic processing, and a lack of real-time deviation perception and dynamic correction capabilities, leading to increased data processing latency and affecting the reliability of system operation.

Method used

The message distribution module identifies event types and distributes them to a dedicated thread pool. The data parsing and caching module converts them into data objects and categorizes them for caching. The scheduling sequence generation module generates concurrent processing scheduling sequences. The dynamic adjustment module obtains terminal and network status in real time to adjust instructions, achieving low-latency processing.

Benefits of technology

Significantly improves message access and distribution efficiency, reduces single-threaded pressure, significantly reduces end-to-end latency, improves resource utilization, and ensures stable processing capabilities under network fluctuations and mobile terminal scenarios, guaranteeing low-latency operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053502B_ABST
    Figure CN122053502B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of data concurrent processing, and specifically relates to a low-delay data concurrent processing system for an Internet of Things terminal, which comprises a message distribution module used for distributing original message data to a thread pool corresponding to an event type according to a preset corresponding mapping rule. A data analysis and caching module is used for classifying and caching data objects to a batch processing queue according to the types of the data objects. A scheduling sequence generation module is used for generating a concurrent processing scheduling sequence by using a fishing optimization algorithm. An initial instruction generation module is used for scheduling data in the batch processing queue according to the concurrent processing scheduling sequence to obtain initial processing instructions. A dynamic adjustment instruction module is used for adjusting the initial processing instructions according to real-time deviations to generate low-delay concurrent processing instructions. The application can significantly reduce end-to-end processing delay, greatly improve system throughput and resource utilization, and enhance the stability and adaptability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data concurrency processing technology, specifically a low-latency data concurrency processing system for Internet of Things (IoT) terminals. Background Technology

[0002] With the rapid development of IoT technology, the number of terminal devices has exploded, covering multiple scenarios such as industrial sensing, smart homes, and smart cities. The types of messages reported by various terminals are complex, including sensor data, alarm information, control commands, heartbeat signals, etc., and the data concurrency continues to rise, which puts forward extremely high requirements for the real-time performance and stability of data processing.

[0003] Currently, there are two core problems that urgently need to be solved in the concurrent data processing of IoT terminals. On the one hand, due to the heterogeneity of terminal types and the diversity of message topics, existing processing methods are unable to accurately identify the event type corresponding to the message and lack a scientific message distribution mechanism. This leads to mixed processing of various messages, chaotic thread pool allocation, and consequently thread blocking and increased data processing latency, making it unable to adapt to the high-concurrency access requirements of massive terminals.

[0004] On the other hand, IoT terminals are mostly in a dynamic operating state, and their positioning, data reporting rate, and network link status are prone to fluctuations. Existing processing methods lack real-time sensing capabilities, making it impossible to capture these state changes in a timely manner. They also cannot calculate the deviation between the scheduling sequence and the actual operating state, or the deviation in data stream transmission delay. This results in fixed and rigid processing instructions that cannot be dynamically adjusted. When network congestion, terminal movement, or data bursts occur, the fixed instructions cannot adapt to real-time changes, further exacerbating data processing delays and even leading to data loss, processing anomalies, and other problems. This seriously affects the operational reliability of the IoT system and makes it difficult to meet the low-latency, high-reliability requirements of IoT applications.

[0005] Therefore, developing a low-latency data concurrency processing system for IoT terminals to solve the above problems has become an urgent need in the current IoT technology field. Summary of the Invention

[0006] To overcome the shortcomings of existing technologies, this invention proposes a low-latency data concurrent processing system for IoT terminals. This invention primarily addresses the problems of complex message types, chaotic concurrent processing, and lack of real-time deviation perception and dynamic correction capabilities in IoT terminals.

[0007] The technical solution adopted by this invention to solve its technical problem is: a low-latency data concurrent processing system for IoT terminals provided by this invention, comprising:

[0008] The message distribution module is used to receive raw message data sent by IoT terminals, identify the event type according to the message topic, and distribute the raw message data to the thread pool corresponding to the event type according to the preset corresponding mapping rules.

[0009] The data parsing and caching module is used to concurrently parse the JSON payload of the raw message data in each thread pool, convert it into data objects, and cache them to the batch processing queue according to the type of the data objects.

[0010] The scheduling sequence generation module is used to obtain the source address, transmission path and edge-cloud network topology corresponding to the data stream in each thread pool, and generate a concurrent processing scheduling sequence using the fishing optimization algorithm.

[0011] The initial instruction generation module is used to schedule the data in the batch processing queue according to the concurrent processing scheduling sequence to obtain the initial processing instructions.

[0012] The dynamic adjustment instruction module is used to acquire terminal positioning signals, data reporting rates and network link status changes in real time. Based on preset requirements, it calculates scheduling sequence deviation and data stream transmission delay deviation as real-time deviations, adjusts the initial processing instructions, and generates low-latency concurrent processing instructions.

[0013] The low-latency data concurrency processing system for IoT terminals provided by this invention includes the following steps in the message distribution module for identifying event types:

[0014] The system receives raw message data in UDP / TCP packet format from IoT terminals via a preset communication protocol, performs verification and noise reduction to obtain processed message data.

[0015] The message data processing results are analyzed from three aspects: message header, message subject, and message payload, to obtain the message subject.

[0016] The message topic is split into multi-level feature items based on hierarchical separators, and then classified and named to form a structured feature list.

[0017] Based on the current business, the corresponding mapping rules are determined. A multi-feature joint matching strategy is used to match the structured feature list one by one. The matching degree of each matching rule is calculated, and the rule with the highest matching degree is selected as the event type corresponding to the current message.

[0018] The low-latency data concurrency processing system for IoT terminals provided by this invention includes the following steps in the message distribution module for distributing the thread pool:

[0019] The corresponding mapping rules are mapped to the thread pool according to the event type to obtain the event thread mapping rules.

[0020] A hash retrieval method is used to match the current event type with the event thread mapping rules to locate the thread pool mapping description data for the current event type.

[0021] The matching result is determined according to preset rules. If the match is successful, the corresponding thread pool is determined and the current thread pool status is recorded as a message to be dispatched. If the match fails, it is marked as a matching failure message.

[0022] The messages to be distributed are encapsulated into standardized thread pool task objects, and the corresponding delivery strategy is selected based on the current state of the thread pool for delivery.

[0023] The low-latency data concurrency processing system for IoT terminals provided by this invention includes the following steps in which the data parsing and caching module obtains data objects:

[0024] Idle worker threads in the thread pool retrieve messages to be dispatched according to the first-in-first-out principle, and then break them down into message header information and JSON payload.

[0025] Clean up the first and last characters of the JSON payload, convert the string to UTF-8 encoding, and perform length verification to generate the JSON payload string.

[0026] The JSON payload string is parsed according to JSON syntax rules using a pre-defined JSON parsing library, and the key-value pairs in the string are identified to obtain field information by recognizing the name and data type of each field.

[0027] According to the preset field mapping rules, the key-value pairs are matched one by one with the thread pool type to obtain the data transfer object, and the preliminary data object is generated by combining the field information.

[0028] The message header information is filled into the corresponding fields of the initial data object, and a unique identifier is added. The field names and field order are standardized to obtain the data object.

[0029] The low-latency data concurrent processing system for IoT terminals provided by this invention includes the following steps in the data parsing and caching module: classifying and caching data objects into a batch processing queue according to their type:

[0030] Extract the type identifier field and auxiliary classification information from the data object to generate a unique classification identifier, and set up a dedicated processing queue corresponding to the event type as a queue mapping table.

[0031] The system retrieves and matches data in the queue mapping table based on the unique classification identifier to determine the target processing queue and location data corresponding to the current data object.

[0032] According to the format requirements of the target processing queue, the current data object is encapsulated to generate a queue task unit. A connection is established with the queue task unit based on the location data. The data is then inserted into the tail of the target processing queue according to the generation order of the current data object to obtain the batch processing queue.

[0033] The low-latency data concurrent processing system for IoT terminals provided by this invention includes a scheduling sequence generation module comprising:

[0034] The scheduling task generation unit is used to obtain node monitoring indicators and network performance monitoring data based on the current edge-cloud topology, and encapsulate them into scheduling task input by combining the source address and transmission path.

[0035] The scheduling problem definition unit is used to define the artificial fish positions based on the total number of data streams to be scheduled and the scheduling task input. Each artificial fish represents a set of scheduling schemes, and the optimization objective is determined according to the target requirements.

[0036] The fitness calculation unit is used to randomly generate multiple artificial fish. The position of each fish represents a random scheduling sequence. An initial fish population is constructed. For each artificial fish, the corresponding fitness value is calculated, and the artificial fish with the highest fitness value is selected as the global optimal fish.

[0037] The individual movement unit is used to randomly select a position within the field of view of the current artificial fish, determine whether the fitness value of the current artificial fish is greater than the fitness value of the initial artificial fish, and if so, move in that direction to obtain a refreshed artificial fish individual.

[0038] The cluster behavior unit is used to count the number of neighboring fish within the field of view, calculate the neighborhood center position and the corresponding center fitness value, determine whether it is crowded, and if not, move to the neighborhood center position to obtain the center fish individual.

[0039] The tail-chasing behavior unit is used to approach the globally optimal fish, select the neighboring fish with the highest fitness value in the field of vision, and determine whether the surrounding crowding level meets the preset crowding threshold. If so, it moves towards the neighboring fish.

[0040] The scheduling sequence output unit is used to select the scheduling scheme corresponding to the artificial fish individual with the highest fitness value as the concurrent processing scheduling sequence after iterating to a preset number of iterations.

[0041] The low-latency data concurrent processing system for IoT terminals provided by this invention includes a task generation unit comprising:

[0042] The data stream construction subunit is used to scan the thread pool corresponding to all current event types, read the bound batch processing queue and data objects, mark each data object as an independent data stream to be scheduled, and form a data stream.

[0043] The path determination subunit is used to read data from the data stream, report changes in the source gateway, and form the source address by the physical location number. Combined with the access gateway information, it obtains the forwarding links through which the corresponding data stream passes and records the transmission delay, bandwidth limit, current bandwidth occupied, and packet loss rate of each forwarding link as the transmission path.

[0044] The monitoring metric collection subunit is used to obtain the computing power, memory, thread pool load, and queue length of each node as node monitoring metrics based on the current edge-cloud topology, and to obtain the current bandwidth utilization and transmission latency matrix of each forwarding link to obtain network performance monitoring data.

[0045] The low-latency data concurrency processing system for IoT terminals provided by this invention includes an initial instruction generation module comprising:

[0046] The parsing scheduling sequence unit is used to perform structured parsing of the concurrent processing scheduling sequence, breaking it down into multiple scheduling sub-items, extracting key scheduling information from each scheduling sub-item, and sorting them according to the execution order to form an ordered list.

[0047] The batch queue verification unit is used to read the batch processing queue ID of the data to be scheduled in the ordered list in sequence, check whether the queue is normal, extract the corresponding data if it is normal, otherwise skip and record the scheduling error.

[0048] The data retrieval and matching unit is used to retrieve the matching data object from the corresponding batch processing queue based on the unique data identifier specified in the concurrent processing scheduling sequence, and then perform status marking to obtain data tag information.

[0049] The initial instruction unit is generated to encapsulate the data tagging information into an executable task according to the scheduling sub-item and submit it to the task queue of the corresponding thread pool. Based on the resource configuration information carried in the concurrent processing scheduling sequence, computing resources are allocated to the current executable task. Combined with the data object type, event type, and processing logic, the corresponding initial processing instruction is generated.

[0050] The low-latency data concurrency processing system for IoT terminals provided by this invention includes the following steps for dynamically adjusting the instruction module to obtain real-time deviations:

[0051] Extract benchmark metrics from the concurrent processing scheduling sequence, create an index by data stream ID, traverse each currently executing data stream, and compare the actual execution order, actual execution node, actual allocated thread, and expected value item by item to calculate the scheduling sequence deviation.

[0052] For each data stream, the expected transmission delay is read from the concurrent processing scheduling sequence, the actual transmission delay of the data stream is calculated based on the network link status change data, and the transmission delay deviation is calculated in combination with the expected transmission delay.

[0053] The real-time deviation is obtained by standardizing the scheduling sequence deviation and transmission delay deviation according to the preset requirements.

[0054] The low-latency data concurrency processing system for IoT terminals provided by this invention includes the following steps for dynamically adjusting the instruction module to obtain low-latency concurrency processing instructions:

[0055] The real-time deviation of each data stream is compared with the corresponding threshold to determine whether adjustment is needed. The initial processing of the data streams that need adjustment is marked as pending adjustment, and a list of pending adjustment instructions is compiled.

[0056] For each real-time deviation corresponding to an instruction to be adjusted, the type is broken down, the corresponding adjustment dimension is located according to the deviation type, and the corresponding modification content is determined to obtain the adjustment direction data.

[0057] For data with different adjustment directions, a differentiated adjustment strategy is adopted to modify the content of each instruction to be adjusted, and legality, feasibility and low latency checks are performed to obtain low latency concurrent processing instructions.

[0058] The beneficial effects of this invention are as follows:

[0059] 1. This invention utilizes structured message topic parsing and multi-feature matching to automatically identify event types and distribute them to dedicated thread pools. Different business data are processed in isolation to avoid mutual interference, significantly improving message access and distribution efficiency. It employs a thread pool for concurrent parsing of JSON payloads, unifying encoding and object formats, and categorizing and caching them in batch queues to reduce single-thread pressure and parsing time, supporting high-concurrency access from massive terminals. With minimum total latency and load balancing as optimization goals, it iteratively optimizes through foraging, clustering, and tailgating behaviors to generate a globally optimal scheduling sequence. Compared to fixed scheduling strategies, end-to-end latency is significantly reduced, and resource utilization is significantly improved. Real-time collection of terminal location, reporting rate, and network link status calculates scheduling and latency deviations, dynamically correcting instructions to enable adaptive scheduling strategies to network changes and ensure continuous low-latency system operation. It distinguishes between scheduling deviations, transmission latency deviations, and comprehensive deviations, adjusting priorities, thread pools, transmission paths, and node allocation accordingly to avoid ineffective adjustments and maintain stable processing capabilities even in network fluctuations and terminal mobility scenarios. Attached Figure Description

[0060] The invention will now be further described with reference to the accompanying drawings.

[0061] Figure 1 This is a schematic diagram of a low-latency data concurrency processing system for IoT terminals provided in an embodiment of the present invention;

[0062] Figure 2This is a schematic diagram of the process for obtaining data objects in a low-latency data concurrency processing system for IoT terminals provided in an embodiment of the present invention;

[0063] Figure 3 This is a schematic diagram of the scheduling sequence generation module of the low-latency data concurrent processing system for IoT terminals provided in an embodiment of the present invention. Detailed Implementation

[0064] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0065] like Figures 1 to 3 As shown in the figure, the low-latency data concurrent processing system for IoT terminals provided in this embodiment of the invention includes:

[0066] The message distribution module is used to receive raw message data sent by IoT terminals, identify the event type according to the message topic, and distribute the raw message data to the thread pool corresponding to the event type according to the preset corresponding mapping rules.

[0067] The steps for the message distribution module to identify event types include:

[0068] The system receives raw message data in UDP / TCP packet format from IoT terminals via a preset communication protocol, performs verification and noise reduction to obtain processed message data.

[0069] Perform preliminary verification on the received raw messages, check the integrity of the messages, such as whether the message header and trailer are complete, and whether there are any packet losses, interruptions, or invalidity.

[0070] The original messages that pass the verification are denoised to filter out garbled characters and redundant characters caused by electromagnetic interference and network jitter during message transmission.

[0071] For original messages that fail verification, they are marked as abnormal data, stored in a temporary fault-tolerant buffer, and then retried for reception or discarded. They are not included in the subsequent event identification process.

[0072] The message data processing results are analyzed from three aspects: message header, message subject, and message payload, to obtain the message subject.

[0073] According to the format specifications of the corresponding communication protocol, locate the start and end positions of the message topic field. For example, in the MQTT protocol, the starting index and byte length of the Topic are determined by the flag bits and length field in the message header.

[0074] Extract the complete content of the message subject field, convert it to string format, and remove leading and trailing whitespace and control characters to ensure the purity of the subject content.

[0075] Record the relationship between the extracted message topic and the corresponding original message, such as binding the terminal device ID and receiving timestamp, to facilitate accurate message distribution after subsequent event identification.

[0076] The message topic is split into multi-level feature items based on hierarchical separators, and then classified and named to form a structured feature list.

[0077] Multi-level feature terms may include:

[0078] First-level feature: Device identifier, used to distinguish different IoT terminals.

[0079] Second-level feature: Data type, used to distinguish the data category carried by the message.

[0080] The third level of feature is the business scenario, which is used to clarify the specific business purpose.

[0081] Fourth-level feature: Reporting method, used to distinguish the reporting mode of messages.

[0082] If the message subject is “device_001 / sensor / temperature / real-time”, after splitting it, we get the following features: device identifier (device_001), data type (sensor), business scenario (temperature), and reporting method (real-time).

[0083] Based on the current business, the corresponding mapping rules are determined. A multi-feature joint matching strategy is used to match the structured feature list one by one. The matching degree of each matching rule is calculated, and the rule with the highest matching degree is selected as the event type corresponding to the current message.

[0084] The corresponding mapping rules may include: real-time sensor events: data type = "sensor" + reporting method = "real-time", such as the reporting of real-time collected data such as temperature and humidity.

[0085] Alarm reporting event: Data type = "alarm" + business scenario (e.g., "fault" or "overlimit") (e.g., alarm messages for device failure or data exceeding threshold).

[0086] Control command event: Data type = "control" + business scenario (such as "start" or "stop") (such as control command receipts sent from the cloud / edge to the terminal).

[0087] Status heartbeat event: data type = "status" + reporting method = "heartbeat", such as online status messages reported periodically by the terminal.

[0088] Batch retransmission event: Data type = "sensor" + reporting method = "batch", such as historical sensor data that is retransmitted in batches when the network is restored after the terminal is disconnected from the network.

[0089] The steps for the message dispatch module to dispatch the thread pool include:

[0090] The corresponding mapping rules are mapped to the thread pool according to the event type to obtain the event thread mapping rules.

[0091] Example of event thread mapping rules:

[0092] Real-time sensing events → dedicated thread pool for sensing data, focusing on high throughput and low latency, adapted to high-frequency small packet data.

[0093] Alarm reporting events → Dedicated thread pool for alarms, prioritizing processing and ensuring rapid response to alarm messages.

[0094] Control command events → A dedicated thread pool for control commands, focusing on low jitter to ensure zero delay in control commands.

[0095] State heartbeat event → Heartbeat-specific thread pool, focusing on lightweight processing and reducing resource consumption.

[0096] Batch data transfer event → Dedicated thread pool for batch data, focusing on batch processing and adapting to large amounts of historical data.

[0097] A hash-based search method is used to match the current event type with the event thread mapping rules to locate the thread pool mapping description data for the current event type. The thread pool mapping description data includes a unique thread pool ID and thread pool configuration parameters.

[0098] The matching result is determined according to preset rules. If the match is successful, the corresponding thread pool is determined and the current thread pool status is recorded as a message to be dispatched. If the match fails, it is marked as a matching failure message.

[0099] Match successful: Identify the corresponding thread pool, record the current state of the thread pool, and proceed to the next step, "message dispatch".

[0100] Matching failure: If the event type is not in the mapping rules, such as an unknown event type or a newly added event type that has not been updated in the rules, it is marked as a "matching failure message" and temporarily stored in the general thread pool waiting queue for manual configuration and supplementation later.

[0101] The messages to be distributed are encapsulated into standardized thread pool task objects, and the corresponding delivery strategy is selected based on the current state of the thread pool for delivery.

[0102] Delivery strategy selection: When the thread pool is idle: adopt the "instant delivery" strategy, directly deliver the task object to the task queue of the thread pool, and return a "delivery successful" flag.

[0103] Thread pool busy: The "buffered delivery" strategy is adopted to temporarily store task objects in the thread pool's temporary buffer queue, and automatically deliver them to the task queue when the thread pool has free resources.

[0104] If the thread pool is temporarily unavailable: adopt the "backup delivery" strategy, deliver the task object to the backup thread pool of the corresponding event type, record the delivery exception log, and notify the operation and maintenance personnel to investigate the main thread pool failure.

[0105] The data parsing and caching module is used to concurrently parse the JSON payload of the raw message data in each thread pool, convert it into data objects, and cache them to the batch processing queue according to the type of the data objects.

[0106] The steps by which the data parsing and caching module obtains the data object include:

[0107] Idle worker threads in the thread pool retrieve messages to be dispatched according to the first-in-first-out principle, and then break them down into message header information and JSON payload.

[0108] Clean up the first and last characters of the JSON payload, convert the string to UTF-8 encoding, and perform length verification to generate the JSON payload string.

[0109] The JSON payload string is parsed according to JSON syntax rules using a pre-defined JSON parsing library, and the key-value pairs in the string are identified to obtain field information by recognizing the name and data type of each field.

[0110] According to the preset field mapping rules, the key-value pairs are matched one by one with the thread pool type to obtain the data transfer object, and the preliminary data object is generated by combining the field information.

[0111] The message header information is filled into the corresponding fields of the initial data object, and a unique identifier is added. The field names and field order are standardized to obtain the data object.

[0112] The data parsing and caching module categorizes and caches data objects according to their type in the batch processing queue, including the following steps:

[0113] Extract the type identifier field and auxiliary classification information from the data object to generate a unique classification identifier, and set up a dedicated processing queue corresponding to the event type as a queue mapping table. The queue mapping table explicitly contains core information such as: classification identifier, target batch processing queue ID, queue storage path, queue cache capacity, and enqueue rules.

[0114] The system retrieves and matches data in the queue mapping table based on the unique classification identifier to determine the target processing queue and location data corresponding to the current data object.

[0115] According to the format requirements of the target processing queue, the current data object is encapsulated to generate a queue task unit. A connection is established with the queue task unit based on the location data. The data is then inserted into the tail of the target processing queue according to the generation order of the current data object to obtain the batch processing queue.

[0116] The encapsulated content includes: complete data object, category identifier, enqueue timestamp, unique UUID of data object, and source thread pool identifier, ensuring that each task unit contains complete traceability and processing information.

[0117] The encapsulated queue task units are serialized to ensure efficient data storage and prevent data corruption or format errors during storage.

[0118] The scheduling sequence generation module is used to obtain the source address, transmission path and edge-cloud network topology corresponding to the data stream in each thread pool, and generate a concurrent processing scheduling sequence using the fishing optimization algorithm.

[0119] The scheduling sequence generation module includes:

[0120] The scheduling task generation unit is used to obtain node monitoring indicators and network performance monitoring data based on the current edge-cloud topology, and encapsulate them into scheduling task input by combining the source address and transmission path.

[0121] The scheduling task generation unit includes:

[0122] The data stream construction subunit is used to scan the thread pool corresponding to all current event types, read the bound batch processing queue and data objects, mark each data object as an independent data stream to be scheduled, and form a data stream.

[0123] The path determination subunit is used to read data from the data stream, report changes in the source gateway, and form the source address by the physical location number. Combined with the access gateway information, it obtains the forwarding links through which the corresponding data stream passes and records the transmission delay, bandwidth limit, current bandwidth occupied, and packet loss rate of each forwarding link as the transmission path.

[0124] The monitoring metric collection subunit is used to obtain the computing power, memory, thread pool load, and queue length of each node as node monitoring metrics based on the current edge-cloud topology, and to obtain the current bandwidth utilization and transmission latency matrix of each forwarding link to obtain network performance monitoring data.

[0125] The scheduling problem definition unit is used to define the artificial fish positions based on the total number of data streams to be scheduled and the scheduling task input. Each artificial fish represents a set of scheduling schemes, and the optimization objectives are determined according to the target requirements. Optimization objectives: minimize total latency, minimize load imbalance, and minimize link congestion.

[0126] The fitness calculation unit is used to randomly generate multiple artificial fish. The position of each fish represents a random scheduling sequence. An initial fish population is constructed. For each artificial fish, its corresponding fitness value is calculated. The artificial fish with the highest fitness value is selected as the globally optimal fish. The formula is expressed as follows:

[0127]

[0128]

[0129]

[0130]

[0131] In the formula, It is the total delay. It refers to the queue waiting time delay. It is the transmission link delay. The thread pool handles computation latency. It is link load balancing. It is a link utilization rate It is the average utilization rate of all links. It involves load balancing between nodes and thread pools. It is a node CPU / thread pool load It is the average load. , , These are weights, and they add up to 1. It is the fitness value. It is the total number of tasks. It is the total number of links. It represents the total number of nodes.

[0132] The individual movement unit is used to randomly select a location within the field of view for the current artificial fish, determine whether the fitness value of the current artificial fish is greater than the fitness value of the initial artificial fish, and if so, move in that direction to obtain a refreshed artificial fish individual. The formula is expressed as:

[0133]

[0134] In the formula, It refreshes the individual artificial fish. It was the original artificial fish. It is currently an artificial fish. It is the stride length of the artificial fish. It is a random function.

[0135] The cluster behavior unit is used to count the number of neighboring fish within the field of view, calculate the neighborhood center position and the corresponding center fitness value, determine whether it is crowded, and if not, move to the neighborhood center position to obtain the center fish individual.

[0136] The formula for calculating the location of the neighborhood center is expressed as:

[0137]

[0138] In the formula, It is the central location of the neighborhood. It represents the number of neighboring fish currently in view. It is the first The location of the neighboring fish.

[0139] The formula for judging congestion is expressed as:

[0140]

[0141] In the formula, It is the congestion threshold. It represents the total number of fish in the school.

[0142] The formula for obtaining the central fish individual is expressed as:

[0143]

[0144] In the formula, It is the central fish individual.

[0145] The tail-chasing behavior unit is used to approach the globally optimal fish, select the neighboring fish with the highest fitness value in the field of vision, and determine whether the surrounding crowding level meets the preset crowding threshold. If so, it moves towards the neighboring fish.

[0146] The scheduling sequence output unit is used to select the scheduling scheme corresponding to the artificial fish individual with the highest fitness value as the concurrent processing scheduling sequence after iterating to a preset number of iterations.

[0147] The concurrent processing scheduling sequence includes: the order of data stream processing, the thread pool allocated to each piece of data, the selected transmission path, the timing of queue scheduling, and the execution time slice planning.

[0148] The initial instruction generation module is used to schedule the data in the batch processing queue according to the concurrent processing scheduling sequence to obtain the initial processing instructions.

[0149] The initial instruction generation module includes:

[0150] The parsing scheduling sequence unit is used to perform structured parsing of the concurrent processing scheduling sequence, breaking it down into multiple scheduling sub-items, extracting key scheduling information from each scheduling sub-item, and sorting them according to the execution order to form an ordered list.

[0151] The batch queue verification unit is used to read the batch processing queue ID of the data to be scheduled in the ordered list in sequence, check whether the queue is normal, extract the corresponding data if it is normal, otherwise skip and record the scheduling error.

[0152] The data retrieval and matching unit is used to retrieve the matching data object from the corresponding batch processing queue based on the unique data identifier specified in the concurrent processing scheduling sequence, and then perform status marking to obtain data tag information.

[0153] The initial instruction unit is generated to encapsulate the data tagging information into an executable task according to the scheduling sub-item and submit it to the task queue of the corresponding thread pool. Based on the resource configuration information carried in the concurrent processing scheduling sequence, computing resources are allocated to the current executable task. Combined with the data object type, event type, and processing logic, the corresponding initial processing instruction is generated.

[0154] The dynamic adjustment instruction module is used to acquire terminal positioning signals, data reporting rates and network link status changes in real time. Based on preset requirements, it calculates scheduling sequence deviation and data stream transmission delay deviation as real-time deviations, adjusts the initial processing instructions, and generates low-latency concurrent processing instructions.

[0155] The steps for the dynamic adjustment command module to obtain real-time deviation include:

[0156] Extract benchmark metrics from the concurrent processing scheduling sequence, create an index by data stream ID, traverse each currently executing data stream, and compare the actual execution order, actual execution node, actual allocated thread, and expected value item by item to calculate the scheduling sequence deviation.

[0157] Benchmark metrics include: expected data stream scheduling order, expected data stream execution time window, expected thread pool allocation, expected transmission path, and expected end-to-end latency.

[0158] Calculate the order deviation value: Calculate the absolute value of the difference between the actual execution sequence number and the expected sequence number, and record it as the scheduling order deviation.

[0159] Node allocation bias: If a data stream is allocated to an unexpected thread pool or an unexpected edge node, it is recorded as node allocation bias.

[0160] Calculate the time window deviation: Calculate the difference between the actual startup processing time and the expected startup time, and record it as the timing deviation.

[0161] For each data stream, the expected transmission delay is read from the concurrent processing scheduling sequence, the actual transmission delay of the data stream is calculated based on the network link status change data, and the transmission delay deviation is calculated in combination with the expected transmission delay.

[0162] The real-time deviation is obtained by standardizing the scheduling sequence deviation and transmission delay deviation according to the preset requirements.

[0163] Read the system's preset requirement thresholds, including: maximum allowable scheduling sequence deviation, maximum allowable transmission delay deviation, and the stricter threshold for high-priority data streams. Divide the calculated original deviation value by the corresponding threshold to obtain the normalized real-time deviation value.

[0164] The steps for dynamically adjusting the instruction module to obtain low-latency concurrent processing instructions include:

[0165] The real-time deviation of each data stream is compared with the corresponding threshold to determine whether adjustment is needed. The initial processing of the data streams that need adjustment is marked as pending adjustment, and a list of pending adjustment instructions is compiled.

[0166] For each real-time deviation corresponding to an instruction to be adjusted, the type is broken down, the corresponding adjustment dimension is located according to the deviation type, and the corresponding modification content is determined to obtain the adjustment direction data.

[0167] Deviation type: Scheduling sequence deviation is dominant: Deviations mainly come from scheduling order lag, unreasonable thread pool allocation, and execution time window deviation from expectations, and are unrelated to network link status.

[0168] Transmission delay deviation is the dominant factor: the deviation mainly comes from network link congestion, transmission path degradation, and link switching caused by terminal movement, and is unrelated to scheduling logic.

[0169] Overall deviation is dominant: both scheduling sequence deviation and transmission delay deviation exceed the standard, mostly caused by fluctuations in the overall system load and sudden changes in the network environment (such as sudden traffic or link interruption).

[0170] Based on the type of deviation, identify the corresponding adjustment dimension, clarify the specific content that needs to be modified for each instruction to be adjusted, and avoid adjusting irrelevant dimensions:

[0171] Scheduling sequence deviation is the dominant factor: the adjustment dimensions are scheduling order, thread pool allocation, execution time slice, and task priority.

[0172] Transmission delay deviation is the dominant factor: the adjustment dimensions are transmission path, link bandwidth allocation, data transmission rate, and edge node affiliation.

[0173] Overall deviation is the dominant factor: the adjustment dimensions cover all of the above, and global optimization and adjustment are required.

[0174] For data with different adjustment directions, a differentiated adjustment strategy is adopted to modify the content of each instruction to be adjusted, and legality, feasibility and low latency checks are performed to obtain low latency concurrent processing instructions.

[0175] Adjustment operations dominated by scheduling sequence deviation: re-sort the execution order of the data streams corresponding to the instructions to be adjusted, and improve the execution priority of data streams that lag behind the expected execution time to ensure that they get thread resources first.

[0176] Detect the real-time load of each thread pool, such as the number of idle threads and the length of the task queue, and divert the instructions to be adjusted in the congested thread pool to the idle thread pool to avoid scheduling delays caused by thread pool overload.

[0177] Adjust the execution time slice of the instructions to be adjusted, shorten the time slice interval of high-priority data streams, extend the time slice interval of low-priority data streams, stagger high-concurrency conflict periods, and reduce scheduling order deviations.

[0178] Enable preemptive execution permissions for high-priority data streams, allowing them to preempt thread resources of low-priority tasks, ensuring their timely execution and reducing timing deviations.

[0179] Adjustment operation dominated by transmission delay deviation: Read the real-time status of all available transmission links from the global network status cache and eliminate degraded links with high latency and high packet loss rate.

[0180] Based on the real-time positioning signal of the terminal, the optimal transmission path is replanned for the instructions to be adjusted. The transmission path that is closest to the terminal, has the best link status, and has sufficient bandwidth is selected first, and the degraded path in the original scheduling sequence is replaced.

[0181] For data streams with excessively large transmission delay deviations, dynamically adjust their data transmission rate to reduce the transmission rate of large volumes of data on congested links, thereby preventing further exacerbation of link congestion and increased transmission delay.

[0182] If a terminal moves across edge nodes, the processing node corresponding to the adjustment instruction will be switched to the edge node to which the terminal currently belongs, so as to achieve processing nearby and greatly reduce transmission latency.

[0183] Overall deviation-driven adjustment operation: Global scheduling optimization of all instructions to be adjusted in the system, reordering the execution order of all data streams, prioritizing the scheduling of high-priority data streams with excessive deviations, and taking into account thread pool load balancing.

[0184] Activate traffic shaping and queue buffering mechanisms to temporarily store the adjustment instructions corresponding to sudden traffic surges into a temporary buffer queue, smoothing out traffic impacts and avoiding overall system overload.

[0185] Temporarily adjust the dequeue speed of the batch processing queue to speed up the dequeue rate of the queue containing large data streams with excessive deviation, alleviate queue backlog, and reduce scheduling lag.

[0186] Dynamically adjust thread pool resource configuration, temporarily expand the thread pool with excessive load (increase the number of core threads), shrink the idle thread pool, improve the overall computing power utilization, and optimize the transmission path and bandwidth allocation to reduce both types of deviations simultaneously.

[0187] Iterate through the list of instructions to be adjusted, call the instruction editing interface for each instruction, and modify the field content corresponding to the instruction according to the "adjustment dimension" in the adjustment list. The core modifications include:

[0188] Scheduling related: execution priority, execution order number, execution time slice, target thread pool number.

[0189] Transmission-related information: list of transmission path nodes, link bandwidth allocation value, upper limit of data transmission rate, and edge node number.

[0190] Resource-related factors: memory quota, CPU usage percentage, and processing timeout.

[0191] The original business processing logic in the initial processing instructions (such as data parsing rules and data storage / forwarding requirements) is strictly retained. Only the control items related to scheduling, transmission, and resource allocation are modified to avoid affecting the correctness of data processing.

[0192] Add a "dynamic correction" mark to each adjusted instruction and record the correction time, source of deviation, and adjustment content, such as "transmission delay deviation exceeds the standard, replace the transmission path with XXX", to facilitate subsequent traceability and problem investigation.

[0193] After the correction is completed, the adjusted instructions will be temporarily stored in the temporary adjustment cache area, awaiting subsequent verification.

[0194] Legality verification: Check whether the adjusted instruction fields are complete and whether the format is standardized, and whether the target thread pool, transmission path and edge node are within the system's valid range to avoid invalid configurations.

[0195] Feasibility verification: Check whether the newly allocated thread pool has enough idle resources, whether the new transmission path is reachable, whether the bandwidth meets the data flow transmission requirements, and whether there are any conflicts in the adjusted scheduling order.

[0196] Low-latency verification: Based on the adjusted instruction configuration, estimate the execution latency and transmission latency of the data stream, and determine whether the adjusted deviation can be reduced to below the threshold to ensure that the adjusted instructions can achieve low-latency concurrent processing.

[0197] In summary, the low-latency concurrent data processing system for IoT terminals provided in this embodiment avoids task blocking through event isolation, optimizes processing order through intelligent scheduling, and responds to network fluctuations through a dynamic adjustment mechanism. These three elements work synergistically to minimize the total time from data reception to processing completion. The concurrent processing architecture and intelligent scheduling enable more efficient and balanced utilization of resources such as CPU, memory, and network bandwidth, allowing the system to process more data requests per unit time, significantly improving system throughput and resource utilization. The dynamic feedback adjustment mechanism enables the system to cope with common IoT environment scenarios such as network instability, device movement, and traffic surges, ensuring high availability and stability of services and enhancing system stability and adaptability. The system is no longer limited to optimizing a single node or link, but rather considers the entire "device-edge-cloud" topology globally, achieving coordinated optimization of computing and network resources and reaching optimal overall performance.

[0198] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A low-latency data concurrent processing system for Internet of Things (IoT) terminals, characterized in that, include: The message distribution module is used to receive raw message data sent by IoT terminals, identify the event type according to the message topic, and distribute the raw message data to the thread pool corresponding to the event type according to the preset corresponding mapping rules. The data parsing and caching module is used to concurrently parse the JSON payload of the original message data in each thread pool, convert it into data objects, and cache the data objects into the batch processing queue according to their type. The scheduling sequence generation module is used to obtain the source address, transmission path and edge-cloud network topology corresponding to the data stream in each thread pool, and use the fishing optimization algorithm to generate a concurrent processing scheduling sequence. The scheduling sequence generation module includes: The scheduling task generation unit is used to obtain node monitoring indicators and network performance monitoring data according to the current edge-cloud topology, and encapsulate them into scheduling task input by combining the source address and the transmission path. The scheduling task generation unit includes: The data flow construction subunit is used to scan the thread pool corresponding to all current event types, read the bound batch processing queue and data objects, mark each data object as an independent data flow to be scheduled, and form the data flow. The path determination subunit is used to read data from the data stream, report changes in the source gateway, and the physical location number to form the source address. Combined with the access gateway information, it obtains the forwarding links through which the corresponding data stream passes and records the transmission delay, bandwidth limit, current bandwidth occupied, and packet loss rate of each forwarding link as the transmission path. The monitoring metric collection subunit is used to obtain the computing power, memory, thread pool load and queue length of each node as node monitoring metrics based on the current edge-cloud topology, and to obtain the current bandwidth utilization and transmission latency matrix of each forwarding link to obtain network performance monitoring data. The scheduling problem definition unit is used to define the artificial fish positions based on the total number of data streams to be scheduled and the input of the scheduling task. Each artificial fish represents a set of scheduling schemes, and the optimization target is determined according to the target requirements. The fitness calculation unit is used to randomly generate multiple artificial fish. The position of each fish represents a random scheduling sequence, construct an initial fish population, calculate the corresponding fitness value for each artificial fish, and select the artificial fish with the highest fitness value as the global optimal fish. The individual movement unit is used to randomly select a position within the field of vision of the current artificial fish, determine whether the fitness value of the current artificial fish is greater than the fitness value of the initial artificial fish, and if so, move in that direction to obtain a refreshed artificial fish individual; The cluster behavior unit is used to count the number of neighboring fish within the field of view, calculate the neighborhood center position and the corresponding center fitness value, determine whether it is crowded, and otherwise move to the neighborhood center position to obtain the center fish individual; The tail-chasing behavior unit is used to approach the globally optimal fish, select the neighbor fish with the highest fitness value in the field of vision, and determine whether the surrounding crowding level meets the preset crowding threshold. If so, it moves towards the neighbor fish. The scheduling sequence output unit is used to select the scheduling scheme corresponding to the artificial fish individual with the highest fitness value as the concurrent processing scheduling sequence after iterating to a preset number of iterations. An initial instruction generation module is used to schedule the data in the batch processing queue according to the concurrent processing scheduling sequence to obtain initial processing instructions; The dynamic adjustment instruction module is used to acquire terminal positioning signals, data reporting rates and network link status change data in real time, calculate scheduling sequence deviation and data stream transmission delay deviation as real-time deviation according to preset requirements, adjust the initial processing instruction, and generate low-latency concurrent processing instructions.

2. The low-latency data concurrent processing system for IoT terminals according to claim 1, characterized in that: The steps for the message distribution module to identify the event type include: The system receives raw message data in UDP / TCP packet format from IoT terminals via a preset communication protocol, performs verification and noise reduction to obtain processed message data. The message data processing results are analyzed from three aspects: message header, message subject, and message payload, to obtain the message subject; The message topic is split into multi-level feature items based on the hierarchical separator, and then classified and named to form a structured feature list; The corresponding mapping rules are determined based on the current business, and a multi-feature joint matching strategy is used to match each of the structured feature lists one by one. The matching degree of each matching rule is calculated, and the rule with the highest matching degree is selected as the event type corresponding to the current message.

3. The low-latency data concurrent processing system for IoT terminals according to claim 2, characterized in that: The steps for the message distribution module to distribute the thread pool include: The corresponding mapping rules are mapped to the thread pool according to the event type to obtain the event thread mapping rules; A hash retrieval method is used to match the current event type with the event thread mapping rule to locate the thread pool mapping description data of the current event type; The matching result is determined according to the preset rules. If the match is successful, the corresponding thread pool is determined and the current thread pool status is recorded as a message to be dispatched. If the match fails, it is marked as a matching failure message. The message to be distributed is encapsulated into a standardized thread pool task object, and the corresponding delivery strategy is selected and delivered based on the current state of the thread pool.

4. The low-latency data concurrent processing system for IoT terminals according to claim 3, characterized in that: The steps by which the data parsing and caching module obtains the data object include: The idle worker threads in the thread pool retrieve the message to be distributed according to the first-in-first-out principle, and decompose it into message header information and JSON payload; The JSON payload is cleaned of its beginning and end characters, the string is uniformly converted to UTF-8 encoding format, and its length is checked to generate a JSON payload string; The JSON payload string is parsed according to JSON syntax rules using a preset JSON parsing library, and the key-value pairs in the string are identified to obtain field information by recognizing the name and data type of each field. According to the preset field mapping rules, the key-value pairs are matched one by one with the thread pool type to obtain the data transmission object, and a preliminary data object is generated by combining the field information. The message header information is filled into the corresponding fields of the preliminary data object, and a unique identifier is added. The field names and field order are standardized to obtain the data object.

5. The low-latency data concurrent processing system for IoT terminals according to claim 1, characterized in that: The steps of the data parsing and caching module to classify and cache the data objects into the batch processing queue according to their type include: Extract the type identifier field and auxiliary classification information from the data object to generate a unique classification identifier, and set a dedicated processing queue corresponding to the event type as a queue mapping table; Based on the unique classification identifier, a search and matching operation is performed in the queue mapping table to determine the target processing queue and location data corresponding to the current data object; According to the format requirements of the target processing queue, the current data object is encapsulated to generate a queue task unit. A connection is established with the queue task unit in combination with the positioning data. The data object is then inserted into the tail of the target processing queue according to the generation order of the current data object to obtain the batch processing queue.

6. The low-latency data concurrent processing system for IoT terminals according to claim 1, characterized in that: The initial instruction generation module includes: The parsing scheduling sequence unit is used to perform structured parsing of the concurrent processing scheduling sequence, break it down into multiple scheduling sub-items, extract key scheduling information from each scheduling sub-item, and sort them according to the execution order to form an ordered list; The batch queue verification unit is used to read the batch processing queue ID where the currently scheduled data is located sequentially according to the ordered list, check whether the queue is normal, and if so, extract the corresponding data; otherwise, skip and record the scheduling exception. The data retrieval and matching unit is used to retrieve and extract matching data objects from the corresponding batch processing queue based on the unique data identifier specified in the concurrent processing scheduling sequence, and perform status marking to obtain data marking information; An initial instruction unit is generated to encapsulate the data tagging information into an executable task according to the scheduling sub-item, submit it to the task queue of the corresponding thread pool, allocate computing resources to the current executable task according to the resource configuration information carried in the concurrent processing scheduling sequence, and generate the corresponding initial processing instruction by combining the data object type, event type, and processing logic.

7. The low-latency data concurrent processing system for IoT terminals according to claim 6, characterized in that: The steps by which the dynamic adjustment command module obtains the real-time deviation include: Extract the benchmark indicators from the concurrent processing scheduling sequence, establish an index by data stream ID, traverse each currently executing data stream, and compare the actual execution order, actual execution node, actual allocated thread with the expected value to calculate the scheduling sequence deviation; For each data stream, the expected transmission delay is read from the concurrent processing scheduling sequence, the actual transmission delay of the data stream is calculated based on the network link status change data, and the transmission delay deviation is calculated in combination with the expected transmission delay. The real-time deviation is obtained by standardizing the scheduling sequence deviation and the transmission delay deviation according to the preset requirements.

8. The low-latency data concurrent processing system for IoT terminals according to claim 1, characterized in that: The steps by which the dynamic adjustment instruction module obtains the low-latency concurrent processing instruction include: The real-time deviation of each data stream is compared with the corresponding threshold to determine whether adjustment is needed. The initial processing of the data streams that need adjustment is marked as pending adjustment, and a list of pending adjustment instructions is compiled. For each real-time deviation corresponding to an instruction to be adjusted, the type is broken down, the corresponding adjustment dimension is located according to the deviation type, and the corresponding modification content is determined to obtain the adjustment direction data. For data with different adjustment directions, a differentiated adjustment strategy is adopted to modify the content of each instruction to be adjusted, and the legality, feasibility and low latency are checked to obtain the low latency concurrent processing instruction.

Citation Information

Patent Citations

  • Self-adaptive processing method and device of Kafka message queue system

    CN121056409A

  • Event processing method, system and device based on Internet of Things device and medium

    CN121705004A