Data transmission method and platform based on OpenHarmony

By adopting the combined methods of distributed soft bus technology, zero-knowledge proof mechanism, dynamic routing table, Reed-Solomon encoding, business migration strategy and distributed cache nodes in OpenHarmony system, the system's low data transmission efficiency, insufficient security and low resource utilization in complex network environments is solved, and efficient, reliable and secure data transmission is achieved.

CN119788742AActive Publication Date: 2025-04-08深圳宇翊技术股份有限公司

Patent Information

Application Number
CN202510273598.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

In complex and changing network environments, the OpenHarmony system faces the problems of low data transmission efficiency, insufficient security, and low network resource utilization. Traditional methods are difficult to adapt to diversified network interfaces and dynamically changing network conditions.

Method used

The distributed soft bus technology and zero-knowledge proof mechanism are used to realize automatic discovery and security authentication of equipment, build dynamic routing tables and update them in real time, and use Reed-Solomon encoding to slice and redundantly encode data, formulate migration strategies based on service type and QoS indicators, transmit in parallel through multiple network interfaces and dynamically adjust the data allocation ratio, and deploy distributed cache nodes to optimize data transmission.

Benefits of technology

It improves the security and reliability of the system, optimizes the data transmission path, improves network resource utilization and transmission efficiency, enhances the reliability and anti-interference ability of data transmission, realizes intelligent scheduling and load balancing of resources, and improves the overall performance and user experience of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788742A_ABST
    Figure CN119788742A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data transmission, and discloses an OpenHarmony-based data transmission method and platform, and the method comprises the steps: carrying out the automatic discovery of network equipment through employing a distributed soft bus technology, and obtaining an authenticated equipment list; constructing an initial dynamic routing table and updating the initial dynamic routing table to obtain an optimized routing table; fragmenting the data to be transmitted and performing redundant coding to obtain a coded transmission unit; business is divided into real-time and non-real-time categories, a state space is constructed, and a business migration strategy is formulated; performing parallel transmission on the encoded transmission units, and dynamically adjusting a data distribution proportion; distributed cache nodes are deployed in a network, data transmission is optimized, efficient transmission and recovery of data are realized, and automatic discovery and security authentication of equipment, dynamic routing optimization, intelligent data fragmentation and coding, resource scheduling of service awareness, parallel transmission of multiple network interfaces and efficient utilization of distributed cache can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method and platform based on OpenHarmony. Background Art

[0002] With the rapid development of the Internet of Things and distributed systems, OpenHarmony, as an open source distributed operating system, has been widely used in the field of smart devices. However, in a complex and changing network environment, the OpenHarmony system faces problems such as low data transmission efficiency, insufficient security, and low network resource utilization. Traditional data transmission methods are difficult to adapt to diverse network interfaces and dynamically changing network conditions, resulting in reduced data transmission performance and failure to meet the needs of real-time business.

[0003] In addition, with the rise of edge computing, a large amount of data needs to be transmitted and processed between terminal devices, but the existing data transmission methods lack the identification and optimization of business types, and cannot effectively perform resource scheduling and load balancing. At the same time, in an open network environment, security authentication and data encryption between devices also face severe challenges. Traditional authentication mechanisms are difficult to meet the security requirements of distributed systems. Summary of the invention

[0004] The present invention provides a data transmission method and platform based on OpenHarmony, which can realize automatic discovery and security authentication of devices, dynamic routing optimization, intelligent data segmentation and encoding, business-aware resource scheduling, parallel transmission of multiple network interfaces, and efficient use of distributed cache.

[0005] In a first aspect, the present invention provides a data transmission method based on OpenHarmony, the data transmission method based on OpenHarmony comprising: Distributed soft bus technology is used to automatically discover network devices, and the discovered devices are authenticated based on the zero-knowledge proof mechanism to obtain a list of authenticated devices; Constructing an initial dynamic routing table according to the authenticated device list, and updating the dynamic routing table based on real-time network conditions to obtain an optimized routing table; The data to be transmitted is segmented and redundantly encoded using Reed-Solomon coding to obtain encoded transmission units; Divide services into real-time and non-real-time categories, construct a state space based on the terminal operation status and the optimized routing table, and formulate a service migration strategy based on QoS indicators; Using multiple network interfaces to transmit the encoded transmission units in parallel, and dynamically adjusting the data allocation ratio based on real-time monitored interface performance and the service migration strategy; Distributed cache nodes are deployed in the network, and data transmission is optimized based on the optimized routing table, the service migration strategy and the data allocation ratio to achieve efficient data transmission and recovery.

[0006] In a second aspect, the present invention provides a data transmission platform based on OpenHarmony, and the data transmission platform based on OpenHarmony includes: The automatic discovery module is used to automatically discover network devices using distributed soft bus technology, and authenticate the discovered devices based on the zero-knowledge proof mechanism to obtain a list of authenticated devices; A construction module, used to construct an initial dynamic routing table according to the authenticated device list, and update the dynamic routing table based on the real-time network status to obtain an optimized routing table; The encoding module is used to perform fragmentation processing on the data to be transmitted and perform redundant encoding on the data fragments using Reed-Solomon encoding to obtain encoded transmission units; A formulation module for classifying services into real-time and non-real-time categories, constructing a state space based on the terminal operation status and the optimized routing table, and formulating a service migration strategy based on QoS indicators; An adjustment module, configured to use a plurality of network interfaces to transmit the encoded transmission units in parallel, and dynamically adjust the data allocation ratio based on the real-time monitored interface performance and the service migration strategy; The optimization module is used to deploy distributed cache nodes in the network, optimize data transmission based on the optimized routing table, the business migration strategy and the data allocation ratio, and realize efficient data transmission and recovery.

[0007] A third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned OpenHarmony-based data transmission method.

[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned OpenHarmony-based data transmission method.

[0009] In the technical solution provided by the present invention, by adopting distributed soft bus technology and zero-knowledge proof mechanism, automatic discovery and security authentication of devices are realized, the security and reliability of the system are improved, and the device access process is simplified. By using dynamic routing tables and real-time network status monitoring, the data transmission path is optimized, and the network resource utilization and transmission efficiency are improved. Reed-Solomon coding is used to fragment and redundantly encode data, which enhances the reliability and anti-interference ability of data transmission and reduces the risk of data loss. Migration strategies are formulated based on business types and QoS indicators to achieve intelligent scheduling and load balancing of resources, and improve the overall performance of the system and user experience. Through parallel transmission of multiple network interfaces and dynamic adjustment of data allocation ratios, network resources are fully utilized, and the data transmission speed and stability are improved. Distributed cache nodes are deployed and optimized to achieve efficient transmission and rapid recovery of data, and improve the fault tolerance and availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0011] Figure 1 Schematic diagram of the steps of the data transmission method based on OpenHarmony in an embodiment of the present invention; Figure 2 It is a structural diagram of a data transmission platform based on OpenHarmony in an embodiment of the present invention. DETAILED DESCRIPTION

[0012] Embodiments of the present invention provide a data transmission method and platform based on OpenHarmony. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0013] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the data transmission method based on OpenHarmony in the embodiment of the present invention includes: Step S1: Automatically discover network devices using distributed soft bus technology, and authenticate the discovered devices based on a zero-knowledge proof mechanism to obtain a list of authenticated devices; It is understandable that the execution subject of the present invention may be a data transmission platform based on OpenHarmony, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.

