An edge / cloud task offloading method based on an improved seagull algorithm

CN116991500BActive Publication Date: 2026-09-18NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310971594.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2026-09-18
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

然而,在上述任务卸载策略研究中,虽然大多考虑利用了本地资源和边缘节点计算能力这一特性,但是任务卸载模型过于理想

Benefits of technology

[0057] This invention proposes an edge/cloud task offloading method based on an improved Seagull algorithm. By integrating an edge computing task offloading model, the platform is constructed into a many-to-one edge/cloud collaborative working mode, further reducing system latency and improving the real-time performance and efficiency of platform data communication. Furthermore, the improved Seagull algorithm is a swarm optimization algorithm. Through the collaborative advancement of the optimization process by multiple individual Seagulls, the search space can be explored more comprehensively, enhancing global optimization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116991500B_ABST
    Figure CN116991500B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of edge computing, and discloses an edge / cloud task offloading method based on an improved seagull algorithm, which adopts a cooperative deployment mode based on edges and clouds, acquires an optimal task offloading strategy through the improved seagull algorithm, realizes a cooperative working mode of edge computing nodes and cloud service nodes, and reduces the time cost of the offloading strategy; is applied to a multi-source heterogeneous internet of things sensing platform, can reduce task processing delay, improve system benefits, and can be used to solve the problems of large multi-source heterogeneous data volume, poor real-time collection and conversion in the safe production of current chemical industry parks and chemical enterprises, and maximize the overall benefits of the sensing platform while improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of edge computing technology, specifically relating to an edge / cloud task offloading method based on an improved Seagull algorithm. Background Technology

[0002] Currently, in the intelligent management and control of safety risks in chemical industrial parks and their enterprises, IoT-based sensing data on toxic, flammable, high-risk processes, and safety instruments exhibits typical characteristics of being massive, multi-source, and heterogeneous. Furthermore, the communication protocols between various sensing devices and DCS / SIS systems are numerous, and different data requesters have varying requirements for the content and format of the sensing data. Against this backdrop, information silos and data chimneys are prominent issues in chemical industrial parks and enterprises, seriously affecting their inherent safety. In addition, the multi-source heterogeneity of data also poses challenges to intelligent analysis of safety risk data. Different protocols and formats can lead to significant discrepancies in data types, fields, and definitions, making direct analysis and integration impossible. This severely hinders data sharing and utilization in chemical industrial parks and enterprises, complicating the data processing process and increasing the workload and time costs of data preprocessing. [1] Especially when the park / enterprise data service center simultaneously provides data collection, transformation, and storage services to multiple enterprises / factories, data packet loss, network latency, and link congestion frequently occur because all data needs to be sent to cloud service nodes for processing. This not only affects the system's real-time performance and user experience but also makes it impossible to detect and respond to potential data privacy and security risks in a timely manner. [2] .

[0003] To address these issues, deploying edge computing nodes within enterprises can migrate data acquisition and transformation tasks closer to the devices, reducing communication latency during data transmission to cloud service nodes. However, most current IoT sensing platforms centrally handle data transformation and storage tasks on edge computing nodes, directly shifting all data pressure to the edge, further exacerbating the already limited computing power of these nodes. Therefore, to explore the potential of edge computing models in IoT sensing scenarios for secure production, it is crucial for IoT sensing platforms to effectively offload tasks between edge computing nodes and cloud service nodes. [3] .

[0004] Existing edge / cloud task offloading methods, for example, those provided in the literature [4] A method based on the Gauss-Seidel model is designed for edge task offloading optimization. Simulation results show that this method can solve the Nash equilibrium problem and can converge the optimal solution to the Nash equilibrium point through multiple iterations, reducing overall energy consumption while satisfying time constraints. (References) [5]Considering network models with multiple IoT devices and a single edge device, a progressive optimization algorithm is proposed. This algorithm can effectively generate offloading scheduling strategies, achieving a balance between maximizing network utility, throughput, and fairness. However, while most of the aforementioned task offloading strategy studies have utilized local resources and the computing power of edge nodes, the task offloading models are overly idealistic. In real-world scenarios, task offloading strategies must not only consider objectives such as minimizing energy consumption, minimizing latency, and optimizing performance, but also fully consider factors such as task allocation, scheduling, optimization, device resource constraints, and network bandwidth.

[0005] [1]Ge

[0006] [2]Li S, Zhang N, Jiang R, et al.Joint task offloading and resourceallocation in mobile edge computing with energy harvesting[J]. Journal of CloudComputing, 2022, 11(1):1-14.

[0007] [3]Ma

[0008] [4]Wu H, Zhang Z, Guan C, et al. Collaborate edge and cloud computing with distributed deep learning for smart city internet of things[J]. IEEEInternet ofThings Journal, 2020, 7(9):8099-8110.

[0009] [5]Wang F, Xu J, Wang Summary of the Invention

