A network transmission method, electronic equipment, readable storage medium and chip

CN123020336APending Publication Date: 2026-10-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611500185.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本申请提供一种网络传输方法、电子设备、可读存储介质及芯片,该方法能够解决现有技术中网络切换过程中存在的切换时延高,无法满足高实时性、高稳定性业务的传输需求的问题

Benefits of technology

[0035]可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020336A_ABST
    Figure CN123020336A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network transmission, and provides a network transmission method, electronic equipment, a readable storage medium and a chip, which can solve the problem that the high switching delay in the prior art cannot meet the transmission requirements of high real-time and high stability services. The method is applied to a first device, the first device and a second device have multiple network transmission channels, and the method comprises the following steps: a binding relationship between a logical channel for executing service logic and multiple transmission layer communication links is established, so that the multiple transmission layer communication links all have the function of executing service logic; and the multiple transmission layer communication links are established by the first device based on the multiple network transmission channels and the second device; and service logic between the multiple transmission layer communication links and the second device is executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network transmission technology, and in particular to a network transmission method, electronic device, readable storage medium, and chip. Background Technology

[0002] In high-precision, high-reliability business transmission fields such as industrial communication and equipment interconnection, to avoid problems such as service interruption and data transmission failure caused by single network link failure, the industry generally adopts an AB dual-network redundancy communication architecture to ensure uninterrupted business operation. In this architecture, network A and network B are independent of each other, each forming a ring, and the network channels are physically isolated and not interconnected, forming two completely independent communication transmission channels, providing redundant backup channels for data interaction and business transmission between devices.

[0003] In actual use, devices can establish a connection and perform business operations through the A network transmission channel. At the same time, detection threads for both the A and B networks are started. When the detection thread detects an anomaly in the A network, the devices re-establish a connection on the B network transmission channel and resume the original business operations. By switching from the A network to the B network, the business can continue uninterrupted in the event of a failure.

[0004] However, the existing handover method requires devices to re-establish a connection on the transmission channel of network B, that is, to re-execute operations such as handshake and connection negotiation based on the protocol. Only after the connection is established can the handover process from network A to network B and the use of network B be realized. This results in high latency in the entire network handover process, which cannot meet the transmission requirements of high real-time and high stability services. Summary of the Invention

[0005] This application provides a network transmission method, an electronic device, a readable storage medium, and a chip. This method can solve the problem of high switching latency in the network switching process in the prior art, which cannot meet the transmission requirements of high real-time and high stability services.

[0006] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, a network transmission method is provided, applied to a first device, wherein the first device and a second device have multiple network transmission channels. The method includes: establishing a binding relationship between a logical channel for executing business logic with the second device and multiple transport layer communication links, so that the multiple transport layer communication links all have the function of executing business logic, wherein the multiple transport layer communication links are established by the first device and the second device based on the multiple network transmission channels; and executing business logic between the first device and the second device according to the multiple transport layer communication links.

[0007] The network transmission method provided in this embodiment binds multiple network transmission channels between devices to the logical channels of the business logic to be executed, so that multiple network channels have the function of executing business logic between devices. These multiple transport layer communication links are established between devices based on multiple network transmission channels, thereby avoiding the need to temporarily establish logical channels when the currently used network is abnormal, and reducing network switching latency.

[0008] In this embodiment, the logical channel is bound to the business logic and is used to indicate the transmission data stream for executing the business logic. The first device executes the business logic with the second device based on multiple transport layer communication links and adopts the corresponding communication mode according to the logical channel. The communication mode is determined according to the business type corresponding to the business logic and the link status of multiple transport layer communication links. In the process of executing the business logic, the communication mode can change with the changes in the business type and the link status of multiple transport layer communication links, thereby adapting to different communication scenarios.

[0009] In some embodiments, executing service logic with a second device based on multiple transport layer communication links includes: determining a first service type corresponding to a first service logic to be executed with the second device; determining a first communication mode for executing the first service logic based on the first service type, the first communication mode including the usage status of multiple transport layer communication links and / or the detection status of the availability status of multiple transport layer communication links; and executing the first service logic using the first communication mode.

[0010] In this embodiment, the communication modes adopted by the different service types corresponding to the business logic, i.e., the usage and / or detection status of multiple transport layer communication links, also differ. In this embodiment, the communication mode used to execute the business logic can be determined based on the service type, thereby improving the efficiency of dual-network communication on demand and deciding the detection cycle of communication links on demand.

[0011] In some embodiments, the first service type includes any one of the following: data processing; device control; interface call.

[0012] In this embodiment, the first business type corresponding to the first business logic can also be other business types, such as file transfer, event alarm reporting, session management, etc. The above examples are only used as explanations of business types and are not intended to limit business types.

[0013] In some embodiments, when the first service type is device control or interface call, the first communication mode includes: executing service logic using at least two of the multiple transport layer communication links, and canceling the detection of the availability status of the at least two transport layer communication links among the multiple transport layer communication links.

[0014] In this embodiment, business logic based on operation types such as device control or interface calls has high requirements for the immediacy and reliability of data transmission. Therefore, a communication mode that uses at least two of the multiple transport layer communication links to execute business logic can improve the reliability and business continuity of the entire communication system.

[0015] In some embodiments, when the first service type is data processing, the first communication mode includes: executing a first service logic using a first transport layer communication link among multiple transport layer communication links, and during the idle period of executing the first service logic, sending a first probe signal within the first transport layer communication link using a first probe period, the first probe signal being used to detect the availability status of the first transport layer communication link; and sending a second probe signal within other transport layer communication links among multiple transport layer communication links other than the first transport layer communication link using a second probe period, the second probe signal being used to detect the availability status of the other transport layer communication links.

[0016] In some embodiments, the method further includes: when it is determined that the first transport layer communication link is abnormal, switching from the first transport layer communication link to a second transport layer communication link, wherein the second transport layer communication link is an available transport layer communication link among other transport layer communication links; and using the second transport layer communication link to continue executing the first service logic.

[0017] In this embodiment, for cases where the business type is data processing, the communication mode is set to use one of the multiple transport layer communication links to execute the business logic, and simultaneously initiate the detection process of multiple transport layer communication links. This allows for seamless switching to the normally operating transport layer communication link if the currently used transport layer communication link is abnormal, thus ensuring uninterrupted operation of the business logic in fault scenarios.

[0018] In some embodiments, the transmission time interval of the first detection signal is shorter than the transmission time interval of the second detection signal.