[0014] Specifically, a device discovery request is broadcast in the local area network, and the request contains the unique identifier and network address information of the sending device. In this way, other devices can receive the request and return device response information. The device response information is parsed to extract the device identifier, network address and supported service type of the responding device, and the initial device list is constructed. In order to ensure that the identity of the device is authentic and reliable, the public-private key pair is generated using the elliptic curve cryptographic algorithm, and the public key and the randomly generated challenge value are packaged into an authentication request and sent to the device in the initial device list. After the device to be authenticated receives the authentication request, the signature result and the new challenge value are returned to the requesting device. The requesting device verifies the signature result using the previously generated public key. If the verification passes, the identity of the device is confirmed to be valid. Based on the device identity confirmation result, the requesting device uses the private key to sign the new challenge value, and sends the signature result to the authenticated device, while waiting for the device to return the verification result. When the requesting device receives the verification result returned by the authenticated device, it confirms that the device has completed the two-way identity authentication, thereby identifying it as a trusted device. After the two-way authentication is successful, in order to ensure the security and privacy of data transmission, the requesting device generates a temporary session key for the device that has successfully passed the two-way authentication, and establishes an encrypted communication channel based on this key to ensure that the information in the subsequent data transmission process is not monitored or tampered with by the outside world. At the same time, the requesting device adds the device that has successfully passed the two-way authentication and its corresponding temporary session key information to the authenticated device list. In this way, the authenticated device list contains all the device information that has passed the two-way authentication and has an encrypted communication channel.

[0015] Step S2: construct an initial dynamic routing table according to the authenticated device list, and update the dynamic routing table based on the real-time network status to obtain an optimized routing table; Specifically, the network topology information of each device is extracted based on the list of authenticated devices, including the device identifier, network address, and connection status between devices, to construct an initial network topology map. The initial network topology map is a basic map that describes the connection relationship between devices, showing the location of each device in the network and the connection between them. The performance of each node in the initial network topology map is evaluated. The performance evaluation includes three main indicators: the processing capacity index of the node, which represents the node's ability to process data packets and perform computing tasks; the storage capacity index, which reflects the size of the space that the node can use to cache and store data; and the network interface type index, which describes the network interface type supported by the node and its bandwidth upper limit. By weighted calculation of the above three indicators, the comprehensive performance score of each node is obtained. The network detection technology is used to measure the bandwidth, delay and packet loss rate of each link in the initial network topology map to reflect the quality of the network link, including the maximum bandwidth that the link can provide, the time delay of the data packet transmission on the link, and the probability of data packet loss during the transmission process. Based on the measurement results, the link quality index is calculated to obtain the link performance score. Based on the node performance score and link performance score, the minimum weight path algorithm is used to calculate the optimal path from the source node to the target node and build the initial dynamic routing table. The initial dynamic routing table reflects the optimal communication path from each source node to each target node under the current network topology. In order to optimize the route selection during data transmission, the network status is continuously monitored. By adopting the sliding window mechanism, real-time network performance data is regularly collected, including bandwidth utilization, end-to-end delay, and network congestion level. The sliding window mechanism can dynamically capture short-term changes in network performance and provide timely reference data for updating the routing table. The real-time network performance data is input into the pre-trained machine learning model. The model predicts the trend of network performance changes in the short term based on the input data and generates network performance prediction results. Based on the network performance prediction results, the weights of the routing entries in the initial dynamic routing table are adjusted. The dynamic programming algorithm is used to recalculate the optimal path from the source node to the target node, and the path in the routing table is updated according to the new calculation results. Each routing entry has a latest update timestamp to record the most recent update time of the entry, and finally an optimized routing table is obtained.

[0016] Step S3, fragmenting the data to be transmitted, and redundantly encoding the data fragments using Reed-Solomon coding to obtain encoded transmission units; Specifically, the data to be transmitted is analyzed for data features, and information such as the total size, data type, and priority of the data is extracted to generate a data feature vector. At the same time, combined with the current network conditions, including network bandwidth, delay, packet loss rate and other indicators, an adaptive algorithm is used to calculate the optimal fragmentation size and determine the fragmentation parameters. The data to be transmitted is segmented according to the fragmentation parameters, and the entire data is segmented into several data fragments. In order to ensure that each data fragment can be accurately identified and processed during the transmission process, a unique sequence number is assigned to each data fragment, and its checksum is calculated to form an initial data fragment set. The initial data fragment set contains all the segmented data fragments and their corresponding meta information. Reed-Solomon encoding is performed on each data fragment in the initial data fragment set. Reed-Solomon encoding is an error correction coding technology that enhances the error resistance of data by generating redundant data blocks. During the encoding process, each initial data fragment will generate several redundant data blocks, and these redundant data blocks and the original data fragments together constitute the encoded data fragment. In order to optimize the amount of redundant data, according to the current network quality indicators, a dynamic redundancy adjustment algorithm is used to calculate the optimal redundancy and determine the redundancy parameters. Reasonable setting of redundancy parameters can strike a balance between data reliability and transmission efficiency, and minimize the amount of redundant data transmission while ensuring data integrity. Based on the calculated redundancy parameters, redundant data is generated for the encoded data fragments to obtain data fragments with redundant protection, so that they have high fault tolerance during transmission and can effectively recover lost or damaged data fragments even in poor network conditions. The data fragments with redundant protection are packaged into transmission units. Each transmission unit contains an original data fragment and its corresponding redundant data, as well as the unique serial number and checksum of the fragment. In order to improve the accuracy and efficiency of data management, a transmission unit mapping table is constructed to record the location information of the original data corresponding to each transmission unit, that is, the location of each transmission unit in the overall data structure and all its associated information, and finally the encoded transmission unit is obtained.

[0017] Step S4: Divide the services into real-time and non-real-time categories, construct a state space based on the terminal operation status and the optimized routing table, and formulate a service migration strategy based on the QoS index; Specifically, the characteristics of the services in the OpenHarmony system are analyzed. By analyzing the type, priority and resource demand information of each service, the services are effectively divided into two categories: real-time services and non-real-time services. Real-time services are usually sensitive to delay, such as video calls or online games. Such services have strict requirements on network stability and low delay, while non-real-time services are not sensitive to delay, such as file transfer or data backup, and pay more attention to transmission reliability and bandwidth utilization. Based on the optimized routing table, the network distance from each terminal to the server is calculated to obtain the terminal-server distance matrix, which describes the connection quality between each terminal and the server, including key indicators such as delay, bandwidth and packet loss rate. At the same time, the parameters such as CPU usage, memory occupancy and storage space utilization of each terminal are monitored in real time to construct a terminal resource state vector, which reflects the current hardware resource usage of each terminal. The terminal-server distance matrix and the terminal resource state vector are combined to construct a multi-dimensional state space model. In this model, each terminal is not only a network node, but also a resource node. Its distance from the server in the network and resource utilization jointly determine its overall state. Based on the multidimensional state space model, corresponding QoS (quality of service) indicator evaluation functions are formulated for different types of services, including two key indicators: available rate and delay. Through these QoS evaluation functions, a comprehensive service QoS score is given to each service in the current state, which quantitatively describes the quality and efficiency of the current service operation. Based on the multidimensional state space model and service QoS score, a service migration strategy model is trained using a reinforcement learning algorithm. The reinforcement learning algorithm can find the optimal strategy path in a complex state space through continuous trial and learning. During the training process, the algorithm learns how to make the optimal service migration decision in different scenarios based on different state combinations and service scores, and forms a general strategy model. After the strategy model training is completed, the operating efficiency of each service on the current terminal and potential target terminal is calculated. The calculation of operating efficiency not only considers factors such as the current network delay, bandwidth and packet loss rate, but also includes factors such as computing power, storage capacity and resource occupancy. Through calculation, the service migration benefit matrix is ​​obtained to quantify the potential benefits of each service migrating between different terminals. The service migration benefit matrix is ​​input into the trained service migration strategy model. The model comprehensively considers the current network status and the resource status of each terminal, calculates the optimal migration plan for each service, and obtains the service migration strategy table. The strategy table can be dynamically adjusted to respond to changes in network status and resource status in real time, ensuring that the optimal service operation plan can be provided under various network conditions.