[0010] In the data acquisition and analysis scenarios of multi-source heterogeneous IoT sensing platforms, it is necessary to acquire massive amounts of multi-source, heterogeneous sensing data in real time. For example, a safety production IoT sensing platform needs to acquire data on toxic, flammable, and high-risk processes from different sensing devices, and quickly perform tasks such as multi-protocol sensing data conversion, storage, and interactive sharing to achieve intelligent prevention and control of safety risks in chemical industrial parks or enterprises. The sensing platform needs to enable edge computing nodes and cloud service nodes to collaborate and collect various safety production data in a short time, realize multi-protocol data fusion conversion, storage, and data publishing and subscription services, and improve the user experience through platform-wide system benefit optimization. Among these, how to reasonably allocate tasks and determine the optimal task offloading strategy directly affects the data processing efficiency of the sensing platform. To solve the above technical problems, this invention proposes an edge / cloud task offloading method based on an improved Seagull algorithm. By improving the Seagull algorithm to obtain the optimal task offloading strategy, a collaborative working mode of edge computing nodes and cloud service nodes is realized, reducing the time cost of offloading strategies. Applied to multi-source heterogeneous IoT sensing platforms, it can reduce task processing latency and improve system benefits.

[0011] Firstly, this invention provides an edge / cloud task offloading method based on an improved Seagull algorithm, applicable to multiple edge computing nodes e iFor i∈[1,N] and cloud service node Z, the deployment methods of the edge computing nodes and cloud service nodes include, but are not limited to, the following: When it is a chemical industrial park scenario, the chemical enterprises in the park are used as the edge end, and edge computing nodes with computing capabilities are deployed. If the edge node performance is sufficient, multiple enterprises can share one edge computing node. The cloud service node Z is deployed in the park's data center, specifically one server or multiple server clusters can be deployed; When it is a chemical enterprise scenario, the key control areas or factory areas within the enterprise are used as the edge end, and edge computing nodes are deployed. According to real-time data and the computing power of the edge nodes, multiple areas / factories can share one edge computing node; The cloud service node Z is deployed in the enterprise's data center, and one server or multiple server clusters can also be deployed according to the enterprise's data scale; Regardless of the deployment scenario, the cloud service node Z simultaneously faces all edge computing nodes {e i} provides data access services, and each edge computing node e i It can only be connected to Z, and different edge computing nodes (e i ,e j Data communication and exchange / sharing do not occur between i and j if i ≠ j.

[0012] The edge / cloud task unloading method includes the following steps:

[0013] The system optimization constraints are determined based on system data information, which includes the number of CPU cores m of the system cloud service node Z and the number of edge computing nodes e. i The number of computing cores m allocated to the cloud service node i Number of edge node cores n, number of tasks w i The time cost T for unloading to cloud service nodes for processing i offload Maximum processing delay T i p i For transmission bandwidth, e i minimum transmission bandwidth p base and maximum transmission bandwidth p full The task set is W, and the task w i These are the edge computing nodes e i The offloading task information for this node is constructed based on the collected multi-source heterogeneous sensing data. i =(d i ,c i ), w i ∈W,d i For the amount of data processed by the task, c iThis indicates the number of CPU cycles required to process each bit of data. The multi-source heterogeneous sensing data refers to sensing data of different data types acquired by different sensing devices. For example, in the safety production IoT platform, the sensing data includes various safety production data such as toxic, flammable, liquid level, pressure, temperature, DCS, SIS, and intermediate library.

[0014] Estimation task w i The latency T during local processing at the node i local Then, according to the task w i The latency T for offloading to cloud service nodes for processing i offload Thus, the system profit function is derived;

[0015] Construct the optimization equation for the maximum expected revenue of the system based on the system revenue function and optimization constraints;

[0016] The optimization algorithm parameters are initialized based on the chaotic mapping strategy, and the number of algorithm iterations t is defined. max The algorithm's search step size is d;

[0017] Based on the optimization equation for the maximum expected return of the system, the improved Seagull algorithm is used to solve for the optimal unloading strategy.

[0018] Based on the optimal offloading strategy, the computing tasks will be offloaded to the edge computing node e. i It is still cloud service node Z, and it completes the corresponding task processing.

[0019] The method of using the improved Seagull algorithm to solve the optimal unloading strategy includes the following steps:

[0020] S1, through the coding strategy Strategy(X), the computation unloading strategy X is encoded and mapped, so that the computation unloading strategy is converted into the spatial position x of the seagull for optimization;

[0021] S2, initialize the seagull population position x in the solution space using the Tent chaotic mapping. 0 And simultaneously calculate the seagull fitness value f(x) based on the system benefit function and optimization constraint equation. 0 The optimal fitness value f during algorithm initialization. best =f(x) 0 ), the optimal position of the seagull x bestt =x 0 ;

[0022] S3, based on the current iteration number t and the maximum iteration number t max The ratio dynamically adjusts the inertial weight w, and determines whether to choose a foraging strategy or a levy flight strategy based on the probability distribution, in order to generate a new position x' for the seagull. i .