[0019] In this embodiment, the first transport layer communication link, which executes business logic, is configured with a higher probe signal transmission frequency (i.e., a lower transmission time interval). This allows for rapid detection of the operational status of the first transport layer communication link, shortens network fault detection time, facilitates timely triggering of network switching processes, and reduces service interruption latency. Other transport layer communication links employ larger transmission time intervals, which reduces the number of probe packets from backup transport layer communication links, saving network bandwidth resources and device CPU processing resources.

[0020] In some embodiments, the method further includes: determining a second service type corresponding to the second service logic to be executed between the second device and the second device, wherein the second service type is different from the first service type; determining a second communication mode for executing the second service logic based on the second service type, wherein the second communication mode includes the usage status of multiple transport layer communication links and the detection status of the availability status of multiple transport layer communication links; and executing the second service logic using the second communication mode.

[0021] In this embodiment, devices can execute different business logic based on the established logical channel, thereby avoiding the need for multiple establishments of the logical channel and improving communication efficiency.

[0022] In some embodiments, the method further includes: establishing a binding relationship between a logical channel for the third service logic to be executed between the second device and multiple transport layer communication links, so that the multiple transport layer communication links all have the function of executing the third service logic; and executing the third service logic between the second device according to the multiple transport layer communication links.

[0023] In this embodiment, devices can establish corresponding logical channels based on different business logics, thereby realizing isolated transmission of various business data, differentiated management and control, and fault decoupling. A single business failure will not interfere with the communication of other businesses, improving the overall reliability of communication and the flexibility of business scheduling.

[0024] In some embodiments, the method further includes: determining a third service type corresponding to the third service logic; determining a third communication mode for executing the third service logic based on the third service type, wherein the third communication mode includes the usage status of multiple transport layer communication links and the detection status of the availability status of multiple transport layer communication links; and executing the third service logic using the third communication mode.

[0025] In this embodiment, for different business logics corresponding to different business types, the communication mode used to execute the business logic can be redefined. It can flexibly select between transmission strategies such as communication link switching and dual / multiple redundancy as needed, so as to reduce the network resource overhead of non-critical business while ensuring the reliability of high-priority business communication, and achieve a fine balance between communication reliability and network bandwidth consumption.

[0026] In some embodiments, the multiple transport layer communication links are at least two of the following: TCP socket communication link, Bluetooth GATT communication link, StarSpark SSAP communication link, Wi-Fi communication link, etc.

[0027] Optionally, the transport layer communication link can also be other communication links, such as wired communication links, and this embodiment does not limit this.

[0028] In some embodiments, the multiple transport layer communication links are two transport layer communication links, and both the first device and the second device are electronic devices in the ship network.

[0029] Optionally, the network transmission method provided in this embodiment can be applied to any type of device with dual or multiple network transmission channels, such as coal mine equipment networks, chemical equipment networks, or oil and gas equipment.

[0030] In a second aspect, a network transmission device is provided, applied to a first device, wherein the first device and a second device have multiple network transmission channels. The device includes: a logical channel binding module, used to establish a binding relationship between a logical channel for executing business logic with the second device and multiple transport layer communication links, so that the multiple transport layer communication links all have the function of executing business logic, wherein the multiple transport layer communication links are established by the first device and the second device based on multiple network transmission channels; and a business logic execution module, used to execute business logic with the second device according to the multiple transport layer communication links.

[0031] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method shown in the first aspect.

[0032] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the method shown in the first aspect.

[0033] Fifthly, a chip is provided, the chip including a processor and a memory, the memory storing a computer program, which, when executed by the processor, implements the method shown in the first aspect.

[0034] In a sixth aspect, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor / electronic device, implement the method shown in the first aspect.

[0035] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0036] Figure 1 A schematic diagram of the network structure of a ship network subsystem provided in an embodiment of this application; Figure 2A A schematic diagram of the architecture of the communication system to which the network transmission method provided in the embodiments of this application is applicable; Figure 2BA schematic diagram of the electronic device structure to which the network transmission method provided in the embodiments of this application is applicable; Figure 3 A schematic flowchart illustrating a network transmission method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a requesting device and a responding device provided in an embodiment of this application; Figure 5 A schematic flowchart illustrating a network transmission method provided in an embodiment of this application; Figure 6 A schematic diagram of the service transmission process provided in an embodiment of this application, showing a primary / backup dual-network single transmission or a peer-to-peer dual-network single transmission; Figure 7 This is a schematic diagram of a dual-network redundant dual-transmission service transmission process provided in an embodiment of this application; Figure 8 A schematic diagram illustrating the message field structure of a service request, service response, and probe packet provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of the network transmission device provided in the embodiments of this application; Figure 10 This is a schematic diagram of the chip structure provided in an embodiment of this application. Detailed Implementation

[0037] The technical solutions provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0038] It should be understood that in the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.

[0039] In this embodiment, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0040] In high-precision, high-reliability business transmission fields such as industrial communication and equipment interconnection, to avoid problems such as service interruption and data transmission failure caused by single network link failure, the industry generally adopts an AB dual-network redundant communication architecture to ensure uninterrupted service operation. In this architecture, network A and network B are independent of each other, each forming a ring, and the network channels are physically isolated and not interconnected, forming two completely independent communication transmission channels, providing redundant backup channels for data interaction and business transmission between devices.

[0041] For example, taking devices in a ship network developed based on the HarmonyOS system as an example, the ship network security guidelines require that the core subsystems of devices in the ship network support A / B network redundancy. The A and B networks are each a ring, mutually isolated, and all devices must simultaneously access both networks. See [link / reference] Figure 1 As shown in the figure, an embodiment of this application provides a network structure diagram of a ship network subsystem. The subsystem includes a HarmonyOS industrial control computer, a HarmonyOS smart instrument, a HarmonyOS controller (steering gear), and a HarmonyOS programmable logic controller (PLC) (frequency converter), etc. Each device in the subsystem is deployed on both network A and network B (solid lines in the figure represent network A, and dashed lines represent network B). When one network experiences a network outage or failure, the service can switch to the other network to continue working, ensuring uninterrupted communication.

[0042] Currently, for devices using an AB dual-network redundant communication architecture (such as device 1 and device 2), the communication switching logic is as follows: Device 1 and device 2 first establish a communication connection via network A by default. This involves handshaking, link establishment negotiation, and other interactions on network A to establish a transport layer communication link (referred to as the communication link) on network A, allowing device 1 and device 2 to perform corresponding business operations via network A. In this case, network A carries all business data transmission and interaction, while network B is in standby mode. Simultaneously, device 1 and device 2 initiate network probing threads between networks A and B to continuously monitor the link status and communication quality of both networks in real time. Then, when the network probing thread detects a link interruption, signal anomaly, or packet loss in network A, it determines that network A communication has failed and triggers the network switching mechanism to terminate the network A communication connection. A new communication link is then established between the devices via network B, i.e., a transport layer communication link is established to continue the original business operations, thus ensuring uninterrupted business operation in fault scenarios.

