Link switching performance test method and device for Euler and gap cross-platform equipment data transmission, terminal and medium
By creating a socket between Euler and HarmonyOS devices and simulating link failures to trigger automatic switching, and by parsing network packets and logs to calculate packet loss rate and switching time, the problem of lack of standardized testing for link switching performance and stability between Euler and HarmonyOS cross-platform devices is solved, thus improving transmission stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-04-10
AI Technical Summary
In existing multi-link communication solutions, the link switching performance and stability of Euler and HarmonyOS cross-platform devices lack standardized testing, resulting in insufficient continuity and reliability of data transmission.
A socket is created between the Euler device and the HarmonyOS device to establish a multi-link data transmission channel. Test data streams are sent through the HarmonyOS device to simulate a primary link failure, triggering a multi-path transmission mechanism to automatically switch to the backup link. Network packets and system logs are obtained and parsed to calculate the data packet loss rate and link switching time.
It enables quantitative evaluation of the reliability and performance of cross-platform device link switching between Euler and HarmonyOS. Through standardized testing and log analysis, it provides data support for optimizing multi-path transmission parameters and improves the transmission stability of devices in complex network environments.
Smart Images

Figure CN121842035A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of transmission testing technology, and in particular to a method, apparatus, terminal, and medium for testing link switching performance in cross-platform data transmission between Euler and HarmonyOS devices. Background Technology
[0002] In device communication scenarios based on Euler and HarmonyOS cross-platform devices with multiple links (such as WiFi, modules, and Ethernet) coexisting, when the primary link (such as Ethernet) is unexpectedly interrupted (such as by physical disconnection), it is necessary to rely on multi-path transmission capabilities to quickly switch to the backup link (such as WiFi or modules) to ensure the continuity and reliability of data transmission between Euler and HarmonyOS cross-platform devices.
[0003] Currently, based on the HarmonyOS system, link switching strategies can be optimized through QoS configuration and multi-path enhancement parameters. However, in existing multi-link communication solutions, the link switching performance and stability of cross-platform devices based on Euler and HarmonyOS lack standardized testing. Therefore, the link switching performance and stability of cross-platform devices based on Euler and HarmonyOS with multiple coexisting links need to be further verified through standardized testing. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, terminal and medium for testing link switching performance in cross-platform device data transmission between Euler and HarmonyOS, in order to address the above-mentioned deficiencies of the prior art. The aim is to solve the problem of lack of standardized testing for link switching performance and stability between Euler and HarmonyOS in existing multi-link communication schemes.
[0005] The technical solution adopted by this invention to solve the technical problem is as follows: In a first aspect, the present invention discloses a link switching test method for cross-platform device transmission between Euler and HarmonyOS systems, wherein the method includes: Create a server-side socket on the Euler device (which acts as the receiver) and a client-side socket on the HarmonyOS device (which acts as the sender). Based on the server socket and the client socket, a multi-link data transmission channel is established between the Euler device and the HarmonyOS device; The HarmonyOS device is controlled to send a test data stream to the Euler device through the data transmission channel, and a primary link failure is simulated during data transmission to trigger a multi-path transmission mechanism to automatically switch to the backup link. The network packets and system logs during the data transmission process are obtained, and the network packets and system logs are parsed to calculate the corresponding data packet loss rate and path switching time.
[0006] Optionally, the step of creating a server-side socket on the Euler device (as the receiving end) and a client-side socket on the HarmonyOS device (as the sending end) includes: The server socket is created on the Euler device (which acts as the receiver) and the client socket is created on the HarmonyOS device (which acts as the sender) using the soft bus socket tool.
[0007] Optionally, establishing a multi-link-based data transmission channel between the Euler device and the HarmonyOS device based on the server-side Socket and the client-side Socket includes: The T_SocketConnect function is called to connect the server socket and the client socket to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device.
[0008] Optionally, controlling the HarmonyOS device to send a test data stream to the Euler device through the data transmission channel includes: The test data stream is controlled by the HarmonyOS device to send to the Euler device through the data transmission channel according to the preset test parameter configuration; the preset test parameter configuration includes target Socket ID, data type, sending interval, number of tests and single packet size.
[0009] Optionally, obtaining network packets and system logs during data transmission includes: Use a preset packet capture tool to capture network packets during data transmission, and collect system logs using a preset log collection method.
[0010] Optionally, the step of parsing the network packets and the system logs to calculate the corresponding packet loss rate and link switching time includes: Calculate the corresponding packet loss rate using the number of sent and received packets in the network packets; Filter the corresponding link switching logs from the system logs, and use the link switching logs to calculate the link switching time.
[0011] Optionally, calculating the link handover time using the link handover log includes: Determine the timestamps corresponding to two consecutive link switching logs with different channelId values, and calculate the difference between the timestamps corresponding to the two consecutive link switching logs to obtain the link switching time.
[0012] Secondly, the present invention also discloses a link switching test device for cross-platform device transmission between Euler and HarmonyOS systems, wherein the device comprises: The Socket creation module is used to create a server-side Socket on the Euler device (which acts as the receiver) and a client-side Socket on the HarmonyOS device (which acts as the sender). The channel establishment module is used to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server socket and the client socket; The data transmission module is used to control the HarmonyOS device to send test data streams to the Euler device through the data transmission channel; The link failure simulation module is used to simulate a primary link failure during data transmission to trigger the multipath transmission mechanism to automatically switch to the backup link. The message and log acquisition module is used to acquire network messages and system logs during data transmission. The message and log parsing module is used to parse the network messages and the system logs to calculate the corresponding data packet loss rate and path switching time.
[0013] Thirdly, the present invention discloses a terminal, comprising: a memory, a processor, and a link switching test program for cross-platform device transmission between Euler and HarmonyOS systems, stored in the memory and executable on the processor. When the link switching test program for cross-platform device transmission between Euler and HarmonyOS systems is executed by the processor, it implements the steps of the link switching test method for cross-platform device transmission between Euler and HarmonyOS systems as described above.
[0014] Fourthly, the present invention discloses a computer-readable storage medium storing a computer program that can be executed to implement the steps of the link switching test method for cross-platform device transmission between Euler and HarmonyOS systems as described above.
[0015] This invention provides a method, apparatus, terminal, and medium for testing link switching performance in cross-platform device data transmission between Euler and HarmonyOS systems. The method includes: creating a server socket on the Euler device (as the receiving end) and a client socket on the HarmonyOS device (as the sending end); establishing a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server socket and the client socket; controlling the HarmonyOS device to send a test data stream to the Euler device through the data transmission channel, and simulating a primary link failure during data transmission to trigger a multi-path transmission mechanism to automatically switch to a backup link; acquiring network packets and system logs during data transmission, and parsing the network packets and system logs to calculate the corresponding data packet loss rate and link switching time. Therefore, this invention enables bidirectional communication between Euler and HarmonyOS devices by creating a Socket on both devices to establish a data transmission channel. Then, the HarmonyOS device sends a test data stream to the Euler device, simulating a primary link failure during data transmission to trigger automatic link switching. By analyzing network packets and system logs during this process, the data packet loss rate and link switching time can be calculated. This allows for a quantitative assessment of the reliability and performance of link switching on Euler and HarmonyOS cross-platform devices. Standardized testing and log analysis provide data support for subsequent optimization of multipath transmission parameters or troubleshooting of link switching issues, further improving the transmission stability of HarmonyOS and Euler cross-platform devices in complex network environments. Attached Figure Description
[0016] Figure 1 This is a flowchart of a preferred embodiment of the link switching test method for cross-platform device transmission between Euler and HarmonyOS systems in this invention; Figure 2 This is a functional principle block diagram of a preferred embodiment of the link switching test device for cross-platform device transmission between Euler and HarmonyOS systems in this invention; Figure 3 This is a functional principle block diagram of a preferred embodiment of the terminal in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0018] Please see Figure 1 , Figure 1This is a flowchart of the link switching test method used in cross-platform device transmission between Euler and HarmonyOS systems in this invention. Figure 1 As shown in the embodiment of the present invention, the link switching test method for cross-platform device transmission between Euler and HarmonyOS systems includes: Step S11: Create a server socket on the Euler device (as the receiver) and a client socket on the HarmonyOS device (as the sender).
[0019] In this embodiment, the Euler device acts as the receiver, i.e., the server, creating a server-side Socket, while the HarmonyOS device acts as the sender, i.e., the client, creating a client-side Socket, thus enabling bidirectional communication. Specifically, the server-side Socket is created on the Euler device (the receiver) using the soft bus socket tool, and the client-side Socket is created on the HarmonyOS device (the sender). It should be noted that in the Euler device (server) configuration, a ServerSocket is created to monitor a specified port and wait for client connections. In the HarmonyOS device (client) configuration, a ClientSocket is created to specify the server IP and port to initiate a connection. The Euler device and the HarmonyOS device can exchange data through the input and output streams of the Sockets.
[0020] For example, on the Euler device (i.e., the peer), launch the softbus_socket_tool (soft bus socket tool) via command line to create a server socket (T_CreateSocket, parameter: nameIndex=0, not client, socket ID returned by the tool) and enable monitoring (T_SocketListen, enable QoS configuration and multipath transmission, set multipath enhancement value to 3). On the HarmonyOS device (a device that supports WiFi / module / ETH, i.e., the local device), launch the softbus_socket_tool via HDC interface to create a client socket (T_CreateSocket, parameter: nameIndex=0, client mode, specify the peer device index, data type T_SocketSendBytes, peer nameIndex=0), and bind the socket (T_SocketBind, also enable QoS and multipath transmission, multipath enhancement value set to 3).
[0021] Step S12: Establish a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server socket and the client socket.
[0022] In this embodiment, after the Euler device (as the receiving end) and the HarmonyOS device (as the sending end) complete the creation and configuration of the corresponding Sockets, a multi-link data transmission channel can be established between the Euler device and the HarmonyOS device based on the server Socket and the client Socket. Specifically, the T_SocketConnect function is called to connect the server Socket and the client Socket to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device.
[0023] For example, on a HarmonyOS device, a connection request is initiated by calling T_SocketConnect to establish a multi-link data transmission channel with an Euler device.
[0024] Step S13: Control the HarmonyOS device to send a test data stream to the Euler device through the data transmission channel, and simulate a primary link failure during data transmission to trigger a multi-path transmission mechanism to automatically switch to the backup link.
[0025] In this embodiment, during the stress transmission test, the HarmonyOS device is controlled to send a test data stream to the Euler device through a data transmission channel. Specifically, the test data stream sent by the HarmonyOS device to the Euler device through the data transmission channel is configured according to preset test parameters; the preset test parameters include the target Socket ID, data type, sending interval, number of tests, and single packet size. Then, while the HarmonyOS device is continuously sending the test data stream, the primary link is disconnected, triggering a switchover of the backup link.
[0026] For example, a large-scale real-time transmission test is initiated on the HarmonyOS device (MassRTTTest is executed after T_SocketBind). The test parameters are set as follows: target Socket ID (i.e., the ID generated on the local end), data type (1), sending interval of 10ms, number of tests of 3000, and single packet size of 256 bytes, simulating a continuous high-speed data stream. Then, during the continuous transmission of the test data stream, the primary link (such as Ethernet) is actively disconnected, triggering the soft bus to automatically switch to the backup link (such as WiFi or a module). That is, during the data transmission process (before the 3000 test transmissions are completed), the local network cable is manually unplugged (simulating a primary link failure), triggering the multi-path transmission mechanism to automatically switch to the backup link.
[0027] It should be noted that after the primary link is disconnected, the backup path is immediately activated to resume data transmission, ensuring uninterrupted socket connections. The transmission strategy can be automatically adjusted, delaying the transmission of non-critical data based on QoS priorities to guarantee the delivery rate of core data packets. During the switchover process, MassRTTTest continuously records changes in latency and packet loss to verify the effectiveness of the multi-path redundancy mechanism. After the network cable is reconnected, the primary link recovers and traffic is gradually migrated, completing the redundancy test loop.
[0028] Step S14: Obtain network packets and system logs during data transmission, and parse the network packets and system logs to calculate the corresponding data packet loss rate and path switching time.
[0029] Understandably, during the continuous transmission of test data streams, the primary link is actively disconnected, triggering a multi-path transmission mechanism to automatically switch to the backup link. Simultaneously, network packets and system logs during data transmission are acquired, and these packets and logs are parsed to calculate the corresponding packet loss rate and link switching latency. Switching stability is then assessed using the packet loss rate and link switching latency. Specifically, a preset packet capture tool is used to acquire network packets during data transmission, and system logs are collected using a preset log collection method. The number of sent and received packets in the network packets is then used to calculate the corresponding packet loss rate. Corresponding link switching logs are then filtered from the system logs, and the link switching latency is calculated using these logs. Specifically, the timestamps corresponding to two consecutive link switching logs with different channelId values are determined, and the difference between these timestamps is calculated to obtain the link switching latency.
[0030] For example, for a HarmonyOS device acting as the sender, the link switching logs can be filtered using the keyword "ClientTransMpOnSend#channelId:". When two channelId values for the same socket are different (indicating a link switch), the difference between the timestamps corresponding to the two consecutive link switching logs with different channelId values is calculated, and this difference is used as the sender's switching time. Similarly, for an Euler device acting as the receiver, the link switching logs can be filtered using the keyword "ReportReceiveDataToTwinkle". When two channelId values for the same socket are different, the difference between the timestamps corresponding to the two consecutive link switching logs with different channelId values is calculated, and this difference is used as the sender's switching time.
[0031] It should be noted that the timestamps corresponding to two consecutive logs with different channelId values, i.e., the timestamps T1 and T2 of link disconnection and successful reconnection, yield a link switching latency of 87.6ms and a packet loss rate of 0.28% when calculated by the difference between T2 and T1, which meets the requirements for industrial-grade communication continuity. In other words, by parsing logs and packets, the difference between T2 and T1 is calculated to determine the link switching time. Combined with the data packet loss rate, switching stability is evaluated, and a test report including switching latency, success rate, and the impact of QoS parameters is finally generated. The technical solution of this invention follows the ISO / IEC 25010 standard's requirements for system reliability and responsiveness measurement. Combined with the multipath transmission mechanism of the HarmonyOS distributed soft bus, it ensures that the test process is reproducible and the results are quantifiable. Combined with QoS parameter analysis, setting the multipath enhancement value to 3 improves the efficiency of backup link activation response, verifying that the technical solution of this application has high-reliability switching capabilities in the HarmonyOS distributed soft bus environment.
[0032] Furthermore, by performing more than three independent tests under different network load scenarios and taking the average handover latency as the final indicator, the performance of the cross-device link handover between Euler and HarmonyOS can be effectively verified to meet the requirements of industrial applications. In a dual-link environment of Wi-Fi 6 and Gigabit Ethernet, the measured average handover latency is 87.6ms, with a packet loss rate of less than 0.3%, meeting the core requirements for communication continuity in industrial control scenarios. This demonstrates that Euler and HarmonyOS devices possess stable and efficient link disaster recovery capabilities in a distributed network environment, meeting the stringent requirements of low latency and high reliability communication in industrial control scenarios.
[0033] As can be seen, in this embodiment of the invention, the performance of multi-link switching across devices based on Euler and HarmonyOS is verified by combining standardized testing steps with automated log analysis. Specifically, by creating Sockets on both Euler and HarmonyOS devices to establish a data transmission channel between them, bidirectional communication between the Euler and HarmonyOS devices can be achieved. Then, test data streams are sent from the HarmonyOS device to the Euler device, and a primary link failure is simulated during data transmission to trigger automatic link switching. By parsing network packets and system logs during this process, the data packet loss rate and link switching time can be calculated. This enables a quantitative assessment of the reliability and performance of link switching on Euler and HarmonyOS cross-platform devices. Through standardized testing and log analysis, data support is provided for subsequent optimization of multi-path transmission parameters or troubleshooting of link switching problems, which can further improve the transmission stability of HarmonyOS and Euler cross-platform devices in complex network environments.
[0034] In one embodiment, such as Figure 2 As shown, based on the above-described link switching test method for cross-platform device transmission between Euler and HarmonyOS systems, the present invention also provides a link switching test apparatus for cross-platform device transmission between Euler and HarmonyOS systems, comprising: Socket creation module 11 is used to create a server-side Socket on the Euler device as the receiving end and a client-side Socket on the HarmonyOS device as the sending end. Channel establishment module 12 is used to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server socket and the client socket; Data transmission module 13 is used to control the HarmonyOS device to send test data streams to the Euler device through the data transmission channel; The link failure simulation module 14 is used to simulate a primary link failure during data transmission to trigger the multipath transmission mechanism to automatically switch to the backup link. Message and log acquisition module 15 is used to acquire network messages and system logs during data transmission; The message and log parsing module 16 is used to parse the network messages and the system logs to calculate the corresponding data packet loss rate and path switching time.
[0035] In some specific embodiments, the Socket creation module 11 may specifically include: The Socket creation unit is used to create a server-side Socket on the Euler device (which acts as the receiver) and a client-side Socket on the HarmonyOS device (which acts as the sender) using the soft bus socket tool.
[0036] In some specific embodiments, the channel establishment module 12 may specifically include: The Socket connection unit is used to call the T_SocketConnect function to connect the server Socket and the client Socket, so as to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device.
[0037] In some specific embodiments, the data sending module 13 may specifically include: The data sending unit is used to control the HarmonyOS device to send test data streams to the Euler device through the data transmission channel according to the preset test parameter configuration; the preset test parameter configuration includes target Socket ID, data type, sending interval, number of tests and single packet size.
[0038] In some specific embodiments, the message and log acquisition module 15 may specifically include: The message acquisition unit is used to acquire network messages during data transmission using a preset packet capture tool. The log acquisition unit is used to collect system logs using a preset log collection method.
[0039] In some specific embodiments, the message and log parsing module 16 may specifically include: The data packet loss rate calculation unit is used to calculate the corresponding data packet loss rate using the number of sent and received packets in the network packets; A log filtering unit is used to filter corresponding link switching logs from the system log; The link switching time calculation unit is used to calculate the link switching time using the link switching log.
[0040] In some specific embodiments, the link switching time calculation unit may specifically include: The timestamp determination subunit is used to determine the timestamps corresponding to two consecutive link switching logs with different channelId values; The difference calculation subunit is used to calculate the difference between the timestamps corresponding to two consecutive link switching logs to obtain the link switching time.
[0041] As can be seen, in this embodiment, by creating a Socket on the Euler device and the HarmonyOS device to establish a data transmission channel between them, bidirectional communication between the Euler device and the HarmonyOS device can be achieved. Then, the HarmonyOS device sends a test data stream to the Euler device, and during the data transmission process, a primary link failure is simulated to trigger automatic link switching. By parsing the network packets and system logs during this process, the data packet loss rate and link switching time can be calculated. This enables a quantitative assessment of the reliability and performance of link switching on Euler and HarmonyOS cross-platform devices. Through standardized testing and log analysis, data support is provided for subsequent optimization of multi-path transmission parameters or troubleshooting of link switching problems, which can further improve the transmission stability of HarmonyOS and Euler cross-platform devices in complex network environments.
[0042] Furthermore, it is worth noting that the working process of the link switching test device for cross-platform device transmission between Euler and HarmonyOS provided in this embodiment is the same as the working process of the link switching test method for cross-platform device transmission between Euler and HarmonyOS described above. Therefore, it will not be repeated here. For details, please refer to the working process of the link switching test method for cross-platform device transmission between Euler and HarmonyOS described above.
[0043] Figure 3 A schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may include: The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0044] When processor 502 executes the program, it implements the link switching test method for cross-platform device transmission between Euler and HarmonyOS provided in the above embodiments.
[0045] Furthermore, the terminal also includes: Communication interface 503 is used for communication between memory 501 and processor 502.
[0046] The memory 501 is used to store computer programs that can run on the processor 502.
[0047] Memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0048] If the memory 501, processor 502, and communication interface 503 are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus.
[0049] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0050] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0051] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the link switching test method described above for cross-platform device transmission between Euler and HarmonyOS systems.
[0052] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
[0053] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0054] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can read and execute instructions from and from an instruction execution system, apparatus or device).
[0055] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0056] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A link switching test method for cross-platform device transmission between Euler and HarmonyOS systems, characterized in that, The method includes: Create a server-side socket on the Euler device (which acts as the receiver) and a client-side socket on the HarmonyOS device (which acts as the sender). Based on the server socket and the client socket, a multi-link data transmission channel is established between the Euler device and the HarmonyOS device; The HarmonyOS device is controlled to send a test data stream to the Euler device through the data transmission channel, and a primary link failure is simulated during data transmission to trigger a multi-path transmission mechanism to automatically switch to the backup link. The network packets and system logs during the data transmission process are obtained, and the network packets and system logs are parsed to calculate the corresponding data packet loss rate and path switching time.
2. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to claim 1, characterized in that, The step of creating a server-side socket on the Euler device (as the receiving end) and a client-side socket on the HarmonyOS device (as the sending end) includes: The server socket is created on the Euler device (which acts as the receiver) and the client socket is created on the HarmonyOS device (which acts as the sender) using the soft bus socket tool.
3. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to claim 1, characterized in that, The step of establishing a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server-side Socket and the client-side Socket includes: The T_SocketConnect function is called to connect the server socket and the client socket to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device.
4. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to claim 1, characterized in that, The control of the HarmonyOS device to send test data streams to the Euler device through the data transmission channel includes: The test data stream is controlled by the HarmonyOS device to send to the Euler device through the data transmission channel according to the preset test parameter configuration; the preset test parameter configuration includes target Socket ID, data type, sending interval, number of tests and single packet size.
5. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to claim 1, characterized in that, The acquisition of network packets and system logs during data transmission includes: Use a preset packet capture tool to capture network packets during data transmission, and collect system logs using a preset log collection method.
6. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to any one of claims 1 to 5, characterized in that, The step of parsing the network packets and the system logs to calculate the corresponding packet loss rate and link switching time includes: Calculate the corresponding packet loss rate using the number of sent and received packets in the network packets; Filter the corresponding link switching logs from the system logs, and use the link switching logs to calculate the link switching time.
7. The link switching test method for cross-platform device transmission between Euler and HarmonyOS systems according to claim 6, characterized in that, The calculation of link handover time using the link handover log includes: Determine the timestamps corresponding to two consecutive link switching logs with different channelId values, and calculate the difference between the timestamps corresponding to the two consecutive link switching logs to obtain the link switching time.
8. A link switching test device for cross-platform device transmission between Euler and HarmonyOS systems, characterized in that, The device includes: The Socket creation module is used to create a server-side Socket on the Euler device (which acts as the receiver) and a client-side Socket on the HarmonyOS device (which acts as the sender). The channel establishment module is used to establish a multi-link data transmission channel between the Euler device and the HarmonyOS device based on the server socket and the client socket; The data transmission module is used to control the HarmonyOS device to send test data streams to the Euler device through the data transmission channel; The link failure simulation module is used to simulate a primary link failure during data transmission to trigger the multipath transmission mechanism to automatically switch to the backup link. The message and log acquisition module is used to acquire network messages and system logs during data transmission. The message and log parsing module is used to parse the network messages and the system logs to calculate the corresponding data packet loss rate and path switching time.
9. A terminal, characterized in that, include: The system includes a memory, a processor, and a link switching test program for cross-platform device transmission between Euler and HarmonyOS, which is stored in the memory and can run on the processor. When the link switching test program for cross-platform device transmission between Euler and HarmonyOS is executed by the processor, it implements the steps of the link switching test method for cross-platform device transmission between Euler and HarmonyOS as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed to implement the steps of the link switching test method for cross-platform device transmission between Euler and HarmonyOS as described in any one of claims 1 to 7.