[0023] S4, based on the seagull's new position x' i Obtain the unloading strategy for spatial location mapping and calculate the fitness value f(x'). i ), f(x' i ) greater than f best When updating the optimal fitness value f best and optimal position x best ;

[0024] S5, repeat operation S3 until the maximum number of iterations t is satisfied. max Then, based on the optimal spatial position x best The inverse operation of Strategy(X) maps it to the optimal computational offloading strategy X. best .

[0025] As a further aspect of the present invention, the formula for calculating the system revenue function is as follows:

[0026]

[0027] As a further aspect of the present invention, the calculation formula for the optimization constraint is as follows:

[0028] C1:

[0029] C2:

[0030] C3:p base ≤p i ≤p full

[0031] As a further aspect of the present invention, the optimization equation for the maximum expected return of the system is:

[0032]

[0033] st

[0034] C1:

[0035] C2:

[0036] C3:p base ≤p i ≤p full

[0037] C4:S i =0,1

[0038] Where S is the task unloading policy, and S i =0 represents edge computing node processing, Si =1 represents cloud service node processing, P is the edge computing node transmission bandwidth strategy, and M is the CPU core allocation strategy.

[0039] As a further aspect of the present invention, the initialization of the seagull population position in the solution space using the Tent chaotic mapping mainly utilizes the sequence between [0,1] generated by the chaotic mapping to initialize the seagull population according to the chaotic factor, thereby avoiding uneven distribution of seagulls in space. The mathematical model of the Tent mapping is expressed as follows:

[0040]

[0041] Where 'a' takes values ​​in the range (0.01, 0.5), the initial model can be reconstructed as follows:

[0042] x = x min +chaos×(x max -x min )

[0043] Where, x max and x min represents the upper and lower boundaries respectively, and chaos is the chaos factor of the chaotic mapping function.

[0044] As a further aspect of the present invention, in step S3, the dynamic adjustment of the inertia weight based on the ratio of the current iteration count to the maximum iteration count mainly improves the algorithm's search capability by dynamically adjusting the inertia weight, enabling the algorithm to possess global exploration capability not only in the early search phase but also in the later stages. Furthermore, the use of nonlinear inertia weights can dynamically adjust the seagull's flight speed and direction, improving optimization capability and efficiency. The formula for calculating the nonlinear inertia weights is as follows:

[0045]

[0046] Among them, w max w min These are the maximum and minimum values ​​of the inertia weight, t and t', respectively. max These represent the current iteration number and the maximum iteration number, respectively. p is an adjustment parameter used to adjust the rate of change of the inertia weight.

[0047] As a further aspect of the present invention, in step S3, the selection of a foraging strategy or a Levy flight strategy to generate a new location for the seagull is mainly determined by using a random number r that conforms to a normal probability distribution. The former updates the seagull's location based on the neighborhood fitness value, while the latter uses a Levy distribution to generate a random step size vector, which is accumulated at the seagull's current location to generate a new location. The random step size can be expressed as:

[0048]

[0049] Where σ is the step size parameter, u i Z is a random number that follows a standard normal distribution. i It is a random number that follows a standard normal distribution.

[0050] Then, the random step size vector d i Adding it to the current location will reveal the new seagull's location:

[0051] x i ′=x i +d i

[0052] Secondly, this invention provides a safety production IoT sensing system, which adopts an edge / cloud collaborative deployment model, located at the edge computing nodes of a park or enterprise. i The edge / cloud multi-to-one system architecture between i∈[1,N] and service node Z is constructed. The safe production IoT sensing system includes: multiple sensing devices, multiple edge computing nodes and cloud service nodes. The cloud service nodes provide data access services to all edge computing nodes at the same time, while the data of each edge computing node is only connected to the cloud service node in the scenario. There is no data communication or exchange between the edge computing nodes.

[0053] The sensing device is used to collect multi-source heterogeneous data on safety production in chemical industrial parks or enterprises.

[0054] The edge computing node is used to acquire the multi-source heterogeneous data for safe production, and solves the optimal offloading strategy according to the improved Seagull algorithm edge / cloud task offloading method to determine whether the acquired multi-source heterogeneous data is offloaded to the cloud service node.

[0055] The cloud service node is used to process multi-source heterogeneous data transmitted by edge computing nodes according to the optimal offloading strategy.

[0056] Beneficial effects

[0057] This invention proposes an edge / cloud task offloading method based on an improved Seagull algorithm. By integrating an edge computing task offloading model, the platform is constructed into a many-to-one edge / cloud collaborative working mode, further reducing system latency and improving the real-time performance and efficiency of platform data communication. Furthermore, the improved Seagull algorithm is a swarm optimization algorithm. Through the collaborative advancement of the optimization process by multiple individual Seagulls, the search space can be explored more comprehensively, enhancing global optimization capabilities.