[0043] However, during the aforementioned network handover process, when network A experiences a network anomaly and needs to switch to network B, the devices need to re-establish a communication connection through network B. This involves re-performing handshakes and connection negotiation to restore communication between the two parties at the transport layer (such as sending messages to execute business logic) on network B. Only then can network B resume the original business operations after the handover from network A to network B. This entire process results in high latency during network handover. High handover latency can lead to problems such as brief interruptions in business transmission, data lag, and message loss, failing to meet the transmission requirements of high real-time and high-stability services. This limits the application effectiveness of the dual-network redundancy architecture in scenarios with high precision and low latency requirements.

[0044] To address this, this application provides a network transmission method. This method establishes corresponding transport layer communication links on multiple network transmission channels between devices, and then binds the multiple network transmission channels between devices to the logical channels of the business logic to be executed. This enables multiple network channels to perform the business logic between devices, thereby avoiding the need to temporarily establish logical channels when the currently used network is abnormal, and reducing network switching latency.

[0045] Before introducing the network transmission method provided in the embodiments of this application, the communication system to which the network transmission method provided in this embodiment is applicable will be introduced first.

[0046] Figure 2A A schematic diagram of the architecture of the communication system to which the network transmission method provided in the embodiments of this application is applicable. See also Figure 2A As shown, the communication system includes a first electronic device (hereinafter referred to as the first device) and a second electronic device (hereinafter referred to as the second device). The first device and the second device support communication using wireless communication technology. For example, the wireless communication technology may include, but is not limited to, Bluetooth (e.g., Bluetooth Classic (BT) and Bluetooth Low Energy (BLE)), SparkLink (e.g., SparkLink-Basic (SLB) and SparkLink-Low Energy (SLE)), and Wi-Fi network connection. The first device and the second device also support socket communication technology. Sockets support various protocols, such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

[0047] In some embodiments, the first device and the second device support wired communication technology.

[0048] In this embodiment, the various communication technologies supported by the first device and the second device can be compared to the AB network described in the above embodiment. For example, network A can be a Bluetooth network transmission channel and network B can be a StarNet transmission channel, or network A can be a Bluetooth network transmission channel and network B can be a TCP socket network transmission channel, or network A can be a StarNet transmission channel and network B can be a TCP socket network transmission channel.

[0049] Depending on the type of wireless communication technology supported by the devices, the transport layer communication links that can be established between them also differ. For example, the first and second devices can establish a Bluetooth generic attribute profile (GATT) communication link based on Bluetooth communication technology, a SparkLink service access protocol (SSAP) communication link based on Spark communication technology, or a TCP socket communication link based on the TCP communication protocol. This allows the first and second devices to transmit data through multiple transport layer communication links.

[0050] After the transport layer communication links between the first device and the second device are established, if it is necessary to use these multiple transport layer communication links to execute business logic between the first device and the second device, it is necessary to bind the logical channel corresponding to the business logic to each of the transport layer communication links. That is, to establish a binding relationship between the logical channel corresponding to the business logic and each of the transport layer communication links. This allows the first device and the second device to directly invoke all of the multiple transport layer communication links when executing business logic. Whether using one of the transport layer communication links by default or using at least two of the multiple transport layer communication links simultaneously, it is not necessary to re-perform handshake, link establishment negotiation, and other operations on the network transmission channel to be used during specific use. The process of binding the logical channel corresponding to the business logic to each of the transport layer communication links will be described in detail in the following embodiments, and will not be repeated in this section.

[0051] Optionally, the first device and the second device can be fixed devices or portable devices. The first device and the second device can be the same type of device, such as industrial computer 1 and industrial computer 2; or, the first device and the second device can be different types of devices, such as an industrial computer and an instrument. This application does not limit the implementation form of the first device and the second device. For example, both the first device and the second device can be electronic devices, or both the first device and the second device can be chips within an electronic device, or the first device can be an electronic device and the second device can be a chip within an electronic device.

[0052] In this embodiment, the first device and the second device may include, but are not limited to, mobile phones, tablets, desktop computers, laptops, handheld computers, wireless hubs / routers, ultra-mobile personal computers (UMPCs), netbooks, as well as personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices, and other electronic devices.

[0053] Optionally, both the first and second devices can be electronic devices in the ship's network. For example, the first device is an industrial control computer, and the second device is a controller or a smart instrument.

[0054] Optionally, the operating system installed on the first or second device may include, but is not limited to, iOS. ® Android ® HarmonyOS ® Windows ® Linux ® Or other operating systems.

[0055] Figure 2B This is a schematic diagram of an electronic device structure to which the network transmission method provided in this application embodiment applies. Exemplarily, the electronic device may include one or more processors 201, a communication bus 202, a memory 203, and one or more communication interfaces 204.

[0056] Processor 201 can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solutions of this application, such as application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0057] The communication bus 202 is used to transmit information between the aforementioned components. The communication bus 202 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0058] The memory 203 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile optical disc, a Blu-ray disc, etc.), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto. The memory 203 may exist independently and be connected to the processor 201 via the communication bus 202. The memory 203 may also be integrated with the processor 201.

[0059] Communication interface 204 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 204 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0060] In some embodiments, multiple processors may be included, such as Figure 3 The processors 201 and 205 are shown. Each of these processors may be a single-core processor or a multi-core processor. Here, "processor" may refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0061] In a specific implementation, as one embodiment, it may also include an output device 206 and an input device 207. The output device 206 communicates with the processor 201 and can display information in various ways. For example, the output device 206 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device 207 communicates with the processor 201 and can receive user input in various ways. For example, the input device 207 may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0062] In some embodiments, memory 203 is used to store program code 208 that executes the scheme of this application, and processor 201 can execute the program code 208 stored in memory 203. The program code may include one or more software modules, which can implement the network transmission method provided in the embodiments below through processor 201 and program code 208 in memory 203.

[0063] Figure 3 This is a schematic flowchart illustrating a network transmission method provided in an embodiment of this application. The method is applied to a first device, which has multiple network transmission channels with a second device, such as... Figure 3 As shown, the method includes the following steps S301~S302.

[0064] S301, the first device establishes a binding relationship between the logical channel for executing business logic with the second device and multiple transport layer communication links, so that multiple transport layer communication links all have the function of executing business logic. The multiple transport layer communication links are established by the first device with the second device based on multiple network transmission channels.