[0018] Step S5: using multiple network interfaces to transmit the encoded transmission units in parallel, and dynamically adjusting the data allocation ratio based on real-time monitored interface performance and service migration strategy; Specifically, all network interfaces supported by the device are scanned to identify all available network interface types, including Wi-Fi, cellular networks, Bluetooth and other types. Each type of network interface has different performance characteristics and usage scenarios. A network interface list containing all available interfaces is constructed through the network interface information obtained through scanning. The performance of each interface in the network interface list is evaluated. The evaluation indicators include bandwidth, delay, stability and energy consumption. By measuring the bandwidth, the maximum data transmission speed that each interface can support is understood; by measuring the delay, the time from sending to receiving data is determined; the stability involves the reliability performance of the interface in long-term use; and the energy consumption index reflects the power consumption of the device by the interface in the working state. Based on these measurement data, the performance indicator set of each interface is obtained. The transmission weight of each interface is calculated using the fuzzy comprehensive evaluation method. The fuzzy comprehensive evaluation method can comprehensively consider multiple fuzzy factors and obtain the transmission weight value of each network interface in different scenarios. The calculated transmission weight value reflects the importance and priority of each network interface in data transmission. Based on the transmission weight value, an initial interface weight allocation scheme is formed. According to this scheme, the data fragments in the encoded transmission unit are reasonably allocated according to the weight of each interface. The data segments in the transmission unit are assigned to different network interfaces for parallel transmission, so as to make full use of the multiple network resources of the device and improve the data transmission efficiency. The transmission performance of each network interface is monitored in real time. The performance data monitored in real time include throughput, response time and error rate. Throughput reflects the amount of data actually transmitted by each interface per unit time, response time refers to the time required from the issuance of a data request to the receipt of a response, and error rate indicates the frequency of errors in data transmission. By monitoring these data in real time, the current performance of each interface can be understood. The real-time interface performance data is integrated with the service migration strategy to build a dynamic weight adjustment model. The model can combine real-time monitoring data with service requirements, dynamically adjust the transmission weight of each interface, and generate an interface-service weight matrix. Based on the interface-service weight matrix, the adaptive load balancing algorithm is used to calculate the new data allocation ratio. The adaptive load balancing algorithm can dynamically adjust the data allocation plan according to the changes in real-time data and weight matrix. After obtaining the updated data allocation plan, the actual data transmission volume of each network interface is adjusted according to the new allocation plan. For data segments that fail to transmit, the intelligent retransmission mechanism is triggered to automatically select the network interface with the best current performance for retransmission to ensure the integrity and reliability of data transmission. At the same time, according to the changes in interface performance during the transmission process, the data allocation ratio is dynamically adjusted to effectively respond to fluctuations and changes in network status and ensure the stability and efficiency of data transmission.

[0019] Step S6: deploy distributed cache nodes in the network, optimize data transmission based on optimized routing tables, service migration strategies, and data allocation ratios, and achieve efficient data transmission and recovery.

[0020] Specifically, the network topology is analyzed based on the optimized routing table to identify key nodes and data transmission hotspots in the network. Key nodes are nodes with concentrated data traffic and a large number of connected devices, while data transmission hotspots are areas with frequent data interactions. The performance of each candidate distributed cache node is evaluated, and the main evaluation indicators include storage capacity, processing power, and network connection quality. Storage capacity determines the amount of data that a cache node can store, processing power affects the transmission and processing efficiency of data between nodes, and network connection quality determines the data transmission speed and stability between a node and other nodes. Through comprehensive consideration of performance evaluation indicators, a performance indicator set for each cache node is obtained. Based on the performance indicator set of the cache node and the current business migration strategy, a heuristic algorithm is used to calculate the association between the cache node and the device. The heuristic algorithm can flexibly determine which devices each cache node should serve and which data caching tasks should be shared based on multiple factors such as the capacity of the cache node, the location of the device, and business needs, and obtain a cache node allocation plan to describe the specific data caching tasks and service scope of each cache node. Based on the cache node allocation plan, the data to be transmitted is allocated to the corresponding distributed cache node according to the pre-set data allocation ratio. Each cache node is not only responsible for the data storage and transmission tasks within its scope, but also can alleviate the transmission pressure of the network to a certain extent, and improve the efficiency and stability of overall data transmission. Redundant backup of data distributed on each cache node. Use the consistent hashing algorithm to determine the specific distribution of data among cache nodes. Through the consistent hashing algorithm, the uniform distribution of data among multiple cache nodes is guaranteed to achieve redundant storage of data. At the same time, in order to ensure the effectiveness of data redundant distribution, the storage status and network connection quality of each cache node are continuously monitored, and the performance data of the cache node is obtained in real time. Combine the real-time cache performance data with the current business migration strategy, and use the dynamic programming algorithm to optimize the distribution of data among cache nodes. The dynamic programming algorithm can maximize the efficiency of data transmission while ensuring data reliability by globally optimizing the data distribution scheme. Based on the optimization results, an updated data distribution scheme is generated, and the cached data is redistributed according to the new scheme. During the data redistribution process, if it is found that some data fragments are lost or damaged during transmission between cache nodes, Reed-Solomon coding technology is used for data recovery. Reed-Solomon coding is an error correction coding method that can recover lost or damaged data fragments through redundant information to ensure data integrity and reliability.

[0021] In the embodiment of the present invention, by adopting distributed soft bus technology and zero-knowledge proof mechanism, automatic discovery and security authentication of devices are realized, the security and reliability of the system are improved, and the device access process is simplified. By using dynamic routing tables and real-time network status monitoring, the data transmission path is optimized, and the network resource utilization and transmission efficiency are improved. Reed-Solomon coding is used to fragment and redundantly encode data, which enhances the reliability and anti-interference ability of data transmission and reduces the risk of data loss. Migration strategies are formulated based on business types and QoS indicators to achieve intelligent scheduling and load balancing of resources, and improve the overall performance of the system and user experience. Through parallel transmission of multiple network interfaces and dynamic adjustment of data allocation ratios, network resources are fully utilized, and the data transmission speed and stability are improved. Distributed cache nodes are deployed and optimized to achieve efficient transmission and rapid recovery of data, and improve the fault tolerance and availability of the system.

[0022] In a specific embodiment, the process of executing step S1 may specifically include the following steps: Broadcasting a device discovery request in the local area network, the device discovery request includes a unique identifier and network address information of the sending device, and obtaining device response information; Parse the device response information, extract the device identifier, network address and supported service type of the responding device, and build an initial device list; Use the elliptic curve cryptography algorithm to generate a public-private key pair, package the public key and the randomly generated challenge value into an authentication request, send it to the device in the initial device list, receive the signature result and new challenge value returned by the device to be authenticated, use the corresponding public key to verify the signature result, and obtain the device identity confirmation result; Based on the device identity confirmation result, use the private key to sign the new challenge value, send the signature result to the authenticated device, and receive the verification result returned by the authenticated device to confirm the device that has successfully performed the two-way authentication; A temporary session key is generated for the device that has successfully undergone two-way identity authentication, an encrypted communication channel is established, and the device that has successfully undergone two-way identity authentication and its corresponding temporary session key information are added to the authenticated device list to obtain an authenticated device list.

