Data communication method and device based on edge gateway, storage medium and program product
By deploying a lightweight target segmentation model on the edge gateway, real-time perception and prediction of the network status on the terminal side are achieved, solving the problem of disconnect between the central and terminal status perception, constructing an adaptive data transmission system, and improving the reliability of data transmission and user experience.
Patent Information
- Application Number
- CN202511469255.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-02-27
AI Technical Summary
In traditional data communication, the central gateway cannot perceive the network status on the terminal side in real time, which leads to data packet congestion and loss, affecting user experience.
Deploy a lightweight target segmentation model customized for the terminal on the edge gateway. By collecting multi-dimensional transmission status sequence data in real time, predict the data segmentation size and perform secondary segmentation to form an adaptive data transmission system that is collaborative between the end and the edge.
It significantly reduces packet loss and retransmission rates on the terminal side, improves the reliability and efficiency of data transmission, ensures service continuity and stability, and provides higher service quality and user experience.
Smart Images

Figure CN121585673A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data communication, and particularly relates to a data communication method based on an edge gateway, a device, a storage medium and a program product. BACKGROUND
[0002] When a terminal device (hereinafter referred to as "terminal") initiates a network data request, the data flow usually follows a transmission path of "central gateway -> router -> terminal": after the terminal initiates a data request through HTTP / HTTPS or QUIC protocol, the gateway performs fragmentation processing on the network data according to the request content, and transmits the fragmented data blocks to the terminal through the router.
[0003] However, in the process of transmitting data packets to the terminal, the terminal side may appear data packet transmission congestion. Since the gateway usually cannot perceive the transmission state of the terminal side in real time, it will continue to send data packets to the terminal during data transmission. This mechanism may cause data packet loss on the terminal side, and as the transmission continues, the packet loss problem may further intensify, eventually causing service interruption or service quality degradation, seriously affecting user experience. SUMMARY
[0004] Unlike the traditional data communication method of static data blocking and transmission according to a fixed blocking strategy, the embodiment of the present application provides a dynamic and static combined data communication method. The traditional method cannot perceive the transmission state of the terminal side in real time, and can only transmit the data blocks of the network data requested by the terminal from the remote central gateway to the terminal after static blocking, which will cause data packet loss on the terminal side. In the embodiment of the present application, the edge gateway of the target terminal performs secondary fragmentation on the first data block according to the second blocking size predicted by the target blocking model according to the real-time perceived network transmission state of the terminal side after receiving the statically fragmented data block, so as to transmit the fragmented second data block to the target terminal, realizing the paradigm shift from "central static blocking" to "edge dynamic blocking", building an end-edge collaborative adaptive data transmission system, and finally providing higher service quality and better experience quality data transmission service for terminal users in complex and changeable network environment.
[0005] The embodiment of the application provides a data communication method based on an edge gateway, which is applied to an edge gateway in an edge service network, the edge gateway and a center gateway in the edge service network are located in a first network, and the edge gateway and a target terminal are located in a second network; the method comprises the following steps: receiving a plurality of first data blocks sent by the center gateway, the plurality of first data blocks are obtained by cutting the target data according to a first block size determined by the center gateway according to a fixed block strategy; for the currently received first data block, collecting multi-dimensional transmission state sequence data between the first edge gateway and the target terminal in a current period; inputting the multi-dimensional transmission state sequence data into a target block model, predicting a second block size for sending data to the target terminal, and cutting the first data block into a plurality of second data blocks based on the second block size; and sending the plurality of second data blocks to the target terminal.
[0006] The embodiment of the application also provides an electronic device, comprising a memory and a processor; the memory is used for storing a computer program; the processor is coupled with the memory and is used for executing the computer program to realize each step in the above method.
[0007] The embodiment of the application also provides a computer readable storage medium storing a computer program, when the computer program is executed by a processor, the processor realizes each step in the above method.
[0008] The embodiment of the application also provides a computer program product, the computer program product comprises a computer program / instruction, when the computer program / instruction is executed by a processor, the processor can realize each step in the above method.
[0009] In the embodiment of the application, by deploying a terminal customized lightweight target block model in the edge gateway, real-time and accurate perception and prediction of the terminal side micro network state are realized, and the problem that the center and the terminal state perception are out of touch is solved; by a secondary block mechanism, the macro stable center block strategy and the micro dynamic edge block strategy are decoupled, so that the data block size can adaptively match the real-time network transmission state of the terminal side, the data packet loss rate and the retransmission rate of the terminal side are significantly reduced, and the reliability and efficiency of data transmission are improved; the target block model is adopted, a closed loop of 'prediction-decision-execution' is formed, the network state time sequence dependence relationship can be efficiently mined, and the optimal block strategy can be quickly selected from the strategy library, and low-delay and high-precision adaptive block decision is realized. Based on the above, finally, the scheme realizes the paradigm shift from 'center static block' to 'edge dynamic block', constructs an end-edge collaborative adaptive data transmission system, and finally provides higher service quality and better experience quality data transmission service for terminal users in a complex and changeable network environment. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings: Figure 1 A structural schematic diagram of an edge gateway-based data communication system according to an example embodiment of the present application; Figure 2 A flowchart of an edge gateway-based data communication method according to an example embodiment of the present application; Figure 3 A flowchart of another edge gateway-based data communication method according to an example embodiment of the present application; Figure 4 A structural schematic diagram of an electronic device according to an example embodiment of the present application. DETAILED DESCRIPTION
[0011] Following the above background, in the existing data transmission process, data packet loss may occur on the terminal side, and as the transmission continues, the packet loss problem may further intensify, eventually causing service interruption or service quality degradation, etc., seriously affecting user experience. Further, at least the following problems exist in the data transmission process: 1. Problem of disconnection between center node and terminal state awareness In the traditional centralized data transmission architecture, the center gateway / server and the terminal device are usually in different network domains (such as the Internet and the local area network), and there is a spatiotemporal isolation of network state awareness. The center gateway cannot accurately perceive the dynamic network state (such as jitter, bandwidth, packet loss rate) on the terminal device side in real time, resulting in that the data blocking method based on fixed or global strategy does not match the actual network environment of the terminal, which easily causes data packet loss or retransmission on the terminal side, seriously affecting the transmission efficiency and service quality (QoE).
[0012] 2. Problem of static blocking strategy unable to adapt to dynamic network Some existing dynamic blocking schemes are usually deployed in the cloud or the center gateway, and their decisions depend on the global network view or historical data, which cannot respond quickly to the microcosmic network state of a specific terminal connection that changes in an instant, and there is a decision lag, making it difficult to achieve true "end-edge" collaborative adaptation.
[0013] 3. Problem of service interruption caused by edge gateway failure When the edge gateway is introduced for localized services, if the edge gateway fails, the ongoing transmission task carried by the edge gateway and the optimization strategy matched with the specific terminal link will be interrupted, and the traditional service migration mechanism can only restore the basic connection and cannot restore the original optimization context, which requires a long relearning or convergence process, resulting in interruption and degradation of service experience.
[0014] To solve the above technical problems, in the embodiments of the present application, a terminal customized lightweight target block model is deployed in the edge gateway, realizing real-time and accurate perception and prediction of the micro network state of the terminal side, solving the problem of disconnection between the center and the terminal state perception; through a secondary block mechanism, the macro-stable center block strategy and the micro-dynamic edge block strategy are decoupled, so that the data block size can adaptively match the real-time network transmission state of the terminal side, significantly reducing the packet loss rate and retransmission rate of the terminal side, and improving the reliability and efficiency of data transmission; a target block model is adopted, forming a closed loop of "prediction-decision-execution", which can efficiently mine the time sequence dependence of network state and quickly select the optimal block strategy from the strategy library, realizing low-delay and high-precision adaptive block decision. Based on the above, the present scheme finally realizes the paradigm shift from "central static block" to "edge dynamic block", and constructs an end-edge collaborative adaptive data transmission system, finally providing higher service quality and better experience quality of data transmission services for terminal users in complex and variable network environments.
[0015] Further optionally, the dynamic block scheme is deployed in the edge gateway, which can quickly respond to the rapidly changing micro network state of a specific terminal connection and make quick decisions, realizing true "end-edge" collaborative adaptation.
[0016] Further, when the edge gateway is introduced for localized services, through the model state data migration and fine-tuning mechanism at the failure time, when the edge gateway fails, the optimization context for serving the target terminal can be quickly restored and adapted on the replacement gateway, greatly shortening the service interruption time, ensuring the continuity and stability of data transmission services, and realizing seamless user experience In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme of the present application will be described clearly and completely in combination with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0017] The above-mentioned solutions provided by the embodiments of the present application will be described in detail below in combination with the drawings.
[0018] Figure 1 This is a schematic diagram of the structure of a data communication system based on an edge gateway, provided as an exemplary embodiment of this application. Figure 1 As shown, the system includes: a central gateway 10, an edge gateway 20, and a target terminal 30.
[0019] In this embodiment, the central gateway 10 and the edge gateway 20 are located in the first network, and the edge gateway 20 and the target terminal 30 are located in the second network. The central gateway 10 and the target terminal 30 do not communicate directly. All downlink data can be forwarded from the central gateway 10 to the target terminal 30 via the edge gateway 20 adapted to the target terminal 30.
[0020] The first network is responsible for undertaking long-distance, high-bandwidth backbone interconnection tasks. It handles the batch distribution of multiple first data blocks provided in the following embodiments. These first data blocks are obtained by the central gateway determining the first block size according to a fixed block size strategy and then segmenting the target data according to that size. This embodiment does not limit the network type of the first network. For example, the first network can be an Internet backbone network, a carrier IP / MPLS leased line, a 5G bearer network (N3 / N6 interface), a cloud-based VPC high-speed channel (such as AWS Direct Connect, CEN), a cross-border SD-WAN backbone, or a satellite backhaul link (Starlink backbone segment), etc. The network type of the first network used may differ in different application scenarios.
[0021] The function of the second network is to enable access for the final transmission distance, providing low-latency, high-fluctuation terminal-level connections, and is responsible for the fine-grained distribution of the second data blocks mentioned in the following embodiments. This embodiment does not limit the network type of the second network. For example, the second network can be a home Wi-Fi 6 / 7 LAN, 5G NR (e.g., gNB→UE), 4G LTE (e.g., eNB→UE), PON fiber optic (e.g., OLT→ONU), industrial fieldbus (e.g., EtherCAT, PROFINET), automotive Ethernet (e.g., IVN), Bluetooth 5.2 LE high-bandwidth mode (e.g., edge gateway→wearable devices), etc. The network type of the second network used may differ in different application scenarios.
[0022] However, for the same data request to the target terminal, or regardless of whether the application scenarios of the first network and the second network are the same, the first network and the second network may belong to different network types.
[0023] In the embodiment, the central gateway 10 undertakes the responsibilities of global data aggregation, policy delivery, and cross-domain routing. Specifically, in an optional embodiment, the central gateway 10 can split the target data requested by the target terminal 30 into first data blocks according to a fixed splitting strategy, and deliver the first data blocks to the edge gateway 20 in batches via the first network.
[0024] In the embodiment, the edge gateway 20 is usually deployed at the user-side last-hop lightweight computing node, which can be regarded as an edge router. Specifically, the edge gateway 20 collects multi-dimensional transmission state sequence data from the target terminal side in real time, runs a lightweight target block model to predict a second block size based on the multi-dimensional transmission state sequence data, and then performs secondary splitting and delivery of the first data blocks according to the second block size to the target terminal 30, forming a closed-loop update at the data packet level. Moreover, when the edge gateway 20 in use fails, the target block model and the breakpoint can be migrated to other candidate edge gateways within a very short time (e.g., 200 ms) to ensure the continuity of the service.
[0025] Based on the above, the paradigm is changed from “central static” to “edge dynamic”, and an end-edge collaborative adaptive transmission system is constructed to continuously provide high-reliable and high-continuous data transmission experience in complex network environment.
[0026] In another optional embodiment, the central gateway 10 can also collect multi-dimensional transmission state sequence data from the edge gateway 20 in real time, run a lightweight target block model to predict a first block size based on the multi-dimensional transmission state sequence data, and then perform primary splitting and delivery of the target data according to the first block size to the edge gateway 20. Further, the edge gateway 20 collects multi-dimensional transmission state sequence data from the target terminal side in real time, runs a lightweight target block model to predict a second block size based on the multi-dimensional transmission state sequence data, and then performs secondary splitting and delivery of the first data blocks according to the second block size to the target terminal 30.
[0027] Based on the above, the double-level dynamic block is realized from “central dynamic” to “edge dynamic”, forming an end-to-end adaptive transmission system with “central-edge” collaboration. Both levels of block adjust the block size in milliseconds with micro changes in network, computing power, radio frequency, etc., which not only fully utilizes high-bandwidth backbone links, but also accurately matches the instantaneous receiving capacity of the terminal, further reduces the overall packet loss rate, retransmission rate, and transmission completion time, and continuously provides high-reliable and high-continuous data transmission experience in complex network environment.
[0028] In this embodiment, the number of edge gateways 20 used to deliver data to the target terminal 30 for this data request task can be one or more. If the number of edge gateways 20 is one, the central gateway 10 can batch deliver multiple first data blocks to the edge gateway 20 through the first network. If the number of edge gateways 20 is multiple, the central gateway 10 can batch deliver multiple first data blocks to multiple edge gateways 20 through the first network respectively.
[0029] In this embodiment, the target terminal 30 is a device for receiving data on the user side, such as a mobile phone, a personal computer (PC), a vehicle-mounted module, etc. Specifically, the target terminal 30 is used to receive second data blocks and reassemble them in order, and return an acknowledgement signal (ACK) for real-time collection of multi-dimensional transmission state sequence data by the edge gateway, without the need to install a software development kit (SDK) to enjoy adaptive block and fault-agnostic resume service.
[0030] For specific implementation of each step related to the above central gateway 10, edge gateway 20 and target terminal 30, please refer to the relevant description in the following edge gateway-based data communication method, which will not be described here.
[0031] Figure 2 A flowchart of an edge gateway-based data communication method provided for the exemplary embodiments of the present application is shown in FIG. 8. As shown in FIG. 8, the method is applied to an edge gateway in an edge service network, the edge gateway and a central gateway in the edge service network are located in a first network, and the edge gateway and a target terminal are located in a second network; the method comprises the following steps: Figure 2 201. Receiving multiple first data blocks sent by the central gateway, the multiple first data blocks being obtained by the central gateway by cutting the target data according to a fixed block strategy and a first block size; 202. For the currently received first data block, collecting multi-dimensional transmission state sequence data between the edge gateway and the target terminal in the current time period; 203. Inputting the multi-dimensional transmission state sequence data into a target block model, predicting a second block size for sending data to the target terminal, and cutting the first data block into multiple second data blocks based on the second block size; 204. Sending the multiple second data blocks to the target terminal.
[0032] In the embodiment, if the target terminal has a demand for obtaining target data, the edge gateway can send a request for obtaining the target data to the center gateway on behalf of the target terminal. After the center gateway obtains the target data, the target data is delivered to the target terminal through the edge gateway. This process is transparent to the target terminal, and the target terminal does not need to know the status of the center gateway. All intelligent decisions are made on the network side (center gateway / edge gateway), realizing "zero modification" access.
[0033] In the embodiment, the original storage location of the target data is not limited. For example, the center gateway can be a storage source station of the target data, and the center gateway can directly read the target data. Alternatively, the target data is stored in another source station, and in this case, the center gateway needs to first perform a source pull. The center gateway can also have pre-completed the pull and performed a cache operation.
[0034] Regardless of the storage mode, after the center gateway reads or obtains the target data, the first block size can be determined according to a fixed block strategy, and the target data is cut according to the first block size, so as to obtain a plurality of first data blocks. The fixed block strategy can be formulated according to the following principles: a specified block size, for example, 1024 KB (1 MB), the target data is cut according to the block size, if the size of the last data block is insufficient, the actual remaining size is processed; and / or, the byte is explicitly used as the minimum unit, to ensure that the boundaries of the data blocks are aligned with the transmission control protocol (TCP) / user datagram protocol (UDP) messages and storage pages, to avoid secondary copying; and / or, data smaller than a certain block size, such as 128 KB, is not cut, but is delivered as a whole; and / or, the size of a single data block does not exceed a certain block size, such as 4096 KB, to prevent the memory from being temporarily occupied too much. That is, the fixed block strategy can be formulated according to any one of the above principles, or can be formulated according to a combination of at least part of the principles. However, the specific content of the fixed block strategy is not limited in the embodiment, and the specific strategy content can be determined according to actual needs.
[0035] In this embodiment, the center gateway can split the target data into multiple first data blocks according to the fixed block strategy during the process of splitting the target data according to the first block size, and generate a complete block index table locally (or in memory). The block index data table at least contains the number of each first data block, the starting byte position of each data block in the original file, the length of each first data block, and the digest calculated by the center gateway for the data block content. The number is an increasing integer starting from 0, which is used to uniquely identify the first data block, and the edge gateway can be recombined in order; the starting byte position of each first data block in the original file facilitates the range check or arbitrary data block reloading operation of the edge gateway; the length of each first data block refers to the actual number of bytes of each first data block, and the last data block may be smaller than the fixed data block length, so the data block length needs to be explicitly given to avoid errors caused by truncation according to the fixed value; the digest calculated by the center gateway for the data block content refers to a fixed length string obtained by one-way hash operation on the data block, which is usually calculated by CRC32, MD5, SHA-256, etc., and is used to quickly check whether the data block is complete and tampered when received by the edge gateway. The index table is usually sent down with the first data block in the form of JSON or Protocol Buffers, which can enable the edge gateway to quickly locate, check and supplement the block during the subsequent secondary block and target terminal ACK stage, and achieve second-level fault self-healing. After splitting, multiple first data blocks are batched and sent to the corresponding edge gateway in order of data block serial number (or in parallel).
[0036] In the embodiment, the process of splitting the target data into multiple first data blocks according to the fixed block strategy and sequentially batch delivering the multiple first data blocks to the corresponding edge gateway can be implemented by means of a network protocol stack. The network protocol stack is encapsulated from top to bottom with an application layer, a presentation layer, a session layer, a transport layer, a network layer, a data link layer and a physical layer. The application layer, as a semantic-level data splitting authority, is oriented to the business process and splits the target data into multiple first data blocks according to the preset fixed block strategy (such as 1 MB per block), assigns a serial number (such as Block-1, Block-2…), and sequentially calls the transport layer interface to control the sending order and concurrency strategy of the blocks. The boundary of the first data block is thus determined, and the subsequent layers only encapsulate or segment on this basis without changing the semantic boundary. The presentation layer is used for format conversion, compression or encryption transformation of data without changing the data boundary, and it usually does not participate in block generation or transmission control. The session layer is responsible for establishing, maintaining and terminating application sessions, and can record the breakpoint position to support continuous transmission. It itself usually does not perform data splitting or delivery operation. The transport layer (such as TCP) is used to receive each first data block delivered by the application layer, segment it into several TCP segments according to the maximum segment size (MSS), add port number and sequence number, and provide end-to-end reliable transmission. The segmentation is completely invisible to the application layer and does not destroy the overall semantic boundary of the first data block. The network layer provides cross-network routing and forwarding capability for each TCP segment through IP address to ensure that it reaches the target network where the edge gateway is located. The data link layer is used to encapsulate IP packets into frames for media access control (MAC) addressing and error detection between adjacent nodes, strictly maintaining the consistency of frame boundary and IP packet boundary. Its maximum transmission unit (MTU) is only used as an upper limit constraint and does not participate in block logic. The physical layer is responsible for converting bit streams into electrical or optical signals for transmission on physical media, and has no concept of data block, but can use current rate, modulation order, etc. as features for the upper layer prediction model. In summary, the fixed block strategy is executed by the application layer and defines the boundary, the sequential delivery logic is controlled by the application layer, and the actual transmission is completed by the transport layer and the lower layers. This hierarchical mechanism not only guarantees the semantic consistency of the block strategy, but also fully utilizes the transmission capability of the protocol stack, providing a clear data basis and control premise for the edge gateway side to perform dynamic secondary block based on real-time state.
[0037] In addition, when the plurality of first data blocks are batch-delivered to the corresponding edge gateway in the order of data block sequence numbers, the central gateway can deliver the first data blocks to the first edge gateway in sequence while being split, or the central gateway can deliver the first data blocks to the first edge gateway in sequence after one-time splitting is completed. The central gateway can deliver the first data blocks to the first edge gateway in sequence while being split, which can advance the arrival time of the first first data block, thereby shortening the end-to-end Time To First Byte (TTFB), and has an immediate effect on second-opening experience-sensitive services (such as short video first frame and webpage core resources). At the same time, the source station can read and send in sequence, without occupying an amount of memory / disk buffer equal to the target data at one time, thereby reducing the instantaneous resource peak of the central gateway. In other words, the central gateway delivers the first data blocks to the first edge gateway in sequence while being split, which sacrifices a certain order and model integrity in exchange for a low delay of the first data block and a small memory occupation on the central side, and is suitable for small files, high concurrency, and first frame-sensitive scenarios. The central gateway can also deliver the first data blocks to the first edge gateway in sequence after one-time splitting is completed, and the first edge gateway starts a second dynamic splitting based on real-time state after receiving all the first data blocks, thereby achieving multiple protections of data order, model prediction integrity, verification efficiency, bandwidth utilization, and simple fault rollback in exchange for a small amount of memory overhead.
[0038] Correspondingly, referring to Figure 2 In step 201, the edge gateway receives the plurality of first data blocks sent by the central gateway, so as to perform secondary dynamic splitting on the plurality of first data blocks, thereby ensuring that the data is correct in sequence and has no holes when the subsequent terminal side is reorganized.
[0039] After receiving the plurality of first data blocks sent by the center gateway, the edge gateway collects, in step 202, multi-dimensional transmission state sequence data between the first edge gateway and the target terminal in a current time period for the currently received first data block. The current time period refers to a time interval from when the first edge node starts to send the last second data block to when the last byte of the last second data block is confirmed to be sent completely (i.e., out of the network card and receiving a local drive receipt) by the edge gateway to the target terminal. The time interval is defined by the start and end kernel timestamps of the sending event, and the length of the time interval dynamically changes with the network instantaneous state. The multi-dimensional transmission state sequence corresponding to the current time period is collected in real time as an input for the target block model to predict the optimal second block size at the next transmission time. The next transmission time refers to a time interval from when the first edge node starts to send the next second data block to the target terminal to when the last byte of the next second data block is confirmed to be sent completely (i.e., out of the network card and receiving a local drive receipt) by the edge gateway. The multi-dimensional transmission state sequence data refers to real-time state data of different cross-layer dimensions between the target terminal and the first edge gateway collected continuously in the current time period. The different cross-layer dimensions include the application layer, presentation layer, session layer, transport layer, network layer, data link layer, and physical layer of the network protocol stack between the target terminal and the first edge gateway. In addition, the different cross-layer dimensions also include the hardware layer of the target terminal.
[0040] Based on this, after collecting the multi-dimensional transmission state sequence data between the first edge gateway and the target terminal in the current period, step 203, input the multi-dimensional transmission state sequence data into the target blocking model (also known as the end-side customized model), predict the second blocking size for sending data to the target terminal, and cut the first data block into multiple second data blocks based on the second blocking size. In other words, the target blocking model is used to predict the second blocking size for sending data to the target terminal at the next transmission time according to the multi-dimensional transmission state sequence data in the current period, and the first data block is cut into multiple second data blocks based on the second blocking size. Among them, the multi-dimensional transmission state sequence data not only contains the real-time state data related to the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer of the network protocol stack between the target terminal and the first edge gateway, but also contains the real-time state data related to these layers, such as: application layer blocking success rate, retry times, average response delay and remaining byte number; presentation layer compression / encryption overhead and CPU occupancy; session layer breakpoint offset, session survival round-trip time (RTT) and resume count; transport layer MSS, RTT, jitter, retransmission rate, out-of-order rate, congestion window; network layer TTL, IP fragmentation flag, packet loss, source and destination IP, and route hop count change; data link layer MTU, MAC retransmission, bit error rate, channel occupancy and ARP delay; physical layer rate, modulation order, multiple-input multiple-output (MIMO) stream number, frequency point, signal strength indication and radio frequency temperature, which together constitute the complete network state vector required for secondary slicing on the edge gateway side. Further, the multi-dimensional transmission state sequence data also contains real-time feature data of the hardware layer of the target terminal, which includes computing power, storage, network interface, power supply and thermal control four module data, such as CPU / GPU utilization, frequency, temperature, frequency reduction flag, flash memory remaining space and wear degree, RAM remaining amount and I / O delay, network card type, MIMO stream number, packet error rate, transmit power and PA temperature, battery capacity, current, temperature and power saving mode, as well as DMA queue, bus congestion and other hardware-level QoS indicators, providing an instant portrait of the terminal-side bottleneck for the edge gateway. In this embodiment, the target blocking model predicts the protocol stack state at the next transmission time based on the trend of the real-time feature data of each layer in the current period, predicts the second blocking size at the next transmission time based on the protocol stack state at the next transmission time, and accordingly performs secondary slicing on the first data block, so that the sending rate matches the channel and terminal capacity before the next transmission time arrives, avoiding data accumulation in the air interface or terminal buffer, thereby eliminating potential transmission congestion, reducing packet loss and retransmission, improving downlink effective throughput and reducing transmission energy consumption, and realizing end-edge collaborative high-robust transmission.In addition, the real-time feature data of each layer of the network protocol stack and the real-time feature data of the hardware layer of the target terminal are comprehensively considered in prediction, and the real-time feature data of the hardware layer enables the secondary slicing decision of the edge gateway to evolve from "network single-dimension optimization" to "network + terminal double-dimension optimization", further reducing invalid retransmission and air interface waste, and improving end-to-end effective throughput. For the implementation of predicting the second block size of the data sent to the target terminal, please refer to the related description of the embodiments below, which will not be described here.
[0041] In actual applications, the target block model can be a model combined by a recurrent neural network (RNN) (or a state prediction layer), a reinforcement learning algorithm (a policy matching layer), and a data block network. The recurrent neural network model can be a long short-term memory network (LSTM), which is a special variant of a recurrent neural network and is designed to solve the gradient vanishing and gradient explosion problems (sudden rapid transmission or sudden congestion) of traditional recurrent neural networks in multi-dimensional transmission state sequence data (or simply sequence data). LSTM is widely used in time series prediction, natural language processing (NLP), speech recognition, video analysis, etc., and is particularly suitable for capturing long-term dependencies in data.
[0042] Further, the RNN can be replaced by a gated recurrent unit (GRU), i.e., the target block model can be a model combined by a GRU, a reinforcement learning algorithm, and a data block network.
[0043] GRU is a special kind of recurrent neural network designed to handle multi-dimensional transmission state sequence data. It controls information flow through a gating mechanism, solving the gradient vanishing or gradient explosion problem of traditional RNN when processing multi-dimensional transmission state sequence data. Multi-dimensional transmission state sequence data is a collection of data points arranged in chronological order, usually observations at continuous or discrete time intervals. The core feature of multi-dimensional transmission state sequence data is that there is a chronological order between data points, and there is a time dependence, i.e. the value of the current data point may be affected by the previous data points, such as network throughput, delay, etc. GRU saves historical information through memory units and considers these historical information at each step update. Time dependence refers to the correlation or dependence between the value of the current data point and the value of the previous data point, which can be short-term, long-term, periodic or trend. The gating mechanism of GRU includes update gate, reset gate and hidden state. The update gate controls how much historical information is retained in the current hidden state and how much new information is introduced, balancing the weight of historical information and current input; the reset gate controls how much historical information is forgotten in the current hidden state, deciding which historical information is no longer important, avoiding noise accumulation in long-term dependence; the hidden state saves all the information of the previous time steps, which is dynamically adjusted through the control of the update gate and the reset gate to capture the time dependence in the time series. GRU is particularly good at capturing time dependence in data, such as in network transmission, where the current network state may be affected by previous network states (such as network congestion, bandwidth changes, etc.). GRU extracts useful real-time feature data from the collected feature data (such as network layer, application layer, etc.) and converts these real-time feature data into feature vectors for subsequent decision-making process, i.e. GRU can remember these historical states and utilize them in current decision-making.
[0044] Based on the above, the processing process of GRU is roughly as follows: the multi-dimensional time series collected across layers are arranged into a matrix according to 1-RTT steps, and are sequentially sent into the network: the input vector of each step is first calculated in parallel with the hidden state of the previous time step, and then two gates are calculated, namely the update gate decides the proportion of old information to be retained, and the reset gate decides the degree of old information to be forgotten; then the hidden state of the previous time step filtered by the reset gate is combined with the current input to form a candidate state, and a nonlinear tanh is introduced to enhance the expression ability; finally, the candidate state and the original hidden state are linearly fused with the update gate as the weight, to obtain the hidden state of the current step. This state not only accumulates all the effective history before, but also absorbs the latest observation, forming a compact representation of "current period of each dimension feature and its evolution trend". When the sequence ends, the final step hidden state is extracted as a feature vector, which is directly sent to the Q-Learning algorithm for block size decision-making in milliseconds, realizing the end-to-end linkage of "history-trend-action".
[0045] The reinforcement learning algorithm can employ a Q-learning algorithm. The Q-learning algorithm is a model-free reinforcement learning algorithm used to solve the optimal policy in a Markov decision process. The algorithm learns a state-action value function (Q-value) to enable the agent to learn to choose the optimal action to maximize long-term rewards in the process of interacting with the environment. The goal of the Q-learning algorithm is to determine the best action in each state. In this application, these actions correspond to different data chunk sizes. By constantly trying different actions and updating the Q-value according to the reward, the Q-learning algorithm can learn a strategy for selecting the optimal chunk size under different network states. In other words, Q-learning is a dynamic decision-making method that can select the best action in real time according to the current network state (represented by the features extracted by the GRU), adapt to changes in the network environment, dynamically adjust the data chunk size, and optimize the transmission efficiency. Q-learning also corresponds to a reward mechanism, i.e., the Q-learning algorithm evaluates the goodness of an action through rewards. In this application, the rewards can be the improvement of transmission efficiency, the reduction of delay, or the saving of bandwidth. By maximizing these rewards, Q-learning can optimize the data chunking strategy.
[0046] Further, after obtaining the plurality of second data chunks, the plurality of second data chunks are transmitted to the target terminal in step 204. The target terminal integrates each data chunk into complete target data based on the plurality of second data chunks and the order of each data chunk. The transmission rule of the plurality of second data chunks can refer to the transmission rule of the first data chunk, i.e., variable splitting edge transmission, or transmission after one-time splitting is completed, which is not limited in this embodiment.
[0047] For the specific implementation of each embodiment described above, please refer to the relevant description of the following embodiments, which will not be described here.
[0048] The technical solutions provided by the above embodiments of the application realize real-time and accurate perception and prediction of the micro network state on the terminal side by deploying a lightweight target block model customized for the terminal at the edge gateway, and solve the problem of disconnection between the center and the terminal state perception; the macro-stable center block strategy and the micro-dynamic edge block strategy are decoupled through the secondary block mechanism, so that the data block size can adaptively match the real-time network transmission state on the terminal side, significantly reducing the packet loss rate and retransmission rate on the terminal side, and improving the reliability and efficiency of data transmission; the target block model is adopted, forming a closed loop of 'prediction-decision-execution', which can efficiently mine the time series dependence of network state and quickly select the optimal block strategy from the strategy library, realizing low-delay and high-precision adaptive block decision. Through the fault time model state data migration and fine-tuning mechanism, when the edge gateway fails, the replaced gateway can quickly recover and adapt to the optimized context for serving the target terminal, greatly shortening the service interruption time and ensuring the continuity and stability of data transmission services, realizing seamless user experience; finally, the scheme realizes the paradigm shift from 'center static block' to 'edge dynamic block', and constructs an end-edge collaborative adaptive data transmission system, finally providing higher service quality and better quality of experience for terminal users in complex and variable network environments.
[0049] In an optional embodiment, the target sub-block model is a customized and lightweight model, and the complexity of the target sub-block model is adapted to the software and hardware capabilities of the edge gateway. The complexity of the target sub-block model refers to the comprehensive measurement of the computing resources, storage resources and network bandwidth resources consumed by the model when running on the edge gateway, which is usually quantitatively represented by key indicators such as the number of parameters, the amount of calculation, the peak memory occupancy, the model file size and the inference delay. Specifically, the number of parameters refers to the total number of elements of all trainable parameter matrices and bias terms connecting adjacent neurons in the target sub-block model, which directly affects the memory occupancy size and loading time of the model; the amount of calculation refers to the number of floating point operations required for the model to complete a forward inference process, which determines the CPU or NPU computing resource occupancy rate and the response delay of a single inference; the peak memory refers to the maximum memory capacity required for activation tensors and intermediate caches during model inference, which directly determines whether the device will have an Out Of Memory (OOM) exception, and the memory benefit refers to the memory applied by the program exceeding the system available upper limit, resulting in the process being forced to terminate or crash; the inference delay refers to the complete processing time from receiving input feature data to generating output sub-block results. The software capability of the edge gateway refers to the upper limit of resources available for the target sub-block model to run and the acceleration characteristic support, which is composed of two dimensions of hardware capability and software capability. Specifically, the hardware capability includes: computing unit configuration (such as CPU core number, frequency parameter, whether to support AVX / NEON instruction set acceleration, and GPU / NPU model and corresponding peak TOPS / FLOPS computing power indicators), memory subsystem parameters (such as DDR memory capacity, bandwidth performance, whether to support ECC error correction mechanism, and peak allocatable RAM capacity - usually limited to within 4GB), storage I / O performance (such as Flash / SSD remaining storage space, read / write IOPS indicators, which determine the model cache and log persistence capability), network interface capability (such as gigabit / terabit Ethernet, Wi-Fi 6 / 7, 5G small base station, etc. Communication interface throughput and queue depth parameters) and power consumption and thermal design constraints (such as TDP power consumption limit, passive cooling or fanless design scheme, which determines whether the device can stably run high complexity models under high load conditions). The software capability covers: operating system and driver support (such as Linux distribution version, CUDA / OpenCL / Vulkan driver program, NPU SDK version information), container / sandbox environment restrictions (such as CPU quota, memory limit, API call permission configuration), runtime framework compatibility (such as support degree of edge inference engines such as TensorFlowLite, ONNX Runtime, ACL, MNN), and scheduling strategy configuration (such as real-time thread priority setting, task preemption delay parameter, which directly affects the execution stability of the inference task).The complexity and hardware and software capability adaptation refers to that the hardware indexes and software parameters are quantified into standardized scores through a preset capability and complexity mapping table, and based on the scores, lightweight processing technologies such as channel pruning, network layer pruning, quantization bit width reduction and operator fusion are dynamically implemented on the basic model, so as to ensure that the final generated target partition model is accurately matched with the actual complexity bearing capacity of the edge gateway. The adaptation mechanism enables the edge gateway to quickly complete the decision-making process from "multi-dimensional state perception" to "optimal partition strategy" in a resource-limited running environment, and finally realizes the automatic intelligent adaptation goal of "large capacity using large model and small capacity using small model".
[0050] Based on this, before inputting the multi-dimensional transmission state sequence data into the target partition model, the software and hardware capability information of the first edge gateway can be collected, including but not limited to: CPU core number, main frequency, instruction set extension, available memory capacity, AI accelerator computing power and maximum throughput of network card; based on the software and hardware capability information of the first edge gateway, the basic partition model is subjected to lightweight processing to obtain the target partition model, and the basic partition model is obtained by training the initial partition model according to the partition sample set; the target partition model is deployed to the first edge gateway. In this embodiment, by first collecting the software and hardware capability information such as CPU, memory, computing power and interface specifications of the edge gateway, and then performing lightweight processing such as channel pruning, parameter quantization and operator fusion on the basic partition model, the obtained target partition model is accurately matched in complexity with the hardware resources of the edge gateway. The customized model can realize millisecond-level inference under limited computing power on the edge side, which not only retains the ability to predict the optimal second partition size at the next transmission time according to the multi-dimensional transmission state sequence, but also avoids inference delay and resource preemption caused by excessive model, thereby ensuring real-time and accurate secondary splitting decision, further reducing the risk of transmission congestion and packet loss, and realizing efficient and low-consumption end-edge collaborative adaptive transmission, thereby laying a foundation for realizing the paradigm shift from "central static partition" to "edge dynamic partition".
[0051] Optionally, based on the first edge gateway hardware and software capability information, the basic block model is processed to obtain a target block model, including: based on the pre-set capability and complexity mapping table, performing at least one of channel pruning, quantization and operator fusion on the basic block model according to the hardware and software capability information to obtain a target block model matched with the computing power resources of the first edge gateway; the target block model is issued and deployed to the first edge gateway to predict the second block size of the data transmitted to the target terminal based on the multi-dimensional transmission state sequence data on the first edge gateway. In this embodiment, the CPU, memory, computing power and network card capacity of the edge gateway are quantized through the capability and complexity mapping table, and the basic block model is automatically pruned, quantized or fused to obtain a target block model that is precisely matched with the hardware resources of the edge gateway in terms of size, calculation amount and memory occupation; the lightweight model can realize millisecond-level inference on the edge side, and immediately predict the optimal second block size at the next transmission time according to the multi-dimensional transmission state sequence, which not only avoids resource preemption and delay caused by excessive model, but also ensures the real-time and accuracy of block decision, thereby effectively reducing transmission congestion and packet loss, improving end-to-end throughput and user experience, and realizing efficient and low-consumption adaptive transmission under the cooperation of edge and end.
[0052] In an optional embodiment, the target block model includes a state prediction layer, a policy matching layer and a data block layer, wherein the policy layer maintains a data block strategy, which is not a fixed strategy, but an "action-value table" automatically generated and continuously dynamically updated by the policy matching layer through training and online running. Specifically, it includes the following three steps: Step one, offline training to generate an initial strategy library A Q(s, a) table or a policy network π(s) is obtained by using historical block samples (state→action→reward) through Q-learning or policy gradient training, where s is the feature vector output by GRU, and a is the candidate block size (such as 128 KB, 256 KB…2 MB). Training goal: maximize long-term cumulative reward ( ). After training, only Top-K Q value actions or strategies with probabilities greater than a threshold are retained to form a lightweight strategy library.
[0053] Step two, online fine-tuning and continuous optimization After the edge gateway sends each second data block, the "transmission result" is used as the immediate reward r, and the formula is used to perform one-step online update on the strategy library or strategy network, so that the strategy dynamically drifts with the network, terminal and hardware state changes.
[0054] Wherein, α is the learning rate, which controls the step length of the update; γ is the discount factor, which represents the weight of future returns; It is in state The immediate reward obtained after taking the action at; maxQ( a) is the next state The maximum possible return is calculated as follows: r reflects only the speed, waste, and latency of the most recent data transfer, and is fixed after calculation to evaluate this operation; the expected return Q(s,a) records the estimated discounted total return after choosing block size a in state s and continuing according to the optimal strategy. Since there are multiple future steps, Q needs to consider the "next maximum Q," forming a recursion: The first item within the parentheses It refers to "current benefit"; the second term γmaxQ( a) represents the "maximum expected future return." The sum of these two values yields the "estimated total return for this operation," which is then used with a learning rate α to bring the old Q closer to the new estimate. In terms of relationship, r is the sample label, and Q is the parameter to be regressed; each transmission generates a new r, used to update Q. r is only related to the most recent operation, while Q contains the expectation of the optimal future path, making it more stable and better suited for decision-making. As r is continuously generated, Q gradually converges, and the strategy naturally tends towards "choosing the block size that maximizes long-term returns." Therefore, r provides the unique observation of "current profit and loss," which Q-Learning uses to correct Q, making Q increasingly accurate in answering "how much long-term return can be obtained by choosing block a in state s," thereby guiding the edge gateway to choose the optimal second block size in the next state.
[0055] Step 3: Capability and Complexity Mapping Pruning Based on parameters such as the edge gateway's CPU, memory, and NPU computing power, the action space of the policy base is further pruned (e.g., only retaining the four most commonly used block sizes) to ensure that the policy layer can quickly complete the "feature → optimal action" query. For example, the optimal action could be "divide the data into blocks of 128 KB / 256 KB... / 2 MB". Ultimately, the strategy matching layer maintains a real-time refreshed Q table, where each row represents "which block size yields the greatest long-term benefit in the current state," thus forming a dynamically updatable data partitioning strategy.
[0056] Based on this, the multi-dimensional transmission state sequence data is input into the target block model, the second block size for sending data to the target terminal is predicted, and the first data block is divided into a plurality of second data blocks based on the second block size, including: inputting the multi-dimensional transmission state sequence data into a state prediction layer, predicting the target transmission state corresponding to the multi-cross-layer dimension at the next time based on the state dependence relationship and state change trend of the multi-cross-layer dimension at the current time period, the multi-dimensional transmission state sequence data being real-time state data of different cross-layer dimensions between the target terminal and the edge gateway continuously collected at the current time period; inputting the target transmission state into a strategy matching layer, selecting a target data block strategy suitable for the target transmission state from a plurality of data block strategies, and taking the block size corresponding to the target data block strategy as the second block size corresponding to the target transmission state; inputting the second block size and the first data block into a data block layer, and dividing the first data block into a plurality of second data blocks based on the second block size. In the embodiment, first, by deploying a lightweight target block model customized for terminals on the edge node, real-time and accurate perception and prediction of the micro network state on the terminal side are realized, and the problem of disconnection between the center and the terminal state perception is solved. Secondly, the target block model composed of the state prediction layer, the strategy matching layer and the data block layer forms a closed loop of "prediction-decision-execution", can efficiently mine the time sequence dependence relationship of the network state, and quickly select the optimal block strategy from the strategy library, realizes low-delay and high-precision adaptive block decision, and thus lays a foundation for realizing the paradigm shift from "central static block" to "edge dynamic block".
[0057] Optionally, the multi-dimensional transmission state sequence data is input into a state prediction layer, and a target transmission state corresponding to the multi-cross-layer dimension at the next time is predicted based on a state dependence relationship and a state change trend of the multi-cross-layer dimension at a current time period, including: inputting the multi-dimensional transmission state sequence data into the state prediction layer, taking a sending time window of a last second data block that has been sent as the current time period, collecting multi-dimensional transmission state sequence data covering an application layer, a transmission layer, a network layer, a data link layer, a physical layer and a target terminal hardware layer according to a fixed round-trip time (RTT) step, the round-trip time being a total time experienced by data from an edge gateway to a target terminal and returning an acknowledgement (ACK), and being commonly used to measure network delay; inputting the multi-dimensional transmission state sequence data into a bidirectional gated recurrent unit, extracting a forward state dependence relationship and a reverse state dependence relationship respectively, and obtaining a comprehensive hidden state vector; performing causal convolution on the comprehensive hidden state vector to infer a target transmission state corresponding to the multi-cross-layer dimension at the next transmission time. In this embodiment, the cross-layer state dependence is explicitly captured by the bidirectional gated recurrent unit, and the multi-dimensional state at the next transmission time is directly inferred by causal convolution, the prediction mechanism has zero lag and zero mean inertia, the edge gateway reduces the size of the second block as soon as the bandwidth, radio frequency or terminal computing power decreases, the transmission pressure is released in advance, the air interface and the receiving end buffer are prevented from being accumulated, and thus the instantaneous packet loss and the number of retransmissions are significantly reduced, and the end-edge collaborative transmission is long-term maintained with high robustness and high throughput.
[0058] From the above embodiments, it can be seen that the basic block model is obtained by training the initial block model according to the block sample set. Based on this, the process of training the initial block model according to the block sample set is as follows: obtaining a block sample set, each block sample including sample multi-dimensional transmission state sequence data, sample target transmission state, sample block size, and sample target transmission result; inputting the block sample set into the state prediction layer of the basic block model, analyzing the state dependence relationship of the multi-cross layer dimension corresponding to each sample multi-dimensional transmission state sequence data in the intermediate state of the corresponding time period and the state change trend of the intermediate state, and based on the state dependence relationship of the intermediate state and the state change trend of the intermediate state, predicting the transmission state of the intermediate state corresponding to the multi-cross layer dimension at the next time; inputting the transmission state of the intermediate state into the strategy matching layer of the basic block model, for each transmission state of the intermediate state, trying each block size in the candidate block size set in turn to perform data transmission, obtaining multiple intermediate transmission results of each transmission state of the intermediate state under each block size; selecting the target transmission result of the intermediate state from the multiple intermediate transmission results corresponding to each transmission state of the intermediate state, and generating a block strategy based on the transmission state of the intermediate state and the target transmission result of the intermediate state; determining the data block size of the intermediate state corresponding to the transmission state of the intermediate state based on the block strategy; calculating the model loss function based on the transmission state of the intermediate state and the sample target transmission state and the transmission result of the intermediate state and the sample target transmission result, and continuing to train the initial data block decision model under the condition that the model loss function does not satisfy the model training termination condition, until the model loss function satisfies the model training termination condition, and the trained basic block model is obtained. In this embodiment, by layer-by-layer playback of "multi-dimensional transmission state sequence-intermediate state-transmission result" in the block sample set, the model can learn the cross-layer state dependence and change trend in the training stage; the strategy matching layer enumerates the candidate block size and compares the results, so that the optimal block strategy is verified in advance at the sample level. The state loss and the result loss jointly drive the back propagation, ensuring that the basic block model not only accurately predicts the transmission state at the next time, but also outputs the block size that truly matches the state, thereby significantly reducing the training-inference deviation, improving the accuracy and robustness of subsequent online splitting, and thereby laying a foundation for realizing the paradigm shift from "central static block" to "edge dynamic block".
[0059] Optionally, the model loss function is calculated based on the transmission state of the intermediate state and the sample target transmission state and the transmission result of the intermediate state and the sample target transmission result, including: calculating a first loss function of the transmission state of the intermediate state and the sample target transmission state, and calculating a second loss function of the transmission result of the intermediate state and the sample target transmission result, both of which are used as the model loss function; or calculating a first loss function of the transmission state of the intermediate state and the sample target transmission state, and calculating a second loss function of the transmission result of the intermediate state and the sample target transmission result; and calculating the model loss function based on the first loss function and the second loss function. In this embodiment, the "state loss + result loss" double-component loss function is used to simultaneously align the intermediate state distribution output by the model with the sample target state, and the transmission result selected by the strategy with the sample target result; the two are independently calculated and then fused, so that the gradient update takes into account both "trend prediction is correct" and "final yield is optimal", avoiding overfitting or strategy drift caused by a single loss. This scheme allows the basic block model to continuously correct the consistency of state extrapolation and decision evaluation during the training process, improves the generalization ability of the model to different network environments, and thus guarantees the reliability of the edge secondary slicing, thereby laying a foundation for the paradigm shift from "central static block" to "edge dynamic block".
[0060] Further optionally, a multi-dimensional transmission state sequence data of a plurality of second data blocks sent to the target terminal is collected; the plurality of second data blocks and the multi-dimensional transmission state sequence data are used as a new block sample set to fine-tune the model parameters of the target block model, so as to obtain an adjusted target block model. In this embodiment, the cross-layer state and the transmission result of the second data block are continuously collected in the real sending process to form a new sample set with the latest environmental characteristics, and the deployed target block model is fine-tuned online, so that the model parameters evolve in real time with network fluctuations, terminal migration or seasonal changes. This closed-loop updating mechanism can quickly adapt to local link changes without centralized retraining, and can keep the block decision highly matched with the current transmission state for a long time, realize self-evolution and self-adaptive transmission of "edge sending and edge learning", further reduce the long-term packet loss rate and retransmission overhead, and thus lay a foundation for the paradigm shift from "central static block" to "edge dynamic block".
[0061] Optionally, the first edge gateway may experience malfunctions during operation. Therefore, during the transmission of multiple second data blocks to the target terminal, failure events of the first edge gateway can be monitored. When any failure event is detected, the data transmission function of the first edge gateway is shut down, and a candidate edge gateway with the same service area as the first edge gateway is determined based on its location information. A second edge gateway is selected from the candidate edge gateways based on their multi-dimensional attribute information. The static data and runtime state data involved in the target data block model are migrated to the second edge gateway so that it can continue to provide data block and data transmission services to the target terminal. The multi-dimensional attribute information includes location distance, real-time link quality (RSSI / RTT / packet loss), resource reserves (CPU, memory, computing power), network topology hop count and stability, service capacity reserves, model hardware affinity, and security and reliability indicators. The system calculates a weighted comprehensive score to select the optimal second edge gateway. Failure events include at least one of the following: Hardware failure events: CPU overheating and frequency reduction, memory overflow, storage I / O error, or power failure; Network failure events: Link interruption, BGP route cancellation, signal strength below the threshold, or sudden increase in round-trip latency with a continuous heartbeat count greater than the preset heartbeat count; Model failure events: Model version mismatch, insufficient memory to load weights, or inference latency greater than the preset latency time; Security failure events: Firmware integrity verification failure, certificate expiration, or abnormal traffic detected; Operation and maintenance failure events: Remote upgrade by the operator, manual maintenance window, or container crash and restart. In this embodiment, while sending the second data block, the liveness status of the first edge gateway is continuously monitored. Once a hardware, network, model, or security failure event is detected, the faulty node is immediately shut down and a "second-level" migration mechanism is triggered. The system quickly selects the optimal candidate edge gateway in the same area based on location and multi-dimensional attributes (load, link quality, computing power margin), and migrates the static parameters and runtime state (including Q table, GRU hidden state, and breakpoint number) of the target block model to the new node. This process eliminates the need for retraining or source fetching, enabling the restoration of secondary slicing capabilities for the target terminal within milliseconds. This achieves continuous transmission with "fault-free and uninterrupted service," significantly reducing transmission interruption duration and retransmission overhead caused by single-point failures, thus improving overall service availability and user experience. In summary, by deploying a terminal-customized lightweight target slicing model at edge nodes, real-time and accurate perception and prediction of the terminal-side micro-network status are achieved. This solves the problem of disconnect between central and terminal status perception, laying the foundation for a paradigm shift from "central static slicing" to "edge dynamic slicing."
[0062] Further optionally, after migrating the static data and runtime state involved in the target sub-blocking model to the second edge gateway, real-time link state data between the second edge gateway and the target terminal can also be collected; based on the real-time link state data, the static data and runtime state data involved in the target sub-blocking model are adjusted to obtain a target sub-blocking model adapted to the second edge gateway.
[0063] Optionally, collecting real-time link state data between the second edge gateway and the target terminal, and adjusting the static data and runtime state data involved in the target sub-blocking model based on the real-time link state data to obtain a target sub-blocking model adapted to the second edge gateway, comprises: after migrating the static data and runtime state involved in the target sub-blocking model to the second edge gateway, collecting real-time link state data between the second edge gateway and the target terminal at a fixed RTT step and buffering as instant fine-tuning samples; using a low-rank adaptation or parameter-efficient fine-tuning strategy, injecting a trainable low-rank matrix only to the last two layers of weights of the target sub-blocking model, performing gradient descent based on the instant fine-tuning samples to update the low-rank matrix; synchronously using an exponential weighting method to correct the Q value table and the GRU hidden state initial vector of the strategy matching layer until the packet loss rate change is less than a preset threshold, obtaining a target sub-blocking model adapted to the current link characteristics of the second edge gateway. In this embodiment, the real-time link state (RSSI, RTT, MCS, CPU temperature, etc.) between the second edge gateway and the target terminal is collected immediately after migration, and these instantaneous data are used to fine-tune the weights, Q table and GRU hidden state of the target sub-blocking model online, so that the model parameters quickly match the link characteristics and computing power environment of the new node; without retraining, the prediction deviation caused by differences in location, load or radio frequency environment can be eliminated, ensuring that the secondary sub-blocking size always fits the latest transmission state, thereby avoiding initial packet loss and throughput drop after migration, realizing seamless continuous transmission of "change job and adapt", further improving the reliability and resource utilization of end-edge collaboration, and thereby laying a foundation for realizing the paradigm shift from "central static sub-blocking" to "edge dynamic sub-blocking".
[0064] For ease of understanding, the above-mentioned solutions of the present application are described as a whole below.
[0065] The central gateway and the target terminal are located in the first network and the second network respectively; the central gateway determines the first block size according to a fixed block strategy, cuts the target data to obtain a plurality of first data blocks, and sends the first data blocks to an edge gateway in the edge service network. After receiving, the edge gateway collects the multi-dimensional transmission state sequence data between the edge gateway and the target terminal in the current period for the first data block currently received; inputs the multi-dimensional transmission state sequence data into the target block model, predicts the second block size of the data sent to the target terminal, and cuts the first data block into a plurality of second data blocks based on the second block size; and sends the plurality of second data blocks to the target terminal.
[0066] The target block model is a customized and lightweight machine learning model, which collects the software and hardware capability information of the edge gateway before deployment, performs lightweight processing on the trained basic block model, and obtains the target block model adapted to the hardware capability. As shown in Figure 3 The target block model is composed of a state prediction layer, a policy matching layer and a data block layer, and the specific process is as follows: 1. The state prediction layer first collects real-time feature data of the terminal side hardware, network, transmission layer and application layer, etc. to form a multi-dimensional transmission state sequence. Due to the limited computing resources and storage of the edge gateway and the need to meet real-time performance, the state prediction layer uses GRU (a simplified version of LSTM) for feature extraction: input the collected data into the GRU model, initialize the state, pass the sequence step by step, calculate the feature of each step according to the update gate and reset gate, and select the last hidden state as the feature vector output to the policy matching layer.
[0067] 2. The policy matching layer takes h(T) as the state and the candidate data block size as the action space, sets the reward as the throughput improvement rate minus the weighted value of the retransmission rate and the delay, and dynamically selects the best data block strategy through the Q-Learning algorithm, taking the corresponding block size as the second block size. In this calculation process, the revenue r of the currently transmitted data block can be calculated by formula (1), and then the discounted total revenue after selecting the block size a in state s and transmitting according to the optimal strategy can be calculated according to formula (2); (1); (2).
[0068] 3. The data block layer completes the cutting according to the second block size.
[0069] Further, the lightweight processing of the basic chunked model includes length clipping of the LSTM input sequence of the basic chunked model, clipping of the Q-Learning action space, and prioritizing optimization of the Q-Learning before optimization of the GRU, to ensure that the model runs on an edge gateway with less than or equal to 4 GB of memory, with a single inference delay of less than or equal to 10 ms, and a CPU occupancy of less than or equal to 30%.
[0070] Further, after the edge gateway sends each second data chunk, the transmission result (throughput improvement rate, retransmission rate, network latency) of the data chunk is collected, the model parameters are adjusted based on the data transmission result, the adjusted target chunked model is obtained, and a data packet level closed loop optimization is formed.
[0071] Further, when a failure event of the edge gateway is monitored, the data transmission function of the edge gateway is closed, candidate edge gateways covering the same area are determined according to the location information of the edge gateway, a comprehensive score is calculated according to the real-time link quality index and the resource margin index, and a second edge gateway is selected; the static data and the runtime state involved in the target chunked model are migrated to the second edge gateway, and the remaining data is continued to be transmitted after differential fine-tuning and inheritance of the optimization context, to realize second-level fault recovery.
[0072] Further, the first data chunk can be divided at the application layer or the transmission layer, and the second data chunk can be divided again at the application layer, to form a cross-layer double-layer packet division strategy; the first data chunk sent by the center gateway to different edge gateways can be of different sizes, and each edge gateway independently predicts the size of the second chunk, to realize end-to-end differentiated packet division for each terminal.
[0073] In summary, through two-level decoupling of "center static first chunk + edge dynamic second chunk", the edge gateway millisecond-level perceives the micro state of the terminal, and outputs the optimal chunk size in real time, to significantly reduce packet loss and retransmission; when a fault occurs, the model and the breakpoint are migrated in seconds, the service is not interrupted, and an end-edge collaborative adaptive data transmission system is realized.
[0074] Figure 4 A structural schematic diagram of an electronic device provided for an example embodiment of the present application is shown in FIG. 1. Figure 4 As shown in the figure, the electronic device includes a memory 40a and a processor 40b. The memory 40a is configured to store a computer program, and the processor 40b is coupled to the memory 40a and configured to execute the computer program to perform each step in the above method.
[0075] The detailed implementation and beneficial effects of each step of the embodiments of the present application have been described in detail in the foregoing embodiments, and will not be described in detail here.
[0076] Further, as shown in FIG. 2, Figure 4As shown, the electronic device also includes: a communication component 40c, a display 40d, a power supply component 40e, an audio component 40f, and other components. Figure 4 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 4 The components shown. Additionally... Figure 4 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. The electronic device in this embodiment can be a terminal device such as a desktop computer, laptop computer, smartphone, or IoT device, or a server-side device such as a conventional server, cloud server, or server array. If the electronic device in this embodiment is a terminal device such as a desktop computer, laptop computer, or smartphone, it may include... Figure 4 The components within the dashed box; if the electronic device in this embodiment is implemented as a conventional server, cloud server, or server array, etc., it may be omitted. Figure 4 The component within the dashed box.
[0077] The aforementioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0078] The communication component is configured to facilitate wired or wireless communication between the device in which the communication component is included and another device. The device in which the communication component is included can access a wireless network based on a communication standard, such as WiFi, a 2G, 3G, 6G / LTE, 5G, or the like mobile communication network, or a combination thereof. In an example embodiment, the communication component receives a broadcast signal or a broadcast related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Blue Tooth (BT) technology, and other technologies.
[0079] The display includes a screen, which can include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touch or a slide action, but also detect a duration and a pressure associated with the touch or slide operation.
[0080] The power supply component provides power to various components of the device in which the power supply component is included. The power supply component can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device in which the power supply component is included.
[0081] The audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) that is configured to receive an external audio signal when the device in which the audio component is included is in a particular mode of operation, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in memory or transmitted via the communication component. In some embodiments, the audio component further includes a speaker for outputting audio signals.
[0082] Accordingly, the example embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, causes the processor to implement the steps of the above-described method.
[0083] Correspondingly, the exemplary embodiments of the present application further provide a computer program product, which contains computer programs / instructions, and when the computer programs / instructions are executed by a processor, the processor is enabled to perform the steps in the above method.
[0084] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including, but not limited to, disk storage, Compact Disc Read-Only Memory (CD-ROM), optical storage, etc.) containing computer usable program code.
[0085] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in the flowcharts and / or block diagrams.
[0086] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in the flowcharts and / or block diagrams.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in the flowcharts and / or block diagrams.
[0088] In one typical arrangement, a computing device includes one or more processors (Central Processing Units, CPUs), input / output interfaces, network interfaces, and memory.
[0089] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) having a common memory space employing many flash memory devices. The memory is an example of computer readable media.
[0090] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital video disc (DVD), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0091] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus.
[0092] The above merely provides an example of the present application and is not intended to limit the present application. The present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.
Claims
1. A data communication method based on an edge gateway, characterized in that, An edge gateway applied in an edge service network, wherein the edge gateway and the central gateway in the edge service network are located in a first network, and the edge gateway and the target terminal are located in a second network; the method includes: The receiving center gateway sends multiple first data blocks, wherein the multiple first data blocks are obtained by the center gateway determining the first block size according to a fixed block strategy and dividing the target data according to the first block size; For the first data block received, collect multi-dimensional transmission status sequence data between the first edge gateway and the target terminal in the current time period; The multidimensional transmission state sequence data is input into the target block model to predict the size of the second block of data to be sent to the target terminal, and the first data block is divided into multiple second data blocks based on the second block size. The multiple second data blocks are sent to the target terminal.
2. The method according to claim 1, characterized in that, The target segmentation model is a customized and lightweight model, and the complexity of the target segmentation model is adapted to the hardware and software capabilities of the edge gateway. Before inputting the multidimensional transmission state sequence data into the target block model, the method further includes: Collect the hardware and software capability information of the first edge gateway; Based on the hardware and software capability information of the first edge gateway, the basic segmentation model is lightweighted to obtain the target segmentation model. The basic segmentation model is obtained by training the initial segmentation model based on the segmentation sample set. The target segmentation model is deployed to the first edge gateway.
3. The method according to claim 1, characterized in that, The target segmentation model includes: a state prediction layer, a policy matching layer, and a data segmentation layer; the multidimensional transmission state sequence data is input into the target segmentation model to predict the size of the second data segment to be sent to the target terminal, and the first data segment is divided into multiple second data segments based on the second data segment size, including: The multidimensional transmission state sequence data is input into the state prediction layer. Based on the state dependency relationship and state change trend of the multi-layer dimensions in the current time period, the target transmission state corresponding to the multi-layer dimensions in the next time period is predicted. The multidimensional transmission state sequence data is the real-time state data of different cross-layer dimensions between the target terminal and the edge gateway continuously collected in the current time period. The target transmission state is input into the policy matching layer, and a target data segmentation policy that is compatible with the target transmission state is selected from multiple data segmentation policies. The segmentation size corresponding to the target data segmentation policy is used as the second segmentation size corresponding to the target transmission state. The second block size and the first data block are input into the data block layer, and the first data block is divided into multiple second data blocks based on the second block size.
4. The method according to claim 2, characterized in that, Also includes: Obtain a block sample set. Each block sample includes multidimensional transmission state sequence data of the sample, target transmission state of the sample, block size of the sample, and target transmission result of the sample. The segmented sample set is input into the state prediction layer of the basic segmented model. The state dependency relationship and state change trend of the intermediate state of the multi-dimensional transmission state sequence data of each sample in the corresponding time period are analyzed. Based on the state dependency relationship and state change trend of the intermediate state, the transmission state of the intermediate state corresponding to the multi-dimensional transmission state sequence data in the next time period is predicted. The transmission state of the intermediate state is input to the policy matching layer of the basic block model. For each intermediate state transmission state, the transmission data is transmitted through each block size in the candidate block size set in turn, so as to obtain the transmission results of multiple intermediate states under each block size. From the transmission results of multiple intermediate states corresponding to the transmission state of each intermediate state, select the target transmission result of the intermediate state, and generate a block-segmentation strategy based on the transmission state of the intermediate state and the target transmission result of the intermediate state. Based on the block segmentation strategy, the data block size of the intermediate state corresponding to the transmission state of the intermediate state is determined; The model loss function is calculated based on the intermediate state transmission state, the sample target transmission state, the intermediate state transmission result, and the sample target transmission result. If the model loss function does not meet the model training termination condition, the initial data block model is trained until the model loss function meets the model training termination condition, thus obtaining the trained basic block model.
5. The method according to claim 4, characterized in that, The model loss function is calculated based on the intermediate state transmission state, the sample target transmission state, the intermediate state transmission result, and the sample target transmission result, including: Calculate a first loss function for the transmission state of the intermediate state and the transmission state of the sample target, and calculate a second loss function for the transmission result of the intermediate state and the transmission result of the sample target, both of which are used as the model loss function; or Calculate a first loss function between the transmission state of the intermediate state and the transmission state of the sample target, and calculate a second loss function between the transmission result of the intermediate state and the transmission result of the sample target; calculate the model loss function based on the first loss function and the second loss function.
6. The method according to claim 1, characterized in that, Also includes: Collect multidimensional transmission status sequence data of multiple second data blocks sent to the target terminal; Using the multiple second data blocks and the multidimensional transmission state sequence data as new sample data, the model parameters of the target block model are fine-tuned to obtain the adjusted target block model.
7. The method according to claim 1, characterized in that, Also includes: During the process of sending the plurality of second data blocks to the target terminal, the failure event of the first edge gateway is monitored; When any failure event is detected, the data transmission function of the first edge gateway is shut down, and a candidate edge gateway with the same service area as the first edge gateway is determined based on the location information of the first edge gateway. Based on the multi-dimensional attribute information of the candidate edge gateways, a second edge gateway is selected from the candidate edge gateways; The static data and runtime state data involved in the target segmentation model are migrated to the second edge gateway so that the second edge gateway can continue to provide data segmentation and data transmission services to the target terminal.
8. The method according to claim 7, characterized in that, After migrating the static data and runtime state involved in the target segmentation model to the second edge gateway, the process further includes: Collect real-time link status data between the second edge gateway and the target terminal; Based on the real-time link status data, the static data and runtime status data involved in the target segmentation model are adjusted to obtain a target segmentation model adapted to the second edge gateway.
9. The method according to any one of claims 1-8, characterized in that, The multi-dimensional transmission state sequence data includes: state data of the terminal-side hardware layer, state data of the network layer, state data of the transport layer, and state data of the application layer.
10. An electronic device, characterized in that, include: Memory and processor; The memory is used to store a computer program; the processor, coupled to the memory, is used to execute the computer program to implement the steps of any one of claims 1-9.
11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method of any one of claims 1-9.
12. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor, causes the processor to perform the steps of any one of claims 1-9.