[0065] In this embodiment, the network transmission channel is a transmission path reachable at the network layer, which is the path that carries the transmission of underlying IP packets; the transport layer communication link is a service layer (such as Socket / TCP) transmission connection, which is established on the network transmission channel. One or more transport layer communication links can be further established on a network transmission channel.

[0066] In some embodiments, a Bluetooth GATT communication link based on Bluetooth communication technology, a StarSpark SSAP communication link based on StarSpark communication technology, or a TCP socket communication link based on the TCP communication protocol can be established between the first device and the second device.

[0067] The multiple transport layer communication links between the first device and the second device can be previously established Bluetooth GATT communication links, StarFlash SSAP communication links, or TCP socket communication links, etc. In this embodiment, the first device binds the logical channel for executing business logic with the second device to the multiple established transport layer communication links. This establishes a binding relationship between the logical channel for executing business logic with the second device and the multiple transport layer communication links, enabling all multiple transport layer communication links to perform business logic. This allows the first device to switch to other communication links among the multiple transport layer communication links if a currently used communication link malfunctions while executing business logic based on these multiple transport layer communication links. The switching process does not require re-execution of handshakes and link establishment negotiations, avoiding the need to temporarily establish transport layer communication links after network anomalies and reducing network switching latency.

[0068] S302, the first device executes the business logic with the second device based on multiple transport layer communication links.

[0069] The logical channel for executing business logic between the first and second devices is bound to multiple transport layer communication links established between them. Therefore, the first device can use one or more transport layer communication links to execute business logic with the second device. In the actual execution of business logic, the usage of the transport layer communication links can be determined based on the business type corresponding to the business logic.

[0070] In some embodiments, the business types corresponding to the business logic include data processing, device control, and interface calls. For example, data acquisition can be the first device collecting data from the second device, reading and writing data, and / or pushing data (such as subscription and publish); device control can be the first device controlling the second device to perform corresponding control operations; and interface calls can be the first device calling the data interface business function of the second device (such as method calls).

[0071] For example, control operations can be initiated by a first device issuing commands to a second device to perform hardware / functional actions, thereby adjusting or changing the device's operating state and outputting control behavior. For instance, a HarmonyOS industrial PC might issue control commands to a HarmonyOS controller to rotate a servo motor to a specified angle; a HarmonyOS industrial PC might issue commands to a HarmonyOS PLC to control a frequency converter to adjust the motor's output speed; and a HarmonyOS controller might issue commands to a camera to enable video capture and start recording.

[0072] Data reading and writing can involve the first device reading parameters, status variables, and register data stored internally by the second device, or writing configuration parameters, without triggering complex actions, focusing on accessing data objects. For example, the HarmonyOS industrial PC can read real-time pressure and temperature measurement data from a HarmonyOS smart instrument, or read the fault status register value inside the controller, or read the current configuration parameters of a HarmonyOS PLC; the HarmonyOS industrial PC can write protection threshold parameters to a HarmonyOS PLC, write sampling period configuration to a smart instrument, or write working mode parameters to a HarmonyOS controller, etc.

[0073] Method calls can be a type of interaction where the first device calls a pre-encapsulated business function / interface method of the second device, passing in input parameters and waiting for the second device to execute and return the execution result. This falls under the category of device-to-device communication. For example, a HarmonyOS industrial PC might call the HarmonyOS controller's system self-test method, passing in self-test mode parameters, causing the controller to perform a full-machine self-test and return a self-test report. Alternatively, the HarmonyOS industrial PC might call the instrument's calibration coefficient method, performing instrument calibration calculations and returning a calibration success / failure result. Or, the HarmonyOS industrial PC might call the HarmonyOS PLC's fault reset method, passing in a fault number, performing fault clearing, and returning a reset execution status.

[0074] Publish-subscribe allows a subscriber (first device) to pre-subscribe to a certain type of event / data from a subscriber (second device). When the internal state of the subscriber changes, it proactively reports the event / data without requiring the subscriber to repeatedly poll and read it. For example, a HarmonyOS industrial PC subscribes to servo motor position events from a HarmonyOS controller. When the servo motor position changes, the HarmonyOS controller proactively reports the latest position data without the industrial PC repeatedly sending read commands. Upper-level devices subscribe to smart instrument alarm events. When the instrument detects an over-temperature fault, it proactively publishes an alarm notification message to the subscriber. A HarmonyOS industrial PC subscribes to the operating status of a HarmonyOS PLC inverter. When the inverter experiences overload or shutdown events, it proactively pushes event messages.

[0075] It should be noted that, in this embodiment, the business type corresponding to the business logic can also be other business types, such as file transfer, event alarm reporting, session management, etc. The above examples are only used as explanations of business types and are not intended to limit business types.

[0076] Different business types correspond to different business logics, and therefore require different communication modes, including the usage and / or detection of multiple transport layer communication links. In this embodiment, the communication mode used to execute the business logic can be determined based on the business type.

[0077] In some embodiments, when the service type is a control operation or a method call, the communication mode includes: executing service logic using at least two of the multiple transport layer communication links, and canceling the detection of the availability status of the at least two of the multiple transport layer communication links.

[0078] For example, taking multiple transport layer communication links between the first and second devices as dual transport layer communication links, such as transport layer A and transport layer B, when the service type is a control operation or method call, the first device uses a dual-network redundant dual-transmission communication mode to execute the business logic corresponding to this service type. That is, it uses both transport layer A and transport layer B to send the same message, such as a data packet or service request, to the second device. Since control operations or method calls are business logics with high requirements for immediacy or reliability, using a dual-network redundant dual-transmission communication mode can improve the reliability and service continuity of the entire industrial control communication system.

[0079] In some embodiments, when the service type is data read / write or subscription / publish, the communication mode includes: executing a first service logic using a first transport layer communication link among multiple transport layer communication links, and during the idle period of executing the first service logic, sending a first probe signal within the first transport layer communication link using a first probe period, the first probe signal being used to detect the availability status of the first transport layer communication link; and sending a second probe signal within other transport layer communication links among multiple transport layer communication links other than the first transport layer communication link using a second probe period, the second probe signal being used to detect the availability status of the other transport layer communication links.