[0058] This invention provides an edge / cloud task offloading method based on an improved Seagull algorithm. This method quickly obtains the optimal task offloading strategy, enabling collaborative work between edge computing nodes and cloud service nodes. This improves user experience while reducing data transmission latency, maximizing system benefits. For example, in a safety production IoT platform, the safety production data acquisition function can rapidly collect large amounts of multi-source heterogeneous data from safety production scenarios, such as toxicity, flammability, temperature, liquid level, pressure, DCS, SIS, and intermediate databases. This achieves unified access and management of massive, multi-source, and heterogeneous safety production data. Furthermore, the multi-protocol data fusion, conversion, and storage functions support intelligent fusion and conversion of mainstream transmission protocols such as HTTP, MQTT, OPC, and Modbus, as well as database exchange services. This eliminates the need for complex data conversion and adaptation on the requesting party, simplifying the data interaction process and ensuring data integrity and consistency.

[0059] Compared to existing IoT sensing platform design methods, concentrating computational tasks solely on the edge / cloud significantly increases transmission and processing pressure. This patent employs a multi-to-edge / cloud collaborative working mode based on edge computing, arranging data acquisition only at the edge. For tasks such as data dumping, an offloading strategy determines the execution target on the edge / cloud, thus more effectively balancing the computational pressure between edge / cloud nodes, reducing network overhead and platform latency, and significantly improving the real-time performance and efficiency of task processing. Furthermore, compared to the particle swarm optimization (PSO) algorithm used in existing edge computing technologies, which randomly searches based on particle velocity and direction and records its own and the global optimal solution to influence the velocity and position of iterating particles, this patent uses an improved seagull algorithm. This algorithm initializes the population position through chaotic mapping, enhancing its global search capability, and generates new seagull positions by probabilistically determining the seagull's foraging or levy flight strategy, allowing the algorithm to escape local optima. In contrast, the PSO algorithm can only update velocity based on the position of the optimal individual, easily leading to uneven population distribution, while the improved seagull algorithm has stronger exploration capabilities and adaptability. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart illustrating the edge task offloading strategy based on the improved Seagull algorithm in the method of this invention.

[0062] Figure 2This is a flowchart illustrating the process of using the improved Seagull algorithm to solve for the optimal unloading strategy in the method of this invention.

[0063] Figure 3 This is a schematic diagram illustrating the deployment of a safety production perception data collection service scenario in a specific embodiment.

[0064] Figure 4 This is a diagram of the configuration interface for multi-source heterogeneous data acquisition in a specific embodiment.

[0065] Figure 5 This is a diagram showing the storage configuration interface for different protocol conversions in a specific embodiment.

[0066] Figure 6 This is a diagram of the system management interface in a specific embodiment.

[0067] Figure 7 This is a diagram of the edge computing node management interface in a specific embodiment.

[0068] Figure 8 This is a diagram of the sensing device management interface in a specific embodiment.

[0069] Figure 9 This is a diagram of the multi-data source fusion collection and management interface of the data service provider in a specific embodiment.

[0070] Figure 10 This is a diagram of the multi-data source fusion application management interface for the data requester in a specific embodiment.

[0071] Figure 11 This is a diagram of the interface for isolating and managing sensitive data related to safe production in a specific embodiment.

[0072] Figure 12 This is a diagram of the customized configuration management interface for data requests in a specific embodiment.

[0073] Figure 13 The following are diagrams illustrating the construction of different message publishing queue interfaces in specific implementation methods;

[0074] Figure 14 The average time cost consumed by each method for obtaining the unloading strategy in different task scales in the specific implementation embodiments;

[0075] Figure 15 This is the platform deployment interface in a specific implementation embodiment;

[0076] Figure 16 This is a comparison chart showing the time consumption of edge / cloud collaboration versus local processing in a specific implementation method. Detailed Implementation

[0077] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. The advantages and features of the present invention will become clearer from the following description and claims. It should be noted that the drawings are in a simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the present invention.