[0023] Specifically, a device discovery request is broadcasted in the local area network. The device discovery request contains the unique identifier and network address information of the sending device. The unique identifier is the MAC address or device ID of the device, which is used to uniquely identify the device; and the network address information is the IP address or other reachable information of the device in the local area network. When other devices in the local area network receive the device discovery request, they decide whether to respond according to their own status, and send device response information when responding. The device response information contains the device identifier, network address and supported service type of the responding device. The device identifier is used to identify the identity of the responding device, the network address is used for subsequent communication connections, and the supported service type describes the functions or services that the device can provide. The received device response information is parsed, and key information such as the device identifier, network address and supported service type are extracted from it, and an initial device list is constructed, which contains all devices in the current network that have responded to the device discovery request and their related information as the basic data for subsequent identity authentication. In order to ensure the security of communication between devices, the devices in the initial device list are authenticated. During the identity authentication process, the elliptic curve cryptography algorithm is used to generate a public and private key pair. Elliptic curve cryptography is an encryption algorithm based on the elliptic curve discrete logarithm problem, which can provide high security with a shorter key length. Set the elliptic curve to mod ,in and are the parameters of the elliptic curve, is a large prime number used to define a finite field. Suppose we choose a point on an elliptic curve As a base point, through the private key Calculate the public key , where the public key The calculation formula is: ; in, is a randomly generated private key, is a base point on the elliptic curve, is the calculated public key. At this time, the private key Only kept on the local device, and the public key Public key is used for encrypted communication. and a randomly generated challenge value Packaged into an authentication request. Challenge value It is a randomly generated number used to prevent replay attacks. It is sent together with the public key to the devices in the initial device list. When the device in the initial device list receives the authentication request, it uses the public key and Challenge Value Perform signature calculation and send the signature result And a new challenge value Return to the sending device. Signature result The calculation formula is: mod ; in, The challenge value The hash value obtained by hash calculation, is the order of the elliptic curve. The signature result is used to verify the authenticity of the sending device. The sending device receives the signature result returned by the device to be authenticated. and new challenge values Then, use the corresponding public key The signature result is verified. Successful verification indicates that the identity of the device to be authenticated has been confirmed. Based on the device identity confirmation result, the sending device uses its own private key New challenge value Sign and send the signature result Returned to the authenticated device. By Perform hash operation and then calculate the signature result based on the private key . The signature result is received on the device to be authenticated Then, use the received public key The signature result is verified. If the verification is successful, the identity of the sending device is confirmed to be credible, thus completing the two-way authentication. After completing the two-way authentication, in order to ensure the security of subsequent communications, a temporary session key is generated for the device that successfully completed the two-way authentication. The generation of the temporary session key is achieved through the Diffie-Hellman key exchange protocol. Both parties calculate a shared session key based on their own private keys and the other party's public key. The specific calculation formula is: ; in, To send the private key of the device, is the public key of the device to be authenticated, calculated It is a shared session key used for encryption of subsequent communications. After generating a temporary session key, the sending device adds the device that has successfully passed the two-way authentication and its corresponding temporary session key information to the authenticated device list to obtain the final authenticated device list. This list contains all devices that have passed the authentication and their corresponding session key information, ensuring secure data transmission between these devices through an encrypted communication channel.

[0024] In a specific embodiment, the process of executing step S2 may specifically include the following steps: Extract network topology information of each device based on the authenticated device list, including device identifier, network address and connection status, and construct an initial network topology map; Perform performance evaluation on each node in the initial network topology, calculate the node's processing capability index, storage capacity index, and network interface type index, and obtain the node performance score; Use network detection technology to measure the bandwidth, delay and packet loss rate of each link in the initial network topology diagram, calculate the link quality index, and obtain the link performance score; Based on the node performance score and link performance score, the minimum weight path from the source node to the target node is calculated to build the initial dynamic routing table; A sliding window mechanism is used to continuously monitor network conditions and regularly collect real-time network performance data, including bandwidth utilization, end-to-end latency, and congestion levels; Input the real-time network performance data into the pre-trained machine learning model to predict the short-term network performance change trend and obtain the network performance prediction results; Based on the network performance prediction results, the weights of the routing entries in the initial dynamic routing table are adjusted, the optimal path is recalculated using the dynamic programming algorithm, and the recalculated optimal path is updated to the dynamic routing table, and the update timestamp is set to obtain the optimized routing table.

[0025] Specifically, the network topology information of each device is extracted from the list of certified devices, including the device identifier, network address, and connection status. The device identifier is the unique ID or MAC address of the device, which is used to identify the uniqueness of the device; the network address is usually the IP address of the device, which is used to determine the location of the device in the network; and the connection status describes the connection between the device and other devices, such as whether it is connected through a wired or wireless network, or whether there are multiple network interfaces. By extracting this information, an initial network topology diagram containing all certified devices is constructed to show the connection relationship between the devices in the network. The performance of each node in the initial network topology diagram is evaluated. The performance evaluation includes three indicators: processing power index, storage capacity index, and network interface type index. The processing power index reflects the computing power of the device and is quantified based on factors such as the device's CPU performance and available computing resources. The storage capacity index describes the storage capacity of the device, including the size of the available storage space and the read and write speed of the storage device. The network interface type index measures the network interface types supported by the device and their bandwidth limits. For example, if a device supports Wi-Fi 6 and 5G network interfaces, its network interface type index will be higher. Each indicator is assigned a weight value to indicate the importance of the indicator in the comprehensive performance score. Assume that the processing power index, storage capacity index, and network interface type index are , and , and their weights are , and , then the comprehensive performance score of the node Calculated by the following formula: ; in, , and It needs to be set according to the specific application scenario and meet the . In this way, the performance score of each node in the initial network topology is obtained, and the overall performance level of each node is quantified. By adopting network detection technology, the performance of each link in the network topology is evaluated. For each link, its parameters such as bandwidth, delay and packet loss rate are measured to evaluate the quality of the link. Bandwidth reflects the data transmission capacity that the link can carry, delay refers to the time for data to be transmitted on the link, and packet loss rate indicates the loss of data during transmission. Based on these measurement data, the quality index of the link is calculated to obtain the performance score of each link. Based on the performance scores of all nodes and links, the minimum weight path from the source node to the target node in the network is calculated. Using the weighted shortest path algorithm, the optimal path between each pair of source nodes and target nodes is found, and the initial dynamic routing table is constructed accordingly to record the optimal path selection of each node to other nodes, including all nodes and links on the path. The network status is continuously monitored. The sliding window mechanism is used to effectively capture the changes in network performance. By regularly collecting real-time network performance data, including bandwidth utilization, end-to-end delay and network congestion, the current network status changes can be reflected in a timely manner. The sliding window mechanism can retain the latest network status data within a limited time window, so that the system can take into account recent data changes when calculating without being disturbed by outdated information. The real-time network performance data is input into the pre-trained machine learning model to predict the trend of network performance changes in the short term. The machine learning model is a prediction model based on time series, such as LSTM (Long Short-Term Memory Network) or ARIMA (Autoregressive Integrated Moving Average Model). By learning from historical data, the model can predict the trend of network bandwidth, latency and congestion in the future and obtain network performance prediction results. Based on the network performance prediction results, the weights of the routing entries in the initial dynamic routing table are adjusted. The optimal path is recalculated using a dynamic programming algorithm, considering the current network status and future performance change trends, and selecting the path that is most likely to provide the best transmission effect. For each updated path entry, its new weight information and update timestamp are recorded so that this information can be referenced first in future routing selection. This enables the system to respond to changes in network conditions in a timely manner, continuously optimize routing selection, and generate a dynamically updated optimized routing table.

[0026] In a specific embodiment, the process of executing step S3 may specifically include the following steps: Perform data feature analysis on the data to be transmitted, extract the total data size, data type and priority information, obtain the data feature vector, and use an adaptive algorithm to calculate the optimal fragment size based on the data feature vector and the current network status to obtain the fragmentation parameters; The data to be transmitted is divided according to the fragmentation parameters, and a unique sequence number and checksum are assigned to each data fragment to obtain an initial data fragment set; Perform Reed-Solomon encoding on each data segment in the initial data segment set to generate redundant data blocks to obtain encoded data segments, and calculate the optimal redundancy using a dynamic redundancy adjustment algorithm based on the current network quality index to obtain a redundancy parameter; Generate redundant data for the encoded data segment according to the redundancy parameter to obtain a data segment with redundant protection; The data fragments with redundant protection are packaged into transmission units, each of which contains the original data fragments, redundant data, sequence number and checksum, and a transmission unit mapping table is constructed to record the original data location information corresponding to each transmission unit to obtain the encoded transmission unit.