[0080] For example, taking a first device and a second device as having an A transport layer communication link and a B transport layer communication link, the first device uses a dual-network single-transmission communication mode to execute the business logic corresponding to this service type. For instance, it sends a message to the second device using the A transport layer communication link, and during the idle period of sending the message to the second device, it sends a probe signal 1 on the A transport layer communication link using probe period 1 to detect the availability of the A transport layer communication link; simultaneously, it sends a probe signal 2 on the B transport layer communication link using probe period 2 to detect the availability of the B transport layer communication link. It can be seen that in this communication mode, the first device and the second device only use the A transport layer communication link to execute the business logic, and during the execution of the business logic, they probe the A and B transport layer communication links.

[0081] In this embodiment, if an anomaly is determined to have occurred in the first transport layer communication link based on the first detection signal, the first transport layer communication link is switched to the second transport layer communication link, which is an available transport layer communication link among other transport layer communication links; then, the devices use the second transport layer communication link to continue executing business logic.

[0082] In other words, based on the above example, if an anomaly is detected in the A transport layer communication link, the system switches to the B transport layer communication link and continues to execute the original business logic, thereby ensuring uninterrupted business operation in fault scenarios.

[0083] Optionally, the transmission interval of the first probe signal is shorter than the transmission interval of the second probe signal. For example, the transmission interval of the second probe signal is twice the transmission interval of the first probe signal. For instance, if the transmission interval of the first probe signal is 1 second, then the transmission interval of the second probe signal is 2 seconds. In this example, setting a higher probe transmission frequency (i.e., a lower transmission interval) for the primary transport layer communication link, which executes business logic, allows for faster detection of the primary transport layer communication link's operational status, shortens network fault detection time, facilitates timely triggering of network switching processes, and reduces service interruption latency. Other transport layer communication links are backup transport layer communication links. Using a larger transmission interval reduces the number of probe packets on the backup transport layer communication links, saving network bandwidth resources and device CPU processing resources. It also reduces the probability of misjudging the backup network status due to instantaneous network jitter, balancing fault detection real-time performance with system resource overhead.

[0084] In this embodiment, devices can execute different business logics based on the same established logical channel. For example, the first device and the second device can execute the first business logic based on a logical channel bound to multiple transport layer communication links, or they can execute the second business logic based on the same logical channel. The second business logic is different from the first business logic. In specific implementation, the service message types carried in the service requests transmitted between devices are different for different business logics.

[0085] Optionally, devices can also establish corresponding logical channels based on different business logics. For example, a first logical channel can be established between devices based on a first business logic, and this first logical channel will be released / disconnected after the first business logic is executed; a second logical channel can be established between devices based on a second business logic, and this second logical channel will be released after the second business logic is executed. In other words, after the logical channels are established, devices can execute multiple business logics based on a single established logical channel; alternatively, logical channels can be established for each specific business logic.

[0086] In some embodiments, the first device establishes a binding relationship between a logical channel for executing business logic with the second device and multiple transport layer communication links between them. Based on this logical channel, the devices can execute either first business logic or second business logic. Different business logics have different business types, and different business types may correspond to different communication modes. For example, the first business logic corresponds to a first business type and a first communication mode, and the second business logic corresponds to a second business type and a second communication mode. That is, in this embodiment, both the first and second business logics are executed based on the previously established logical channel.

[0087] In other embodiments, the first device establishes a binding relationship between a logical channel for executing the third service logic with the second device and multiple transport layer communication links, so that all of the multiple transport layer communication links have the function of executing the third service logic; then, the third service logic between the first device and the second device is executed according to the multiple transport layer communication links. Next, the first device determines the third service type corresponding to the third service logic, and determines the third communication mode adopted for executing the third service logic according to the third service type. The third communication mode includes the usage status of the multiple transport layer communication links and the detection status of the availability status of the multiple transport layer communication links. That is, in this embodiment, the logical channel between the devices is re-established based on the third service logic, and this logical channel is only used to execute the third service logic. After the third service logic is executed, the logical channel can be immediately released.

[0088] It should be noted that in the network transmission method provided in this embodiment, the first device executes business logic with the second device based on multiple established transport layer communication links and the logical channels bound to these links, using corresponding communication modes. The communication mode used between the devices is determined based on the service type corresponding to the business logic to be executed and the link states of the multiple transport layer communication links. Furthermore, during the execution of the business logic, the communication mode can change with variations in the service type and the link states of the multiple transport layer communication links. For example, one communication mode is used when the first service type and the first link state of the multiple transport layer communication links are in use, and another communication mode is used when the second service type and the second link state of the multiple transport layer communication links are in use. In other words, the same business logic may include multiple different service types, and the link states of the multiple transport layer communication links may also change. Therefore, if the service type and the link states of the multiple transport layer communication links change during the execution of the business logic, the communication mode used between the devices will also change accordingly. This allows the communication method to adapt to different communication scenarios during the execution of the entire business logic, further improving the user's communication experience.

[0089] The network transmission method provided in this embodiment binds multiple established transport layer communication links to the same logical channel, enabling each transport layer communication link to perform business logic. When devices execute business logic based on multiple transport layer communication links, it is not necessary to re-establish communication links through the network transmission channel to be used. Compared to the prior art, which requires re-performing handshakes and link establishment negotiations before using transport layer communication links, this embodiment pre-establishes multiple transport layer communication links corresponding to multiple network transmission channels between devices, and then abstracts multiple different transport layer communication links into a logical channel for executing business logic. This avoids problems such as temporarily establishing communication connections after network anomalies, which increases network switching latency.

[0090] The following will use the first device as the requesting device (hereinafter referred to as the requesting end) and the second device as the responding device (hereinafter referred to as the responding end), both of which support the Harmony IoT Transfer Protocol (HITP), as an example to illustrate the process of the network transmission method provided in this embodiment.

[0091] Figure 4 A schematic diagram of the structure of a requesting device and a response device according to an embodiment of this application is shown. As shown in the figure, both the requesting device and the response device include an application, a HITP protocol stack, and network interfaces. The requesting device includes network interface 1 and network interface 2, and the response device includes network interface 3 and network interface 4. The network interface of the requesting device can be Bluetooth, Starlink, or a socket communication interface, etc., and correspondingly, the network interface of the response device can also be Bluetooth, Starlink, or a socket communication interface, etc. The following uses [the following description]... Figure 4 Taking the requesting and responding devices shown in the diagram as examples, this embodiment introduces the network transmission method provided.

[0092] Figure 5 A schematic flowchart of a network transmission method provided in an embodiment of this application is shown, such as... Figure 5 As shown, the process includes the following steps S501 to S506.

[0093] S501, the requesting device and the responding device establish a dual transport layer communication link.