[0078] For ease of understanding, Figure 3 Taking the safety production perception data collection service scenario shown as an example, the perception platform design method of the present invention is specifically illustrated. Specifically, this scenario consists of multiple multi-source heterogeneous data sources, edge computing nodes, and a cloud service node, adopting an edge / cloud collaborative deployment model. The edge computing node e in the park or enterprise... i The system architecture is a multi-to-one edge / cloud architecture that builds a platform between i∈[1,N] and service node Z. Sensors for toxicity, flammability, temperature, liquid level, and pressure, as well as systems such as DCS, SIS, and intermediate libraries, serve as multi-source heterogeneous data sources for safe production, deployed in various chemical enterprises or key controlled areas / plants. Multiple edge computing nodes are connected to each data source via wireless or wired networks. A proactive data push and passive synchronization service mode is designed. Through direct data transmission, idle batch synchronization mechanisms, and a data front-end library, the proactive push and passive synchronization service needs of data requesters are met. Each edge computing node can correspond to multiple data sources based on site conditions and computing power, and all are connected to a cloud service node deployed in a park data center or enterprise server room. This architecture constructs a many-to-one edge / cloud collaborative working structure, building an edge service terminal platform based on an edge computing model. Through device binding and database integration, it collects and performs multi-protocol data conversion and storage at the edge, supporting various communication protocols such as HTTP, MQTT, OPC, and Modbus, thereby providing edge data services to data requesters. It also constructs a cloud service terminal platform based on an edge computing model, maintaining the basic general management and configuration of the edge / cloud platforms, enabling the fusion and application of heterogeneous sensing data, and completing multi-protocol data conversion and storage in the cloud, supporting various communication protocols such as HTTP, MQTT, OPC, and Modbus, thereby providing cloud data services to data requesters. Finally, it establishes a security-sensitive data isolation mechanism to realize the data resource pool of data providers. i}, i∈[1,N] and the data service list {SL i Sensitive data isolation between i∈[1,N] is implemented to achieve data resource security and privacy protection, and to provide selective data publishing services to providers; a message queue and data customization mechanism are constructed to send data to the data requester r. i The data personalized subscription service for the required sensing data is provided for i∈[1,M]. In the case of task offloading, the cloud service node can dynamically adjust the number of CPU cores allocated to each edge computing node to realize the processing of offloading tasks.

[0079] In this embodiment of the invention, the toxic, flammable, pressure, temperature, and liquid level sensors follow either the Modbus or MQTT protocol, while the DCS and SIS systems follow the OPC protocol, and the data acquisition intermediate library follows the HTTP protocol. Specifically, based on the platform's sensing device configuration information, the protocol type of the heterogeneous data source to be acquired is determined, thereby determining the appropriate acquisition method. For relational databases, a direct database transmission method is used. Based on the relational database address (dataArr), port number (dataPort), database name (dataName), username (dataUser), and password (dataPassWord) provided by the data provider, data resources are directly acquired from the provider's database via a database connection. For the Modbus protocol, a Modbus real-time data parsing method is used. Based on the serial port configuration provided by the data provider, including the baud rate (modBaudRate), data bits (modDataBit), stop bits (modStopBit), and check bits (modCheckBit), information such as the device name (modDeviceName) and data field (modDataName) is used to connect the platform's acquisition module (modbusAnalyze) and the Modbus device ({mo i The platform's data acquisition module opcAnalyze is associated with the OPC data acquisition object {o} and data is collected via pymodbus. For the OPC protocol, real-time OPC data parsing is used. Based on the IP address opcIP, port number opcPort, username opcUserName, password opcPassWord, field name opcDataName, and field type opcDataType provided by the data provider, the platform's data acquisition module opcAnalyze is linked with the OPC data acquisition object {o}. i The system is associated with the MQTT protocol and uses OPCUA to collect the required data. For the MQTT protocol, real-time data parsing is employed. Based on the IP address (mqtIP), port number (mqtPort), username (mqtUserName), password (mqtPassWord), and topic (mqtTopic) provided by the data provider, the collection module `mqtAnalyze` is linked to the collection object `{mqt...}`. i} to establish a connection, and collect the required data through paho.mqtt.

[0080] In terms of functional deployment, each edge computing node deploys an edge service terminal platform to achieve multi-source heterogeneous data acquisition from the aforementioned various sensors, DCS, SIS, and intermediate library systems, specifically as follows: Figure 4As shown, the data collection function is implemented by selecting the data source protocol type, entering relevant basic information, and using a Python script. Secondly, an edge task offloading strategy based on the improved Seagull algorithm is solved to determine the edge / cloud offloading processing objects for the collected data. Thirdly, the conversion and storage functions for multi-protocol data such as HTTP, MQTT, OPC, and Modbus are implemented, specifically as follows... Figure 5 As shown, by selecting the data access type and protocol type, configuring the corresponding data source conversion and storage basic information, and using an efficient Python script to perform data field mapping and encoding method conversion and database entry; the specific data conversion and storage implementation method is as follows: based on the protocol type of the heterogeneous data source acquired, determine which protocol conversion and storage strategy to use for data dumping; for the direct database transmission method, the platform does not perform protocol conversion and directly transmits the acquired data field {dFile}. iThe system performs data storage operations according to the platform repository address (DBIP), port (DBPort), user (DBUserName), password (DBPassWord), database name (DBName), and table name (tableName). For the Modbus protocol, it verifies the data based on the data source address (modSourceAddress) and checksum (modCheckData), parses the raw hexadecimal data (modHexData), and converts it into actual perceived data (deviceData) according to the protocol rule (modRule). Then, based on the unique identifier (deviceId) of the data source, it stores the parsed actual perceived data in InfluxDB as full data, while simultaneously updating it in Redis for real-time data storage. For the OPC protocol, it determines the success of the response by extracting and parsing the message header data (opcHeader), and retrieves the data from the data field (opcDataField) according to the protocol specification (opcRule). The system retrieves response data such as `opcDeviceData` and `opcTimeStamp`, and then stores the parsed actual perceived data `deviceData` in InfluxDB as the full dataset based on the unique identifier `deviceId`. Simultaneously, it updates Redis for real-time data storage. For the MQTT protocol, it extracts and parses the message header data `mqtHeader` to determine if the response was successful. Based on the protocol specification `mqtRule`, it retrieves response data such as `mqtResData` and `mqtTimeStamp`, and then stores the parsed actual perceived data `deviceData` in InfluxDB as the full dataset based on the unique identifier `deviceId`. Simultaneously, it updates Redis for real-time data storage. Finally, it implements active push or passive synchronization services for various types of data, uniformly converting data into JSON feedback messages and exchanging data using direct data transmission or idle batch synchronization mechanisms.

[0081] Correspondingly, cloud service nodes deploy cloud service sub-platforms to achieve general management and configuration functions for the edge / cloud sub-platforms, specifically as follows: Figures 6-8 As shown, Figure 6 Configure and maintain system management functions such as users, roles, and permissions. Figure 7 Manage edge computing nodes, Figure 8 The system manages sensing devices that serve as multi-source heterogeneous data sources; secondly, it manages the fusion and application of sensing data from various data providers and requesters, specifically as follows: Figures 9-10 As shown, Figure 9 Configure the data source at the business level as a provider data resource pool, and Figure 10Then, based on the application requirements of the requesting party, configure the data request list and JSON feedback format; third, similar to the edge computing nodes, the cloud service nodes also implement the conversion and storage functions of multi-protocol data such as HTTP, MQTT, OPC, and Modbus, and realize active data push or passive synchronization services through direct data transmission or data front-end library.

[0082] In addition, the function of isolating sensitive production data for security purposes is simultaneously implemented on the cloud service terminal platform, specifically as follows: Figure 11 As shown, data providers can select and configure sensitive data resources that are not suitable for public exposure, using access control to ensure the controllability and security of data access. Furthermore, message queue construction and data customization functions are deployed on the cloud service terminal platform, specifically as follows... Figure 12 and Figure 13 As shown, Figure 12 By allowing the data requester to select and configure accessible data, a request data list is created, enabling customization of data requests. Figure 13 Based on the data requirements of the data requester, different message publishing queues are built using RabbitMQ, and different data are pushed to the corresponding queues for data service.

[0083] Based on the deployment in the above scenarios, the collection of safety production data will generate various data processing tasks, such as protocol conversion and storage between data of different protocols, and unified JSON message organization and feedback. However, due to the limited computing power of edge computing nodes, placing all computing tasks on the edge for processing will severely impact system performance. Therefore, cloud service nodes are needed to assist in processing. Here, we assume that the cloud service node has m CPU cores, the number of edge computing nodes is N, and there is only one computationally intensive task w in the same offload time slot. i =(d i ,c i ), i∈N need to be processed, where d i c represents the amount of computational data required for the task. i To calculate the number of CPU cycles required per bit of data. In addition, let's assume the offloading strategy for node i is s. i , where s ij =0 indicates that the edge computing node e i Task w i Uninstall to cloud service nodes for processing, s ij =1 indicates that processing is done locally on the node. The computational unloading strategy satisfies the following constraints:

[0084] C1

[0085] C2:

[0086] C3:pbase ≤p i ≤p full

[0087] Where, m i Represents edge computing node e i The number of computing cores allocated to cloud service nodes, T i To maximize processing latency, p i For transmission bandwidth, p base and p full These represent the minimum and maximum transmission bandwidth of the edge computing node, respectively.

[0088] Since edge computing nodes, as edge devices, have a certain computing capability, node e i The local processing latency can be expressed as:

[0089]

[0090] Where, d i ×c i Represents the computational task w i Number of CPU cycles required, f i Represents edge computing node e i Its processing capacity.

[0091] Correspondingly, when offloading a task to a cloud service node for processing, it requires steps such as offloading and transmission, allocating processing tasks, and providing result feedback. Therefore, in this invention, to simplify the model, the latency caused by the cloud service node forwarding data packets is ignored, and the task w is... i The latency incurred during offloading to the cloud service node for processing is defined as Timec, and expressed as follows:

[0092]

[0093] Where Titan represents the edge computing node i carrying task w i The time consumed by unloading and transferring data to the cloud service node; Timecexe represents the time the cloud service node takes to process the task w. i The time consumed.

[0094] At this point, for edge computing node e i In terms of task w i The processing latency can be calculated based on the unloading strategy. i The specific calculation formula is as follows:

[0095]

[0096] Since the benefits of task unloading are determined by execution latency, the following formula is used to better quantify the benefits of the unloading strategy and represent the system benefits brought by unloading task i:

[0097]

[0098] Where Tilocal represents task w i Tioffload represents the time cost of processing task i locally on the edge computing node.

[0099] Then, by leveraging the prior knowledge of edge computing, the overall benefit of the sensing platform can be modeled as an optimization function, which can be expressed as:

[0100]

[0101] st

[0102] C1:

[0103] C2:

[0104] C3:p base ≤p i ≤p full

[0105] C4:S i =0,1

[0106] After clarifying the system revenue function and mapping strategy, the optimal unloading strategy can be solved using the computational unloading method based on the improved Seagull algorithm proposed in this invention. The specific process is as follows:

[0107]

[0108]

[0109] To verify the effectiveness of the computational unloading method proposed in this invention, the improved Seagull Algorithm (CISOA) and the original Seagull Algorithm (SOA) were compared in optimization effectiveness on single-peak test functions (F1, F2, ..., F7) and multi-peak test functions (F8, F9, ..., F13). Furthermore, CISOA was ablated, and the Tent mapping algorithm was used to replace the traditional method in the original SOA method to initialize the population's position and velocity, constructing a Seagull Algorithm based on chaotic mapping (CSOA). Simultaneously, a non-inertial weight mechanism was introduced into the original SOA method to dynamically adjust individual velocity and position, constructing a Seagull Algorithm based on nonlinear inertial weights (ISOA). Finally, SOA, CSOA, ISOA, and CISOA were compared through ablation to further verify the effectiveness of the method proposed in this invention.

[0110] The specific algorithm content of the original Seagull Algorithm (SOA) is found in the literature Dhiman G, and Vijay K. Seagull optimization algorithm: Theory and its applications for large-scale industrial engineering problems[J]. Knowledge-based systems, 2019, 165: 169-196.

[0111] To ensure experimental fairness, the initial population was set to 30, the number of independent runs was 30, and the number of iterations was 500. Table 1 shows the comparison results of the mean ± standard deviation of each algorithm on different test functions.

[0112] Table 1. Comparison of optimization results of various algorithms in 30 dimensions (mean ± standard deviation)

[0113]

[0114]

[0115] As shown in Table 1, the CISOA algorithm proposed in this invention achieved the best results in all test functions with a small standard deviation, indicating its high reliability and stability. This is because the algorithm introduces chaotic mapping, enabling it to search the solution space in a more random and diverse manner, exploring potential optimal solutions globally. Furthermore, utilizing probabilistic foraging strategies or Levy flight strategies balances local and global searches, improving the algorithm's ability to escape local optima.

[0116] After verifying the effectiveness of the algorithm, this invention sets parameters based on the safety production perception data collection service scenario in the embodiments. Core parameters such as network bandwidth and CPU frequency are shown in Table 2. The cloud service node is responsible for platform configuration and collaborative task processing, while the edge computing node is responsible for data access, task offloading, execution decision-making, and task processing.

[0117] Table 2 shows the scene parameter values ​​in the embodiments.

[0118] <![CDATA[f i (Edge computing node CPU frequency) 2GHz <![CDATA[f mec (Cloud service node CPU frequency) 4GHz θ (transmission efficiency) 0.8 m (Number of CPU cores on a cloud service node) 16 <![CDATA[p full (Full bandwidth) 100Mbps <![CDATA[p base (basic bandwidth) 80Mbps

[0119] Figure 14 This represents the average time cost consumed by each method in obtaining the unloading strategy for different task scales under the above scenario parameters. As shown by the curves in the figure, the method proposed in this invention requires the lowest time cost for the same task scale. This is because the randomness of chaotic mapping can improve global search capabilities, and the Levy flight strategy has a larger step size and a greater jump capability, enabling it to escape local optima more quickly and accelerate the search process. This further verifies the credibility of the method proposed in this invention.

[0120] Figure 15 This is the platform deployment interface deployed according to the above settings. The real-time display of this interface demonstrates that the method of this invention can be effectively implemented in real-world scenarios, achieving edge / cloud collaborative secure production data collection and analysis functions, and thus possessing practical application value. Furthermore, Figure 16 Furthermore, it shows that when one cloud service node and three edge computing nodes are deployed in the scenario, the time consumption of edge / cloud collaboration is significantly less than that of local processing. This is because, through a reasonable computing offloading strategy, the edge computing node can offload tasks to relatively idle and more powerful cloud service nodes for processing, thereby improving task processing efficiency and reducing time latency.

[0121] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the scope of protection of the present invention.

Claims

1. A method for offloading edge / cloud tasks based on an improved Seagull algorithm, applied to multiple edge computing nodes e i i∈[1,N] and cloud service node Z, characterized in that, The edge / cloud task unloading method includes the following steps: The system optimization constraints are determined based on system data information, which includes the number of CPU cores m of the system cloud service node Z and the number of edge computing nodes e. i The number of computing cores m allocated to the cloud service node i Number of edge node cores n, number of tasks w i The time cost T for unloading to cloud service nodes for processing i offload Maximum processing delay T i p i For transmission bandwidth, e i minimum transmission bandwidth p base and maximum transmission bandwidth p full ;Task Let W be the set, and let w be the task i These are the edge computing nodes e i The offloading task information for this node is constructed based on the collected multi-source heterogeneous sensing data. i =(d i ,c i ), w i ∈W,d i For the amount of data processed by the task, c i This indicates the number of CPU cycles required to process each bit of data. The multi-source heterogeneous sensing data refers to sensing data of different data types acquired by different sensing devices. Estimation task w i The latency T during local processing at the node i local Then, according to the task w i The latency T for offloading to cloud service nodes for processing i offload Thus, the system profit function is derived; Construct the optimization equation for the maximum expected revenue of the system based on the system revenue function and optimization constraints; The optimization algorithm parameters are initialized based on the chaotic mapping strategy, and the number of algorithm iterations t is defined. max The algorithm's search step size is d; Based on the optimization equation for the maximum expected return of the system, the improved Seagull algorithm is used to solve for the optimal unloading strategy. Based on the optimal offloading strategy, the computing tasks will be offloaded to the edge computing node e. i It is still cloud service node Z, and it completes the corresponding task processing; The method of using the improved Seagull algorithm to solve the optimal unloading strategy includes the following steps: S1, through the coding strategy Strategy(X), the computation unloading strategy X is encoded and mapped, so that the computation unloading strategy is converted into the spatial position x of the seagull for optimization; S2, initialize the seagull population position x in the solution space using the Tent chaotic mapping. 0 And simultaneously calculate the seagull fitness value f(x) based on the system benefit function and optimization constraint equation. 0 The optimal fitness value f during algorithm initialization. best =f(x) 0 ), the optimal position of the seagull x bestt =x 0 ; S3, based on the current iteration number t and the maximum iteration number t max The ratio dynamically adjusts the inertial weight w, and determines whether to choose a foraging strategy or a levy flight strategy based on the probability distribution, in order to generate a new position x' for the seagull. i ; S4, based on the seagull's new position x' i Obtain the unloading strategy for spatial location mapping and calculate the fitness value f(x'). i ), f(x' i ) greater than f best When updating the optimal fitness value f best and optimal position x best ; S5, repeat operation S3 until the maximum number of iterations t is satisfied. max Then, based on the optimal spatial position x best By inverse operation of Strategy(X), it is mapped to the optimal computation unloading strategy X. best .

2. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, The formula for calculating the system's revenue function is as follows:

3. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, The calculation formula for the optimization constraints is as follows: C1: C2: C3:p base ≤p i ≤p full 。 4. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, The optimization equation for the maximum expected return of the system is: st C1: C2: C3:p base ≤p i ≤p full C4:Si = 0, 1, Where S is the task unloading policy, and S i =0 represents edge computing node processing, S i =1 represents cloud service node processing, P is the edge computing node transmission bandwidth strategy, and M is the CPU core allocation strategy.

5. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, The initialization of the seagull population positions in the solution space using the Tent chaotic map involves using the sequence between [0,1] generated by the chaotic map and initializing the seagull population according to the chaos factor. The mathematical model of the Tent map is expressed as follows: Where 'a' takes values ​​in the range (0.01, 0.5), the initial model can be reconstructed as follows: x=x min +chaos×(x max -x min ) Where, x max and x min represents the upper and lower boundaries respectively, and chaos is the chaos factor of the chaotic mapping function.

6. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, In step S3, dynamically adjusting the inertia weight based on the ratio of the current iteration count to the maximum iteration count improves the algorithm's search capability. The inertia weight is a non-linear inertia weight, and its calculation formula is as follows: Among them, w max w min These are the maximum and minimum values ​​of the inertia weight, t and t', respectively. max These represent the current iteration number and the maximum iteration number, respectively, and p is an adjustment parameter used to adjust the rate of change of the inertia weight.

7. The edge / cloud task offloading method based on the improved Seagull algorithm as described in claim 1, characterized in that, In step S3, the selection of a foraging strategy or a Levy flight strategy to generate a new location for the seagull is determined by using a random number r that conforms to a normal probability distribution. The former updates the seagull's location based on the neighborhood fitness value, while the latter uses a Levy distribution to generate a random step-size vector, which is accumulated at the seagull's current location to generate a new location. The random step-size can be expressed as: Where σ is the step size parameter, u i Z is a random number that follows a standard normal distribution. i It is a random number that follows a standard normal distribution; Then, the random step size vector d i Adding it to the current location will reveal the new seagull's location: x i ′=x i +d i 。 8. A safety production IoT sensing system, characterized in that, The safety production IoT sensing system adopts an edge / cloud collaborative deployment model, with edge computing nodes in the park or enterprise... i The edge / cloud multi-to-one system architecture between i∈[1,N] and service node Z is constructed. The safe production IoT sensing system includes: multiple sensing devices, multiple edge computing nodes and cloud service nodes. The cloud service nodes provide data access services to all edge computing nodes at the same time, while the data of each edge computing node is only connected to the cloud service node in the scenario. There is no data communication or exchange between the edge computing nodes. The sensing device is used to collect multi-source heterogeneous data on safety production in chemical industrial parks or enterprises. The edge computing node is used to acquire the multi-source heterogeneous data for safe production, and solves the optimal offloading strategy according to the improved Seagull algorithm edge / cloud task offloading method according to claim 1, so as to determine whether the acquired multi-source heterogeneous data is offloaded to the cloud service node. The cloud service node is used to process multi-source heterogeneous data transmitted by edge computing nodes according to the optimal offloading strategy.