[0027] Specifically, the data to be transmitted is analyzed for data characteristics to extract the basic attributes of the data and transmission requirements. Data characteristics include the total size of the data, the data type, and the priority information of the data. The total size of the data is usually in bytes, indicating the size of the entire data packet; the data type is video, audio, text, etc., each of which has different requirements for the real-time and reliability of transmission; the priority information determines the priority of data transmission, and data with higher priority needs to be transmitted first when network resources are tight. By extracting this information, it is combined into a data feature vector. Assuming that the total data size is , data type is , the priority information is , then the data feature vector is expressed as Based on the data feature vector and the current network status information, an adaptive algorithm is used to calculate the optimal fragment size. The choice of fragment size will directly affect the efficiency and reliability of data transmission. If the fragment size is too large, a large amount of data needs to be retransmitted when a single data fragment is lost or damaged during transmission; if the fragment size is too small, the transmission cost and time will increase. The adaptive algorithm needs to comprehensively consider the data characteristics and network conditions to determine the optimal fragment size. Assume that the network status vector ,in Indicates the current available bandwidth. Indicates network delay, Indicates the packet loss rate. Fragment size Calculate using the following formula: ; in, and The weight coefficients of each factor are used to adjust the weight of data characteristics and network conditions in the calculation of shard size. The shard size that balances data characteristics and network conditions is calculated through this formula to obtain the shard parameter . The data to be transmitted is segmented according to the segmentation parameters, and the entire data is segmented into several data segments. A unique serial number is assigned to each data segment, and its checksum is calculated. The serial number is used to identify the order of the data segments, and the checksum is a checksum value obtained by processing the content of the data segment with a specific algorithm, which is used to detect the integrity of the data segment during the transmission process. For example, the CRC (cyclic redundancy check) algorithm is used to calculate the checksum to obtain an initial data segment set, and each data segment contains information about the data content, serial number and checksum. Reed-Solomon encoding is performed on each data segment in the initial data segment set. Reed-Solomon encoding is an error correction coding technology that increases the redundancy of data by generating redundant data blocks, thereby improving the reliability of data transmission. Assume that the original data length of each data segment is , generated by Reed-Solomon coding data blocks, of which , which means that during the transmission process, even if there are up to Even if a data block is lost, the original data can be restored through the remaining data blocks. Based on the current network quality indicators, such as packet loss rate and bandwidth utilization, the redundancy is dynamically adjusted and the optimal redundancy parameters are calculated. Assume that the current redundancy is , that is, the ratio of redundant data blocks in the total data blocks generated by each data fragment is r / k. The selection of redundancy parameters is determined by the dynamic redundancy adjustment algorithm, which is based on the current network packet loss rate and transmission delay Dynamically adjust to changes in ,For example: ; in, and The weight coefficient for redundancy adjustment. , while ensuring data transmission reliability, reducing the overhead of redundant data. According to the calculated redundancy parameter , generate redundant data for the encoded data fragments to obtain data fragments with redundant protection. Pack the data fragments with redundant protection into transmission units. Each transmission unit contains information such as the original data fragment, redundant data, sequence number and checksum. In order to correctly restore the transmitted data at the receiving end, a transmission unit mapping table is constructed to record the correspondence between each transmission unit and the original data position, including the sequence number of the data fragment, the original data position and checksum information. Through the transmission unit mapping table, the receiving end can accurately map the received transmission unit back to the position of the original data, thereby realizing accurate data restoration.

[0028] In a specific embodiment, the process of executing step S4 may specifically include the following steps: Analyze the characteristics of services in the OpenHarmony system, extract service type, priority and resource requirement information, and classify services into real-time and non-real-time categories; Based on the optimized routing table, the network distance from each terminal to the server is calculated to obtain the terminal-server distance matrix. The hardware resources of each terminal are monitored to obtain the CPU usage, memory occupancy and storage space utilization rate, and the terminal resource state vector is constructed. The terminal-server distance matrix and the terminal resource state vector are combined to construct a multi-dimensional state space model, and a QoS indicator evaluation function is formulated for each type of service, including two key indicators: available rate and delay, to obtain the service QoS score; Based on the multi-dimensional state space model and service QoS score, the service migration strategy model is trained using the reinforcement learning algorithm; For each service, the operating efficiency on the current terminal and potential target terminal is calculated, and factors such as network delay, computing power and storage capacity are considered to obtain the service migration benefit matrix. The service migration benefit matrix is ​​input into the service migration strategy model, the optimal migration plan is calculated, and the service migration strategy table is obtained.

[0029] Specifically, the characteristics of the services in the OpenHarmony system are analyzed, and the key business attributes are extracted from each service. The characteristics of each service mainly include service type, priority and resource demand information. The service type is used to describe the nature of the service, such as video conferencing, real-time messaging, file downloading, etc. According to the different service types, the services are divided into real-time services and non-real-time services. Real-time services (such as video conferencing and voice calls) have very strict requirements on latency, and usually need to complete data transmission and processing within milliseconds to ensure a good user experience; while non-real-time services (such as file transfer and software updates) are not sensitive to latency and pay more attention to transmission reliability and resource utilization. Priority information indicates the importance of the service in resource competition. For example, some important services are set to high priority so that they can be processed first when resources are tight. Resource demand information describes the demand for system resources during the operation of the service, including the required CPU computing power, memory usage, and storage space. Based on the optimized routing table, the network distance from each terminal to the server is calculated to obtain the terminal-server distance matrix. Network distance is measured by parameters such as delay and number of hops. Assume that there is Terminals and servers, then the terminal-server distance matrix The dimension is ,in Indicates Terminal to The network distance between the servers. This distance matrix can directly reflect the network connection quality between each terminal and the server. At the same time, the hardware resource status of each terminal is monitored in real time. The resource status of the terminal includes indicators such as CPU usage, memory usage, and storage space utilization. Assume that the CPU usage of a terminal is , memory usage is , storage space utilization is , then the resource state vector of the terminal Expressed as The resource status vector can fully describe the resource usage of the terminal at the current moment, helping the system determine whether the terminal is suitable for carrying new services or migrating existing services. Terminal Resource Status Vector Combined with the above, a multi-dimensional state space model is constructed. This model takes into account the network status between each terminal and the server and the hardware resource status of the terminal, and generates a state description for each terminal and server combination. Based on the multi-dimensional state space model, a QoS (quality of service) indicator evaluation function is formulated for each type of service. The QoS evaluation function is used to quantify the service quality level of the service in the current state, including two key indicators: available rate and latency. The available rate indicates the maximum data transmission rate that the current service can achieve in the network, while the latency indicates the time from service request to response. Assume that the available rate of a service in the current state is , the delay is , then the QoS score of the service Calculated by the following formula: ; in, and are the weight coefficients of available rate and delay, respectively, indicating the relative importance of each indicator in QoS scoring. In this way, the QoS score in the current state is calculated for each service. , thereby measuring its service quality level. Based on the multi-dimensional state space model and service QoS score, a reinforcement learning algorithm is used to train a service migration strategy model. The reinforcement learning algorithm can gradually optimize the service migration strategy by continuously exploring and learning in different states, so as to make the best decision when encountering similar scenarios in the future. The algorithm tries different migration strategies in different states, observes their impact on the overall system performance, and rewards or punishes them according to the effectiveness of the strategy, gradually adjusts the parameters of the strategy model, and finds the optimal service migration strategy. After the service migration strategy model is trained, the operating efficiency of each service on the current terminal and potential target terminal is calculated. The calculation of operating efficiency needs to comprehensively consider multiple factors such as network delay, computing power, and storage capacity. Assume that the operating efficiency of a certain service on the current terminal is , the operating efficiency at the potential target terminal is , then the migration benefit of the business in the current state is expressed as: ; in, For the migration benefits of business, and are the operating efficiencies of the target terminal and the current terminal respectively, The cost of service migration includes data transmission overhead and possible service interruption time. By calculating the migration benefit of each service between different terminals, the service migration benefit matrix is ​​obtained to describe the benefits of each service migration between different terminals. The service migration benefit matrix is ​​input into the service migration strategy model. The model calculates the optimal service migration plan based on the current status and benefit matrix, and obtains the service migration strategy table, which records the target terminal that is most suitable for each service to migrate to in the current status, as well as the expected benefits and service quality improvement after migration.