[0094] In this embodiment, combined with Figure 4 As shown, the requesting device is configured with network interface 1 and network interface 2, with network interface 1 corresponding to address 1 and network interface 2 corresponding to address 2; the responding device is configured with network interface 3 and network interface 4, with network interface 3 corresponding to address 3 and network interface 4 corresponding to address 4.

[0095] The requesting device and the responding device establish a dual transport layer communication link, such as a transport layer communication link between network interface 1 and network interface 3, and a transport layer communication link between network interface 2 and network interface 4. For example, network interface 1 can be the Bluetooth communication interface of the requesting device, network interface 3 can be the Bluetooth communication interface of the responding device, network interface 2 can be the StarScan communication interface of the requesting device, and network interface 4 can be the StarScan communication interface of the responding device.

[0096] When establishing a transport layer communication link between network interface 1 and network interface 3, the application in the responding device selects network interface 1 as the message sending network interface, calls the HITP protocol stack interface with address 1 as the source address, and sends a communication link establishment request to address 3 of the responding device; the responding device calls the HITP protocol stack interface and returns a communication link establishment response through network interface 3, thereby establishing a transport layer communication link between network interface 1 and network interface 3. Data packets of this transport layer communication link are sent and received through network interface 1 and network interface 3.

[0097] When establishing a transport layer communication link between network interface 2 and network interface 4, the application in the responding device selects network interface 2 as the message sending network interface, calls the HITP protocol stack interface with address 2 as the source address, and sends a communication link establishment request to address 4 of the responding device; the responding device calls the HITP protocol stack interface and returns a communication link establishment response through network interface 4, thereby establishing a transport layer communication link between network interface 2 and network interface 4. Data packets of this transport layer communication link are sent and received through network interface 2 and network interface 4.

[0098] For ease of description, the following embodiments will use a first transport layer communication link and a second transport layer communication link to represent the dual transport layer communication link established between the requesting device and the responding device.

[0099] S502, the requesting device simultaneously sends a first request message to the responding device based on the established dual transport layer communication link, in order to request the establishment of a logical channel with the responding device.

[0100] The first request message can be constructed by an application in the requesting device within the HITP protocol stack. In this embodiment, the requesting device simultaneously sends the same first request message to the responding device on both the first and second transport layer communication links.

[0101] In some embodiments, taking the logical channel to be established between the requesting device and the responding device as a logical channel x→y (where x is the source logical channel identifier of the requesting device, y is the logical channel identifier assigned by the responding device, and x and y form a paired channel identifier pair used to uniquely identify a business logical session between the two devices) as an example, the first request message may include the source device logical channel identity (srcChId) x, i.e., srcChId=x, the destination device logical channel identity (dstChId) 0, i.e., dstChId=0, the source device identity (srcDevId), such as the unique device identifier (UDID) 1 or network address 1 of the first device, the quality of service (QoS) level of the logical channel, and other information.

[0102] The QoS level of a logical channel can be a priority / service level assigned by the network protocol stack to different service data flows, used to indicate the quality of service of the logical channel established between the requesting and responding devices. For example, this QoS level can be high reliability or low occupancy, specifically determined by the type of business logic executed through the logical channel. For instance, when the business type is data read / write, the logical channel level is low occupancy; when the business type is method call, the logical channel level is high reliability; and when the business type is publish / subscribe, the logical channel level is low occupancy.

[0103] S503, the responding device sends a first response message to the requesting device through the first transport layer communication link to indicate that the logical channel has been successfully established on the first transport layer communication link.

[0104] The first transport layer communication link is the communication link corresponding to the first request message received by the responding device.

[0105] For example, the requesting device simultaneously sends a first request message to the responding device based on the established first transport layer communication link and the second transport layer communication link. If the responding device receives the first request message first based on the first transport layer communication link, then the responding device sends a first response message to the requesting device based on the first transport layer communication link. Conversely, if the responding device receives the first request message first based on the second transport layer communication link, then the responding device sends a first response message to the requesting device based on the second transport layer communication link.

[0106] The first response message sent by the responding device to the requesting device may include srcChId=x, dstChId=y, the destination device identity (dstDevIdentity) (such as UDID2 or network address 3 of the second device), and the logical channel establishment status (status = successful). Upon receiving the first response message, the requesting device binds the first transport layer communication link to the x→y logical channel based on this message. Simultaneously, the responding device also binds its first transport layer communication link to the x→y logical channel.

[0107] It is understood that in the aforementioned step S502, the requesting device simultaneously sends a first request message to the responding device based on the established dual transport layer communication link. Therefore, the responding device can receive the first request message through both the first and second transport layer communication links, except that the first transport layer communication link is the one that received the first request message first. In this case, when the responding device receives the same first request message again through the second transport layer communication link, it replies to the requesting device through the second transport layer communication link with a second response message indicating that the logical channel has been established. This second response message includes srcChId=x, dstChId=y, dstDevIdentity (such as the UDID2 or network address 3 of the second device), and the logical channel establishment status (status) = logical channel has been created.

[0108] S504, the requesting device resends a second request message to the responding device through the second transport layer communication link to request the establishment of a logical channel with the responding device.

[0109] The second request message can also be constructed by an application in the requesting device within the HITP protocol stack. Based on the logical channel already established on the first transport layer communication link in the preceding steps, this step continues to establish a logical channel on the second transport layer communication link.

[0110] Similarly, taking the logical channel to be established between the requesting device and the responding device as a logical channel x→y as an example, the second request message may include information such as srcChId=x, dstChId=y, srcDevIdentity=UDID1 or network address2 of the first device, QoS level, etc.

[0111] S505, the responding device sends a third response message to the requesting device through the second transport layer communication link to indicate that the logical channel has been successfully established on the second transport layer communication link.

[0112] The third response message sent by the responding device to the requesting device may include srcChId=x, dstChId=y, dstDevIdentity=UDID2 or network address of the second device, and the establishment status of the logical channel (status)=the dual transmission of the logical channel has been successfully established.

[0113] In this way, both the requesting and responding devices bind the second transport layer communication link to the x→y logical channel, completing the establishment of dual transmission. When executing business logic later, if one transport layer communication link fails, the system can directly switch to the other, ensuring uninterrupted execution of the business logic; alternatively, the business logic can be executed using a redundant dual-transmission mode with dual communication links.

[0114] S506, the requesting device executes the business logic between itself and the responding device based on the dual transport layer communication link.

[0115] In some embodiments, the requesting device first determines the service type corresponding to the service logic to be executed, then determines the communication mode to be used to execute the service logic based on the service type. The communication mode includes the usage status of the dual transport layer communication link and / or the detection status of the availability status of the dual transport layer communication link, and finally executes the corresponding service logic based on the determined communication mode.

[0116] In one implementation of this embodiment, the HITP protocol stack in the requesting device determines the primary transport layer communication link, the backup transport layer communication link, and the communication strategy based on the scoring results of the logical channel QoS level (high reliability, low occupancy), the establishment order of the transport layer communication links, and the type of transport layer communication links (such as TCP socket communication links, Bluetooth GATT communication links, and StarSpark SSAP communication links). The scoring results are related to the stability of the transport layer communication links; higher stability results in a higher score. For example, the result of the requesting device determining the primary and backup transport layer communication links and deciding on the dual-path transmission strategy using the above method can be: when the logical channel QoS level is low occupancy and the scores of the two transport layer communication links differ significantly, a primary / backup dual-network single-transmission transmission strategy is adopted; when the logical channel QoS level is low occupancy and the scores of the two transport layer communication links are comparable, a peer-to-peer dual-network single-transmission transmission strategy is adopted; and when the logical channel QoS level is high reliability and the scores of the two transport layer communication links are comparable, a dual-network dual-transmission transmission strategy is adopted.

[0117] In the primary and backup dual-network single-transmission transmission strategy, the transmission layer communication link with the higher score is the primary transmission layer communication link. In this mode, only the primary transmission layer communication link sends and receives service messages. Only when the primary transmission layer communication link is abnormal will it switch to the backup transmission layer communication link.

[0118] In the peer-to-peer dual-network single-transmission strategy: the first established transmission layer communication link is the primary transmission layer communication link, and the later established transmission layer communication link is the backup transmission layer communication link. In this mode, only the primary transmission layer communication link sends and receives service messages, and only switches to the backup transmission layer communication link when the primary transmission layer communication link is abnormal.

[0119] In some embodiments, the service transmission process of primary / standby dual-network single transmission or peer-to-peer dual-network single transmission can be found in [reference]. Figure 6 As shown, in a primary / backup dual-network single-transmission or peer-to-peer dual-network single-transmission transmission strategy, the requesting device uses the primary transport layer communication link to execute business logic with the responding device. During the idle period of executing this business logic, it sends a type=11B probe signal 1 within the primary transport layer communication link using a probe period T1. This probe signal 1 is used to detect the availability status of the primary transport layer communication link. Simultaneously, it sends a type=11B probe signal 2 within the backup transport layer communication link using a probe period T2. This probe signal 2 is used to detect the availability status of the backup transport layer communication link. The transmission time interval of probe signal 1 is less than the transmission time interval of probe signal 2; optionally, the transmission time interval of probe signal 2 is twice the transmission time interval of probe signal 1.

[0120] Optionally, if the main transport layer communication link is found to be abnormal based on the detection signal 1, the main transport layer communication link is switched to the backup transport layer communication link, and the requesting end device and the responding end device continue to execute the aforementioned business logic using the backup transport layer communication link.

[0121] In the dual-network redundant dual-transmission strategy: the first established transport layer communication link is the primary transport layer communication link, and the second established transport layer communication link is the backup transport layer communication link. In this mode, the two transport layer communication links send the same service messages simultaneously.

[0122] In some embodiments, the dual-network redundant dual-transmission service transmission process can be found in [reference needed]. Figure 7 As shown, in the dual-network redundant dual-transmission strategy, the requesting device uses the primary and backup dual-transmission layer communication links to execute the business logic with the responding device, and cancels the detection of the availability status of the primary and backup dual-transmission layer communication links.

[0123] It should be noted that, correspondingly, the HITP protocol stack in the responding device will also determine the primary transport layer communication link, the backup transport layer communication link, and the communication strategy in the same way. Furthermore, the responding device and the requesting device use the same standards for this determination, ensuring that both ends have a unified understanding of message sending, link selection, dual-transmission / primary / backup switching, and fault handling rules. This avoids communication anomalies such as data packet loss, duplicate message processing, and inconsistent link decisions caused by misaligned strategies between the sender and receiver.

[0124] During the execution of business logic using a dual-transmission-layer communication link, the requesting device sends a service request to the responding device, and the responding device returns a service response to the requesting device. If it is necessary to probe the availability of the communication link during this process, both the requesting and responding devices need to send probe signals between them. The following is a brief explanation of the message fields for service requests, service responses, and probe signals.

[0125] See Figure 8 As shown in the figure, one embodiment of this application provides a schematic diagram of the message field structure of service requests, service responses, and probe signals, as follows. Figure 8 As shown, the business request includes the fields timestamp (TS), sequence number (SN), logical channel identifier (sID), service message type (ST), and service identifier (SI).

[0126] In this context, SI 0x420 indicates a read attribute service; SI 0x428 indicates a write attribute service; SI 0x430 indicates a method call service; and SI 0x1080 indicates a notification service. ST 00B indicates a request message service; ST 01B indicates a response message service; ST 10B indicates a notification message service; and ST 11B indicates a probe message service.

[0127] In this embodiment, a corresponding communication link probing period is adopted for different service types. Specifically, the probing period T = f(SI) is determined based on the service ID (SI, such as attribute read / write 0x420 / 0x428, method call 0x430, and subscription / publish 0x1080) of the HITP message. For example, the service type of attribute read / write corresponds to a medium-frequency probing period, such as sending a probing signal once every 0.5~1 seconds; the service type of method call corresponds to a high-frequency probing period, such as sending a probing signal once every 0.2~0.3 seconds; and the service type of subscription / publish corresponds to a low-frequency probing period, such as sending a probing signal once every 1.5~2 seconds.

[0128] The network transmission method provided in this application allows devices to determine message sending strategies based on the service types transmitted on logical channels, thereby enabling on-demand adjustment of network utilization to improve dual-network communication efficiency as needed. Furthermore, it can determine the detection cycle based on the service types transmitted on logical channels, reducing high-reliability service network handover latency and improving network handover performance. Compared to traditional transmission technologies that require temporary establishment of communication links for a single network transmission channel, this method abstracts transmission links on multiple different transmission channels into a logical channel, avoiding the need for temporary establishment of transmission channels after network anomalies and reducing network handover latency.

[0129] The following embodiments will illustrate some applications of the network transmission method provided in this embodiment in the ship network subsystem.

[0130] In this embodiment, the HarmonyOS industrial control computer in the ship network is used as the requesting device, and the HarmonyOS controller or HarmonyOS smart instrument is used as the responding device. A dual transmission layer communication link is established between the HarmonyOS industrial control computer and the HarmonyOS controller or HarmonyOS smart instrument, and the logical channel corresponding to the business logic to be executed is bound to the dual transmission layer communication link. The specific link establishment and logical channel binding process can be found in the detailed description in the above embodiment, and will not be repeated here.