[0030] In a specific embodiment, the process of executing step S5 may specifically include the following steps: Scan the network interfaces supported by the device, identify the available network interface types, obtain a list of network interfaces, and based on the list of network interfaces, perform performance evaluation on each interface, measure bandwidth, latency, stability, and energy consumption indicators, and obtain an interface performance indicator set; According to the interface performance indicator set, the transmission weight of each interface is calculated using the fuzzy comprehensive evaluation method to obtain the initial interface weight allocation scheme, and based on the initial interface weight allocation scheme, the encoded transmission units are allocated to allocate data fragments to different network interfaces; Monitor the transmission performance of each network interface in real time, including throughput, response time, and error rate, obtain real-time interface performance data, and integrate the real-time interface performance data with the service migration strategy to build a dynamic weight adjustment model to obtain the interface-service weight matrix; Based on the interface-service weight matrix, an adaptive load balancing algorithm is used to calculate the new data allocation ratio to obtain an updated data allocation plan. According to the updated data allocation plan, the data transmission volume of each network interface is dynamically adjusted, and the data fragments that failed to be transmitted are intelligently retransmitted to dynamically adjust the data allocation ratio.

[0031] Specifically, the network interfaces supported by the device are scanned to identify all available network interface types, including Wi-Fi, Ethernet, Bluetooth, cellular networks (such as 4G or 5G), etc. Each interface type has different characteristics in terms of data transmission bandwidth, latency, stability, and energy consumption. By identifying the interface type, a complete list of network interfaces is obtained, which contains information such as the type of each interface, the current status (whether connected, enabled), and the interface address (such as MAC address or IP address). The performance of each network interface is evaluated. The performance evaluation indicators include bandwidth, latency, stability, and energy consumption. Bandwidth refers to the amount of data that can be transmitted by the network interface per unit time, usually in Mbps or Gbps; latency refers to the time interval from the sender to the receiver, usually in milliseconds (ms); stability reflects the connection quality of the network interface during long-term operation, measured by indicators such as the number of disconnections or jitter; energy consumption refers to the consumption of the device battery by the interface in the working state, usually expressed in watts (W). The performance score P of each interface is calculated by the formula: ; in, is the actual bandwidth of the interface, is the interface delay, It is the jitter of the interface. is the energy consumption of the interface, , , and They are the maximum bandwidth, maximum delay, maximum jitter and maximum energy consumption that can be achieved in the system. , , and Respectively represent the importance of bandwidth, delay, jitter and energy consumption in performance scoring. Through the formula, the comprehensive performance score of each network interface is obtained, and the scoring information is integrated into an interface performance indicator set. After obtaining the performance indicator set of each network interface, the fuzzy comprehensive evaluation method is used to calculate the transmission weight of each interface. The fuzzy comprehensive evaluation method is a multi-factor decision-making method that combines the weights of multiple fuzzy factors to obtain a comprehensive evaluation result. In order to apply the fuzzy comprehensive evaluation method, a membership function is set for the performance indicator of each interface. The membership function maps the value of each indicator to an interval of [0, 1], indicating the fuzzy membership of the indicator under a specific value. According to the membership value and weight coefficient of each indicator, the transmission weight of each network interface is calculated to obtain the initial interface weight allocation scheme. This scheme assigns the weight value of each network interface to the corresponding interface to guide the allocation of subsequent data fragments. Based on the initial interface weight allocation scheme, the encoded data fragments are allocated to different network interfaces for transmission. In the data allocation process, the data fragments are proportionally allocated to each interface according to the weight value of each interface, maximizing the use of the multi-network interface resources of the device and improving the efficiency and stability of data transmission. Assume that there is network interfaces, and the weight of each interface is , the number of encoded data fragments is , then assign to the Number of data fragments per interface for: ; Among them, round Represents a rounding operation to ensure integer allocation of data fragments. Each interface is allocated the corresponding data fragment according to its performance weight ratio and starts parallel transmission. In order to adjust the data allocation strategy in real time, the transmission performance of each network interface is continuously monitored. The main monitoring indicators include throughput, response time and error rate. Throughput refers to the amount of data actually transmitted by each interface per unit time, usually in Mbps; response time is the time interval from the data request to the receipt of the response; error rate reflects the packet loss or data corruption during data transmission. By monitoring these performance data in real time, the current status and transmission performance of each network interface can be understood. Combine the real-time interface performance data with the current business migration strategy to construct a dynamic weight adjustment model. The model dynamically adjusts the weight value of each interface by comprehensively considering the real-time performance of the interface and the business requirements to generate an interface-business weight matrix. Assume that the business requirements for different performance indicators are represented by vectors The real-time interface performance is represented by the vector Indicates that the interface-service weight matrix Elements in It is expressed as: ; in, Indicates Interface pair The matrix is ​​used to determine the adaptability of each service on each interface. Based on the interface-service weight matrix, an adaptive load balancing algorithm is used to calculate the new data allocation ratio. The adaptive load balancing algorithm dynamically adjusts the data allocation strategy by analyzing the transmission performance changes of each interface in real time to achieve the purpose of balancing the load and maximizing the use of network resources. The adaptive load balancing algorithm calculates the optimal data allocation ratio in the current state based on the real-time transmission performance data of each interface, and dynamically adjusts the data transmission volume of each interface based on this ratio. Assume that in the adjusted allocation scheme, the new data allocation ratio is , then assign to the The number of data fragments per interface is: round ; Through dynamic adjustment, it can effectively respond to changes in network status and ensure the stability and efficiency of data transmission. For data fragments that are lost or damaged during transmission, the intelligent retransmission mechanism is triggered. The intelligent retransmission mechanism selects the optimal interface to retransmit the lost data fragments based on the performance status of the current interface. Assuming that at a certain moment, the packet loss rate of interface 1 is high, while the performance of interface 2 and interface 3 is relatively stable, the intelligent retransmission mechanism will give priority to interface 2 or interface 3 for retransmission of data fragments. At the same time, according to the retransmission results and real-time interface performance data, the data allocation ratio is adjusted to avoid a decrease in data transmission efficiency due to poor performance of a certain interface.

[0032] In a specific embodiment, the process of executing step S6 may specifically include the following steps: Analyze the network topology based on the optimized routing table, identify key nodes and data transmission hotspots, determine the deployment location of distributed cache nodes, and evaluate the performance of distributed cache nodes, calculate storage capacity, processing power and network connection quality, and obtain a cache node performance indicator set; According to the cache node performance indicator set and the service migration strategy, a heuristic algorithm is used to calculate the association between the cache node and the device, and a cache node allocation plan is obtained. Based on the cache node allocation plan, the data to be transmitted is allocated to the corresponding distributed cache node according to the data allocation ratio; Redundantly back up the data distributed on the cache nodes, use the consistent hashing algorithm to determine the distribution of data among the cache nodes, obtain a data redundant storage solution, and continuously monitor the storage status and network connection quality of the cache nodes to obtain real-time cache performance data; Combine real-time cache performance data with business migration strategies, use dynamic programming algorithms to optimize data distribution among cache nodes, and obtain an updated data distribution plan. Based on the updated data distribution plan, cache data is redistributed, and Reed-Solomon coding is used to recover lost or damaged data to ensure data integrity and reliability.