[0131] In practical applications, for the process of HarmonyOS industrial control computer collecting data from HarmonyOS controller or HarmonyOS smart meter, the QoS level of its logical channel is set to low occupancy, the message service ID is attribute read / write (0x420 / 0x428), the detection period T is set to medium frequency, and the message sending strategy is peer-to-peer dual-network single transmission.

[0132] When the HarmonyOS industrial control computer performs real-time control actions on the HarmonyOS controller or HarmonyOS smart instrument, its logical channel QoS level is set to high reliability, the message service ID is method call (0x430), and the message sending strategy is dual-network redundancy dual sending; when performing control actions with low real-time requirements, its QoS level is set to low occupancy, the message service ID is method call (0x430), the detection period T is set to high frequency, and the message sending strategy is peer-to-peer dual-network single sending.

[0133] When a HarmonyOS controller or HarmonyOS smart meter publishes data to a HarmonyOS industrial control computer, the QoS level of its logical channel is set to low occupancy, the message service ID is subscription and publication (0x1080), the probe period T is set to low frequency, and the message sending strategy is peer-to-peer dual-network single transmission.

[0134] It should be noted that the network transmission method provided in this application embodiment can be applied to any type of device with dual or multiple network transmission channels, such as coal mine equipment networks, chemical equipment networks, or oil and gas equipment.

[0135] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0136] This application also provides a network transmission device applied to a first device, which has multiple network transmission channels with a second device. See [link to previous section]. Figure 9 As shown, the device includes a logical channel binding module 901 and a business logic execution module 902.

[0137] The logical channel binding module 901 is used to establish a binding relationship between the logical channel for executing business logic with the second device and multiple transport layer communication links, so that multiple transport layer communication links have the function of executing business logic. The multiple transport layer communication links are established by the first device and the second device based on multiple network transmission channels.

[0138] The business logic execution module 902 is used to execute business logic with the second device based on multiple transport layer communication links.

[0139] This application also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it is configured to perform the network transmission methods shown in the above embodiments.

[0140] This application also provides a chip, see [link to example]. Figure 10 As shown, the chip includes a processor and a memory, in which a computer program is stored. When the computer program is executed by the processor, it implements the network transmission methods described in the above embodiments.

[0141] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the network transmission methods provided in the above embodiments.

[0142] This application also provides a computer program product, which includes a computer program that, when run by an electronic device, enables the electronic device to implement the network transmission methods provided in the above embodiments.

[0143] It should be understood that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0144] It should also be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0145] In the embodiments provided in this application, the division of each framework or module is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple frameworks or modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0146] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0147] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0148] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0149] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A network transmission method, characterized in that, Applied to a first device, wherein the first device and a second device have multiple network transmission channels, the method includes: A binding relationship is established between the logical channel for executing business logic with the second device and multiple transport layer communication links, so that all multiple transport layer communication links have the function of executing the business logic. The multiple transport layer communication links are established by the first device and the second device based on the multiple network transmission channels. Determine the first service type corresponding to the first service logic to be executed between the second device; The first communication mode for executing the first business logic is determined based on the first business type. The first communication mode is determined based on the first business type corresponding to the first business logic and the current link status of the multiple transport layer communication links. The first communication mode includes the usage status of the multiple transport layer communication links and / or the detection status of the availability status of the multiple transport layer communication links. The first business logic is executed using the first communication mode. During the execution of the first business logic, the first communication mode can change with the changes in the first business type and the link status of the multiple transport layer communication links.

2. The method according to claim 1, characterized in that, The first business type includes any one of the following: Data processing; Equipment control; API call.

3. The method according to claim 1 or 2, characterized in that, When the first service type is device control or interface call, the first communication mode includes: The service logic is executed using at least two of the plurality of transport layer communication links, and the detection of the availability status of the at least two of the plurality of transport layer communication links is cancelled.

4. The method according to claim 1 or 2, characterized in that, When the first service type is data processing, the first communication mode includes: The first service logic is executed using the first transport layer communication link among the plurality of transport layer communication links, and during the idle period of executing the first service logic, a first detection signal is sent in the first transport layer communication link using a first detection period. The first detection signal is used to detect the availability status of the first transport layer communication link. A second detection signal is sent in the other transport layer communication links (excluding the first transport layer communication link) of the plurality of transport layer communication links using a second detection period. The second detection signal is used to detect the availability status of the other transport layer communication links.

5. The method according to claim 4, characterized in that, The method further includes: If it is determined that the first transport layer communication link is abnormal, the first transport layer communication link is switched to the second transport layer communication link, which is an available transport layer communication link among the other transport layer communication links. The first service logic is executed using the second transport layer communication link.

6. The method according to claim 5, characterized in that, The transmission time interval of the first detection signal is shorter than the transmission time interval of the second detection signal.

7. The method according to any one of claims 1, 2, 5, and 6, characterized in that, The method further includes: Determine the second service type corresponding to the second service logic to be executed between the second device and the second service type, wherein the second service type is different from the first service type; The second communication mode for executing the second business logic is determined based on the second business type. The second communication mode includes the usage status of the multiple transport layer communication links and the detection status of the availability status of the multiple transport layer communication links. The second business logic is executed using the second communication mode.

8. The method according to any one of claims 1, 2, 5, and 6, characterized in that, The method further includes: Establish a binding relationship between the logical channel for the third service logic to be executed between the second device and the multiple transport layer communication links, so that all the multiple transport layer communication links have the function of executing the third service logic; The third service logic between the device and the second device is executed based on the multiple transport layer communication links.

9. The method according to claim 8, characterized in that, The method further includes: Determine the third business type corresponding to the third business logic; The third communication mode for executing the third service logic is determined based on the third service type. The third communication mode includes the usage status of the multiple transport layer communication links and the detection status of the availability status of the multiple transport layer communication links. The third business logic is executed using the third communication mode.

10. The method according to any one of claims 1, 2, 5, 6 and 9, characterized in that, The multiple transport layer communication links are at least two of the following: TCP socket communication link, Bluetooth GATT communication link, StarSpark SSAP communication link, Wi-Fi communication link, etc.

11. The method according to any one of claims 1, 2, 5, 6 and 9, characterized in that, The multiple transport layer communication links are two transport layer communication links, and the first device and the second device are both electronic devices in the ship network.

12. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 11.

14. A chip, characterized in that, The chip includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that, The computer program product includes a computer program / instruction that, when executed by a processor / electronic device, implements the method as described in any one of claims 1 to 11.