[0033] Specifically, the optimized routing table contains the best path information between each node and other nodes, including key parameters such as bandwidth, delay, and number of hops between nodes. Through comprehensive analysis of this information, key nodes and data transmission hotspots in the network are identified. Key nodes are the concentration points of data traffic and undertake a large number of forwarding tasks; while data transmission hotspots are areas where data interaction is frequent and are important references for deploying cache nodes. Identify key nodes and data transmission hotspots to determine the deployment location of distributed cache nodes. The deployment location of cache nodes needs to comprehensively consider the network topology, data traffic distribution, and node load capacity to ensure that cache nodes can effectively share data traffic and improve overall data transmission efficiency. Evaluate the performance of distributed cache nodes. Key indicators of performance evaluation include storage capacity, processing power, and network connection quality. Storage capacity refers to the size of data that a cache node can store, usually in GB or TB; processing power reflects the ability of a cache node to process and manage data, which is measured by parameters such as the node's CPU performance and available memory; and network connection quality involves indicators such as bandwidth, delay, and packet loss rate between nodes and other nodes, which directly affect the transmission efficiency of data between cache nodes. In order to quantify the comprehensive performance of the cache node, the performance score P of the cache node is calculated by the following formula: ; in, Represents the storage capacity of the node, Indicates the processing capabilities of the node (such as CPU performance, memory size, etc.), Indicates the network connection quality of the node, , and are the maximum storage capacity, maximum processing power and maximum network connection quality that can be achieved in the system, respectively, and the weight coefficient , and Respectively represent the importance of storage capacity, processing power and network connection quality in the comprehensive performance score. The performance score of each cache node is obtained through the formula, and the score information is integrated into a cache node performance indicator set. According to the business migration strategy and the performance indicator set of the cache node, the heuristic algorithm is used to calculate the association between the cache node and the device. The heuristic algorithm can quickly find a cache node allocation scheme that meets most business needs through a comprehensive analysis of the cache node performance and device requirements. The scheme allocates one or more cache nodes to each device to maximize the utilization rate of the cache node and the data transmission efficiency. For example, if a device has a high data access frequency and is geographically close to a cache node, then the cache node should be allocated to the device first. In the cache node allocation scheme, the data to be transmitted is allocated to the corresponding distributed cache node according to the data allocation ratio. The allocation ratio is determined based on the performance indicators and business requirements of the cache node to ensure that the data can be evenly distributed on each cache node to avoid the overload of a single node. After the data is allocated, the data distributed on the cache nodes is redundantly backed up. In order to achieve efficient distribution and redundant backup of data, the consistent hashing algorithm is used to determine the distribution of data among cache nodes. The consistent hashing algorithm maps all cache nodes to a ring-shaped hash space, and then maps data items to the ring space through hash values. Each data item finds the first cache node on the ring that is greater than or equal to its hash value as its primary storage node, and selects several subsequent nodes of the node as backup nodes to achieve redundant storage of data. The storage status and network connection quality of the cache node are continuously monitored. The storage status includes information such as storage usage and remaining storage space of the cache node; the network connection quality includes data such as real-time bandwidth, latency and packet loss rate between nodes. By continuously monitoring this information, the performance bottlenecks and network failures of the cache node can be discovered in a timely manner. The real-time cache performance data is combined with the business migration strategy, and the dynamic programming algorithm is used to optimize the distribution of data among cache nodes. The dynamic programming algorithm adjusts the current data distribution according to the real-time performance data to find a globally optimal cache data distribution plan. The dynamic programming algorithm calculates the storage cost of each data item on different cache nodes according to the storage status, network connection quality and business requirements of each cache node, and minimizes the storage cost after summing up to obtain a new data distribution plan. Based on the updated data distribution plan, the cache data is redistributed. The reallocation process takes into account the cost and time of data movement, as well as the impact on existing business. To reduce the impact of data movement on system performance, data is migrated in batches and time periods. At the same time, during the data migration process, Reed-Solomon coding is used to recover lost or damaged data.Reed-Solomon coding is an error correction coding technology that introduces redundant information into the data to restore the original data when part of the data is lost or damaged. Assuming that each data item is divided into k data blocks and r redundant blocks are generated, then at most r data blocks are allowed to be lost or damaged during the transmission process. As long as the receiving end can receive at least k data blocks, the complete data can be restored through Reed-Solomon decoding.

[0034] The above describes the data transmission method based on OpenHarmony in the embodiment of the present invention. The following describes the data transmission platform based on OpenHarmony in the embodiment of the present invention. Figure 2 In an embodiment of the present invention, an OpenHarmony-based data transmission platform includes: The automatic discovery module is used to automatically discover network devices using distributed soft bus technology, and authenticate the discovered devices based on the zero-knowledge proof mechanism to obtain a list of authenticated devices; A construction module is used to construct an initial dynamic routing table according to the authenticated device list, and update the dynamic routing table based on the real-time network status to obtain an optimized routing table; The encoding module is used to perform fragmentation processing on the data to be transmitted and perform redundant encoding on the data fragments using Reed-Solomon encoding to obtain encoded transmission units; A development module for classifying services into real-time and non-real-time categories, building a state space based on terminal operation status and optimized routing tables, and developing service migration strategies based on QoS indicators; An adjustment module, used to transmit the encoded transmission units in parallel using multiple network interfaces, and dynamically adjust the data allocation ratio based on real-time monitored interface performance and service migration strategy; The optimization module is used to deploy distributed cache nodes in the network, optimize data transmission based on optimized routing tables, business migration strategies and data allocation ratios, and achieve efficient data transmission and recovery.

[0035] Through the collaboration of the above components, the distributed soft bus technology and zero-knowledge proof mechanism are adopted to realize the automatic discovery and security authentication of devices, improve the security and reliability of the system, and simplify the device access process. The dynamic routing table and real-time network status monitoring are used to optimize the data transmission path, improve the network resource utilization and transmission efficiency. The Reed-Solomon code is used to fragment and redundantly encode the data, which enhances the reliability and anti-interference ability of data transmission and reduces the risk of data loss. The migration strategy is formulated based on the business type and QoS indicators, which realizes the intelligent scheduling and load balancing of resources, and improves the overall performance of the system and user experience. Through the parallel transmission of multiple network interfaces and the dynamic adjustment of data allocation ratio, network resources are fully utilized, and the data transmission speed and stability are improved. The distributed cache nodes are deployed and optimized to achieve efficient data transmission and rapid recovery, and improve the fault tolerance and availability of the system.

[0036] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the OpenHarmony-based data transmission method in the above-mentioned embodiments.

[0037] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the OpenHarmony-based data transmission method.

[0038] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0039] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0040] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data transmission method based on OpenHarmony, characterized in that: The method comprises: Distributed soft bus technology is used to automatically discover network devices, and the discovered devices are authenticated based on the zero-knowledge proof mechanism to obtain a list of authenticated devices; Constructing an initial dynamic routing table according to the authenticated device list, and updating the dynamic routing table based on real-time network conditions to obtain an optimized routing table; The data to be transmitted is segmented and redundantly encoded using Reed-Solomon coding to obtain encoded transmission units; Divide services into real-time and non-real-time categories, construct a state space based on the terminal operation status and the optimized routing table, and formulate a service migration strategy based on QoS indicators; Using multiple network interfaces to transmit the encoded transmission units in parallel, and dynamically adjusting the data allocation ratio based on real-time monitored interface performance and the service migration strategy; Distributed cache nodes are deployed in the network, and data transmission is optimized based on the optimized routing table, the service migration strategy and the data allocation ratio to achieve efficient data transmission and recovery.

2. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The distributed soft bus technology is used to automatically discover network devices, and the discovered devices are authenticated based on the zero-knowledge proof mechanism to obtain a list of authenticated devices, including: Broadcasting a device discovery request in the local area network, wherein the device discovery request includes a unique identifier and network address information of the sending device, and obtaining device response information; Parsing the device response information, extracting the device identifier, network address and supported service type of the responding device, and constructing an initial device list; Generate a public-private key pair using an elliptic curve cryptography algorithm, package the public key and a randomly generated challenge value into an authentication request, send it to the device in the initial device list, receive the signature result and new challenge value returned by the device to be authenticated, verify the signature result using the corresponding public key, and obtain the device identity confirmation result; Based on the device identity confirmation result, use the private key to sign the new challenge value, send the signature result to the authenticated device, and receive the verification result returned by the authenticated device to confirm the device for which the two-way identity authentication is successful; A temporary session key is generated for the device that has successfully undergone the two-way identity authentication, an encrypted communication channel is established, and the device that has successfully undergone the two-way identity authentication and its corresponding temporary session key information are added to a list of authenticated devices to obtain a list of authenticated devices.

3. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The initial dynamic routing table is constructed according to the authenticated device list, and the dynamic routing table is updated based on the real-time network status to obtain an optimized routing table, including: Extracting network topology information of each device based on the authenticated device list, including device identifier, network address and connection status, and constructing an initial network topology map; Performing performance evaluation on each node in the initial network topology diagram, calculating the processing capability index, storage capacity index and network interface type index of the node, and obtaining a node performance score; Using network detection technology to measure the bandwidth, delay and packet loss rate of each link in the initial network topology diagram, calculate the link quality index, and obtain a link performance score; Based on the node performance score and the link performance score, a minimum weight path from a source node to a target node is calculated to construct an initial dynamic routing table; A sliding window mechanism is used to continuously monitor network conditions and regularly collect real-time network performance data, including bandwidth utilization, end-to-end latency, and congestion levels; Inputting the real-time network performance data into a pre-trained machine learning model to predict the short-term network performance change trend and obtain a network performance prediction result; Based on the network performance prediction result, the weights of the routing entries in the initial dynamic routing table are adjusted, the optimal path is recalculated using a dynamic programming algorithm, and the recalculated optimal path is updated to the dynamic routing table, and an update timestamp is set to obtain an optimized routing table.

4. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The method of performing segmentation processing on the data to be transmitted and performing redundant encoding on the data segments using Reed-Solomon encoding to obtain the encoded transmission units includes: Performing data feature analysis on the data to be transmitted, extracting the total data size, data type and priority information, obtaining a data feature vector, and calculating the optimal fragmentation size using an adaptive algorithm based on the data feature vector and the current network status, obtaining fragmentation parameters; Segment the data to be transmitted according to the segmentation parameters, assign a unique sequence number and checksum to each data segment, and obtain an initial data segment set; Performing Reed-Solomon encoding on each data segment in the initial data segment set to generate redundant data blocks to obtain encoded data segments, and calculating optimal redundancy using a dynamic redundancy adjustment algorithm based on current network quality indicators to obtain redundancy parameters; Generating redundant data for the encoded data segment according to the redundancy parameter to obtain a data segment with redundancy protection; The data fragments with redundant protection are packaged into transmission units, each transmission unit contains the original data fragments, redundant data, sequence number and checksum, and a transmission unit mapping table is constructed to record the original data position information corresponding to each transmission unit to obtain the encoded transmission unit.

5. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The services are divided into real-time and non-real-time categories, a state space is constructed based on the terminal operation status and the optimized routing table, and a service migration strategy is formulated according to the QoS index, including: Analyze the characteristics of services in the OpenHarmony system, extract service type, priority and resource requirement information, and classify services into real-time and non-real-time categories; Based on the optimized routing table, the network distance from each terminal to the server is calculated to obtain a terminal-server distance matrix, and the hardware resources of each terminal are monitored to obtain the CPU usage rate, memory occupancy rate and storage space utilization rate, and to construct a terminal resource state vector; The terminal-server distance matrix and the terminal resource state vector are combined to construct a multidimensional state space model, and a QoS indicator evaluation function is formulated for each type of service, including two key indicators, namely, available rate and delay, to obtain a service QoS score; Based on the multidimensional state space model and the service QoS score, a service migration strategy model is trained using a reinforcement learning algorithm; The operating efficiency of each service on the current terminal and potential target terminal is calculated, and factors such as network delay, computing power and storage capacity are considered to obtain a service migration benefit matrix. The service migration benefit matrix is ​​input into the service migration strategy model, and the optimal migration plan is calculated to obtain a service migration strategy table.

6. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The adopting of multiple network interfaces to transmit the encoded transmission units in parallel and dynamically adjusting the data allocation ratio based on real-time monitored interface performance and the service migration strategy includes: Scan the network interfaces supported by the device, identify the available network interface types, obtain a network interface list, and based on the network interface list, perform performance evaluation on each interface, measure bandwidth, latency, stability, and energy consumption indicators, and obtain an interface performance indicator set; According to the interface performance indicator set, a fuzzy comprehensive evaluation method is used to calculate the transmission weight of each interface to obtain an initial interface weight allocation scheme, and based on the initial interface weight allocation scheme, the encoded transmission units are allocated to allocate data fragments to different network interfaces; Real-time monitoring of the transmission performance of each network interface, including throughput, response time and error rate, to obtain real-time interface performance data, and to integrate the real-time interface performance data with the service migration strategy to construct a dynamic weight adjustment model to obtain an interface-service weight matrix; Based on the interface-service weight matrix, an adaptive load balancing algorithm is used to calculate a new data allocation ratio to obtain an updated data allocation plan. According to the updated data allocation plan, the data transmission volume of each network interface is dynamically adjusted, and the data fragments that failed to be transmitted are intelligently retransmitted to dynamically adjust the data allocation ratio.

7. The OpenHarmony-based data transmission method according to claim 1, characterized in that: The distributed cache node is deployed in the network, and data transmission is optimized based on the optimized routing table, the service migration strategy and the data allocation ratio to achieve efficient data transmission and recovery, including: Analyze the network topology based on the optimized routing table, identify key nodes and data transmission hotspots, determine the deployment location of distributed cache nodes, and perform performance evaluation on the distributed cache nodes, calculate storage capacity, processing power and network connection quality, and obtain a cache node performance indicator set; According to the cache node performance indicator set and the service migration strategy, a heuristic algorithm is used to calculate the association relationship between the cache node and the device to obtain a cache node allocation scheme, and based on the cache node allocation scheme, the data to be transmitted is allocated to the corresponding distributed cache node according to the data allocation ratio; Redundantly back up the data distributed on the cache nodes, use the consistent hashing algorithm to determine the distribution of data among the cache nodes, obtain a data redundant storage solution, and continuously monitor the storage status and network connection quality of the cache nodes to obtain real-time cache performance data; The real-time cache performance data is combined with the business migration strategy, and a dynamic programming algorithm is used to optimize the distribution of data among cache nodes to obtain an updated data distribution plan. Based on the updated data distribution plan, the cache data is reallocated, and Reed-Solomon coding is used to recover lost or damaged data to ensure data integrity and reliability.

8. A data transmission platform based on OpenHarmony, characterized in that: Used to execute the OpenHarmony-based data transmission method according to any one of claims 1 to 7, the OpenHarmony-based data transmission platform comprising: The automatic discovery module is used to automatically discover network devices using distributed soft bus technology, and authenticate the discovered devices based on the zero-knowledge proof mechanism to obtain a list of authenticated devices; A construction module, used to construct an initial dynamic routing table according to the authenticated device list, and update the dynamic routing table based on the real-time network status to obtain an optimized routing table; The encoding module is used to perform fragmentation processing on the data to be transmitted and perform redundant encoding on the data fragments using Reed-Solomon encoding to obtain encoded transmission units; A formulation module for classifying services into real-time and non-real-time categories, constructing a state space based on the terminal operation status and the optimized routing table, and formulating a service migration strategy based on QoS indicators; An adjustment module, configured to use a plurality of network interfaces to transmit the encoded transmission units in parallel, and dynamically adjust the data allocation ratio based on the real-time monitored interface performance and the service migration strategy; The optimization module is used to deploy distributed cache nodes in the network, optimize data transmission based on the optimized routing table, the business migration strategy and the data allocation ratio, and realize efficient data transmission and recovery.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the OpenHarmony-based data transmission method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the processor is enabled to execute the OpenHarmony-based data transmission method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for highly-reliably constructing a dynamic Ad-Hoc Network of multiple smart household devices

    CN105007202A

  • Networking method, system and terminal based on distributed soft bus

    CN119030823A

  • Auditing data distributed storage method based on multi-layer encryption strategy and related product

    CN119441229A

  • Wireless Mesh network reliability guarantee method based on adaptive network coding

    CN119584236A

  • Methods for use in a process for migrating resources between integrated access and backhaul topologies

    US20250071655A1

Cited By

  • Industrial data coding and transmission optimization method, system and equipment based on industrial internet of things, and medium

    CN120074758A

  • Full-color LED display screen intelligent centralized monitoring method and system

    CN120371649A

  • A method and system for intelligent centralized monitoring of full-color LED displays

    CN120371649B

  • Data uploading method and device based on dynamic prediction, equipment and medium

    CN120583098A

  • Abnormal data analysis method based on industrial Internet of Things

    CN121125630A