Method for realizing IP communication based on bus network

By introducing the SOCKS proxy service of the master node and the TCP/IP protocol stack in the bus network, efficient and secure data transmission between the bus network and the Internet is achieved, and the problems of high system costs and complex deployment in the existing technology are solved, and the flexibility and scalability of the system are improved.

CN120416358APending Publication Date: 2025-08-01BEIJING XUNLIAN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510557992.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

When implementing IP communication in a bus network, the master node needs to carry out complex custom development or the slave nodes to configure complex IP protocol stacks, resulting in high system cost and complex deployment, and limiting the flexibility and scalability of the system.

Method used

The master node is configured with SOCKS proxy service and a complete TCP/IP protocol stack. The master node acts as a bridge between the bus network and the Internet. It encapsulates and decapsulates data through the proxy bridge program, and implements a simplified version of the SOCKS proxy library on the slave node. The master node performs centralized network configuration management and time slice rotation mechanism to allocate communication time slots.

Benefits of technology

It reduces the hardware requirements and development complexity of slave nodes, simplifies the configuration management of slave nodes, improves the efficiency and stability of the system, and ensures the security of data transmission and the scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416358A_ABST
    Figure CN120416358A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing IP communication based on a bus network, which successfully realizes the IP communication based on the bus network through configuring SOCKS proxy service and a complete TCP / IP protocol stack at a master control node and through cooperation of the master control node and slave nodes. And the master control node encapsulates the bus protocol data of the slave node into an IP message and uploads the IP message to the cloud platform, and meanwhile, data returned from the cloud platform is forwarded to the slave node after being de-encapsulated, so that bidirectional data transmission is realized. Compared with the scheme in the background technology, the problem that the slave node needs a complete IP protocol stack is solved, data transmission is carried out in the slave node through the simplified SOCKS proxy library, and the hardware requirement and development complexity are remarkably reduced. The centralized network configuration management of the master control node simplifies the deployment of a large-scale system and reduces the risk of configuration errors. Communication time slot distribution is carried out through a time slice rotation mechanism, and the master control node can ensure that a plurality of slave nodes carry out data transmission efficiently and stably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of methods for implementing IP communication based on a bus network, and particularly to a method for implementing IP communication based on a bus network. Background Art

[0002] With the rapid development of industrial and Internet of Things applications, more and more devices need to be interconnected through communication networks. As a common industrial communication network architecture, the bus system is widely used in many application scenarios due to its simplicity, reliability, economy, and practicality. Especially in low-rate communication scenarios, the bus network can effectively connect multiple devices through a shared communication link to meet real-time requirements, so it has been widely applied in the fields of industrial automation, intelligent manufacturing, and the Internet of Things.

[0003] Currently, the method for implementing IP communication in a bus network mainly relies on data exchange between a master node and slave nodes. To enable the bus network to communicate with the Internet, usually the master node acts as a bridge, responsible for encapsulating the data of the slave nodes into IP packets and uploading them to the cloud platform. Although this method can achieve data transmission to the cloud, there are some technical problems in actual applications. Especially, the hardware requirements for the slave nodes are relatively high, resulting in an increase in device costs, and due to each slave node needing to support a complete IP protocol stack, the complexity of software development also increases.

[0004] The main problems of the prior art are as follows. The first solution requires the master node to understand the communication content of all slave nodes and perform customized development according to different scenarios. This makes it necessary to carry out corresponding development and adjustment for each change in the application scenario, increasing the complexity of development and maintenance. The second solution requires each slave node to deploy a complete IP protocol stack, which poses relatively high requirements on the hardware performance and memory capacity of the slave nodes, resulting in an increase in hardware costs and, to a certain extent, restricting the flexibility and scalability of the system.

[0005] Therefore, when implementing IP communication in a bus network in the prior art, due to the need for the master node to perform complex customized development or the slave nodes to configure relatively complex IP protocol stacks, the system cost is high and the deployment is complex, which has become an urgent problem to be solved. Summary of the Invention

[0006] This application provides a method, device, computer device, and storage medium for implementing IP communication based on a bus network, aiming to solve the problems that in the prior art, when implementing IP communication in a bus network, due to the need for the master node to perform complex customized development or the slave nodes to configure relatively complex IP protocol stacks, the system cost is high and the deployment is complex.

[0007] First aspect, a method for implementing IP communication based on a bus network, the method comprising:

[0008] Configure a SOCKS proxy service on the master node, where the master node is a bridge between the bus network and the Internet, implementing a complete TCP / IP protocol stack at the Ethernet layer, supporting TCP protocol and UDP protocol, as well as SSL encrypted connection and DNS address query;

[0009] The master node encapsulates the bus protocol data of the slave node into an IP packet through a proxy bridging program and uploads it to the cloud platform or other external devices through the Internet;

[0010] The master node receives the IP packets returned by the cloud platform or external devices, and after de-encapsulation, forwards them to the corresponding slave nodes to achieve two-way data transmission;

[0011] Implement a simplified SOCKS proxy library in the slave node, where the SOCKS proxy library includes function interfaces for creating connections, sending data, receiving data, and closing connections;

[0012] Perform centralized network configuration management on the master node. All network configuration information only needs to be set on the master node, and the master node is responsible for sending the configuration information to the slave nodes, simplifying the configuration management of the slave nodes;

[0013] The master node allocates communication time slots for multiple slave nodes through a time slice rotation mechanism and dynamically adjusts the time slot allocation according to the data traffic.

[0014] In the above solution, optionally, the SOCKS proxy service of the master node encapsulates the data of the slave node into an IP packet and supports two-way data transmission, where the master node encapsulates the data of the slave node into an IP packet and uploads it to the cloud platform, and the data returned by the cloud platform is de-encapsulated and then forwarded to the slave node.

[0015] In the above solution, optionally, the TCP / IP protocol stack of the master node supports TCP and UDP protocols, ensuring reliable data transmission between the slave node and the cloud platform or external devices, and the master node supports flexibly selecting an appropriate protocol for data transmission according to different network requirements.

[0016] In the above solution, optionally, the master node protects the security of the data transmission process through an SSL encrypted connection, ensuring that the data is not stolen or tampered with during the Internet transmission process, and providing data encryption and decryption functions.

[0017] In the above solution, optionally, the master node supports the DNS address query function, enabling the master node to communicate with external devices through domain names, avoiding directly using IP addresses for network connection, and simplifying the management and configuration of devices.

[0018] In the above solution, optionally, the slave node implements a simplified version of the SOCKS proxy library, which includes the following interfaces: a connection creation interface, a data sending interface, a data receiving interface, and a connection closing interface, to simplify the slave node's dependence on the IP protocol stack, reduce the hardware resource requirements and development complexity.

[0019] In the above solution, optionally, the master node centrally stores and manages all network configuration information through centralized network configuration management, and the master node distributes this information to all slave nodes to ensure that the slave nodes communicate with the Internet or cloud platform according to the unified configuration.

[0020] In the above solution, optionally, the master node manages communication time slots through a time slice rotation mechanism, dynamically adjusts the time slot allocation according to the data traffic, ensures that each slave node transmits data on time, avoids conflicts when multiple slave nodes transmit simultaneously, and improves the communication efficiency of the system.

[0021] In the above solution, optionally, the master node dynamically adjusts the length and allocation method of time slots according to the communication requirements and load conditions of the slave nodes, ensures that the system can still operate efficiently under high load conditions, and avoids data loss or delay caused by bandwidth bottlenecks.

[0022] In a second aspect, a master node configures a SOCKS proxy service, supports a complete TCP / IP protocol stack, provides an SSL encrypted connection function and DNS address query, and performs bidirectional data forwarding between the bus network and the Internet through a proxy bridging program, while supporting centralized network configuration management and dynamic time slot allocation.

[0023] Compared with the prior art, the present application has at least the following beneficial effects:

[0024] This application is based on further analysis and research of the problems in the prior art. It is recognized that when implementing IP communication in a bus network in the prior art, due to the need for complex custom development by the master node or relatively complex IP protocol stacks to be configured on the slave nodes, there are problems such as high system costs and complex deployment. By configuring a SOCKS proxy service and a complete TCP / IP protocol stack on the master node, and through the cooperation between the master node and the slave nodes, IP communication based on the bus network has been successfully achieved. The master node encapsulates the bus protocol data of the slave nodes into IP packets and uploads them to the cloud platform, and at the same time supports the data returned from the cloud platform to be unpacked and forwarded to the slave nodes, thus realizing two-way data transmission. Compared with the solution in the background art, the present invention solves the problem that the slave nodes need complete IP protocol stacks. Data transmission is carried out in the slave nodes through a simplified SOCKS proxy library, significantly reducing the hardware requirements and development complexity. The centralized network configuration management of the master node simplifies the deployment of large-scale systems and reduces the risk of configuration errors. Through the time slice rotation mechanism for communication time slot allocation, the master node can ensure that multiple slave nodes transmit data efficiently and stably, avoiding communication conflicts in traditional methods and improving the overall efficiency and stability of the system. In addition, the master node supports SSL encrypted connections, ensuring the security of data during transmission and preventing problems such as data leakage or tampering. Through the above technical solutions, the present invention not only solves the problems of high requirements for hardware and large development complexity in traditional methods, but also optimizes the data transmission efficiency and improves the security and scalability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic flowchart of a method for implementing IP communication based on a bus network provided by an embodiment of this application;

[0026] Figure 2 It is one of the schematic diagrams of the master-slave structure of the existing network topology provided by an embodiment of this application;

[0027] Figure 3 It is another schematic diagram of the master-slave structure of the existing network topology provided by an embodiment of this application;

[0028] Figure 4 It is one of the schematic diagrams of the topology of a method for implementing IP communication based on a bus network provided by an embodiment of this application;

[0029] Figure 5 It is another schematic diagram of the topology of a method for implementing IP communication based on a bus network provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] To make the objectives, technical solutions and advantages of this application more clear and understandable, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining this application and are not intended to limit this application.

[0031] In one embodiment, as Figure 1 shown, a method for implementing IP communication based on a bus network is provided, including the following steps:

[0032] Configure a SOCKS proxy service on the master node. The master node is the bridge between the bus network and the Internet, implements a complete TCP / IP protocol stack at the Ethernet layer, supports TCP protocol and UDP protocol, as well as SSL encrypted connections and DNS address queries;

[0033] The master node encapsulates the bus protocol data of the slave node into an IP packet through a proxy bridging program and uploads it to the cloud platform or other external devices through the Internet;

[0034] The master node receives the IP packets returned by the cloud platform or external devices, de-encapsulates them and forwards them to the corresponding slave nodes to achieve two-way data transmission;

[0035] Implement a simplified version of the SOCKS proxy library in the slave node. The SOCKS proxy library includes function interfaces for creating connections, sending data, receiving data, and closing connections;

[0036] Perform centralized network configuration management on the master node. All network configuration information only needs to be set on the master node, and the master node is responsible for sending the configuration information to the slave nodes, simplifying the configuration management of the slave nodes;

[0037] The master node allocates communication time slots for multiple slave nodes through a time slice rotation mechanism and dynamically adjusts the time slot allocation according to the data traffic.

[0038] The core technology of the method for implementing IP communication based on a bus network in this embodiment lies in the cooperation between the master node and the slave node, and uses the SOCKS proxy service to achieve data encapsulation and forwarding, thereby completing the conversion between the bus protocol and the IP protocol. The specific steps include:

[0039] Master node configuration: The master node, as the bridge between the bus network and the Internet, configures a SOCKS proxy service and can handle different network protocols such as TCP, UDP, SSL encryption protocol, and DNS queries by implementing a complete TCP / IP protocol stack. The master node receives data from the slave nodes, encapsulates it into IP packets, and uploads it to the cloud platform or other external devices.

[0040] Data Transmission and Bidirectional Forwarding: The master node encapsulates the data from the slave nodes into IP protocol-compliant packets through a proxy bridging program and uploads them to the cloud platform or other external devices. At the same time, the master node receives the data returned by the cloud platform or external devices, de-encapsulates it, and then forwards it to the slave nodes.

[0041] Simplified Design of Slave Nodes: The slave nodes only need to implement a simplified version of the SOCKS proxy library, avoiding the dependence on a complete IP protocol stack and simplifying the hardware requirements of the slave nodes. Through this simplified SOCKS proxy library, the slave nodes can complete basic operations such as connection establishment, data sending, data receiving, and connection closing.

[0042] By simplifying the design of the slave nodes, it is avoided that the slave nodes need to implement a complete IP protocol stack, reducing the hardware requirements, decreasing the hardware cost, and enabling the system to run on resource-constrained devices.

[0043] The master node centrally processes the protocol stack and data encapsulation and de-encapsulation, simplifies the development and maintenance work, reduces the need for customized development, and improves the development efficiency.

[0044] The bidirectional data forwarding mechanism of the master node enables real-time intercommunication of data between the bus network and the Internet, ensuring efficient and reliable data transmission.

[0045] In this embodiment, the SOCKS proxy service of the master node encapsulates the data of the slave nodes into IP packets and supports bidirectional data transmission. Among them, the master node encapsulates the data of the slave nodes into IP packets and uploads them to the cloud platform, and the data returned by the cloud platform is de-encapsulated and then forwarded to the slave nodes.

[0046] The main function of the SOCKS proxy service of the master node is to encapsulate the bus protocol data of the slave nodes and convert it into IP protocol-compliant packets. After the master node configures the SOCKS proxy service, it can process all the data packets sent by the slave nodes, encapsulate them through the TCP or UDP protocol, and upload the data to the cloud platform or external devices through the Internet.

[0047] The master node can not only encapsulate data, but also de-encapsulate the data packets from the cloud platform or external devices, restore them to bus protocol data, and then send them to the slave nodes through the bus network.

[0048] The SOCKS proxy service of the master node can transparently convert between the bus protocol and the IP protocol, enabling seamless data transmission in different network environments.

[0049] Through the SOCKS proxy service, the master node can easily manage the communication with multiple slave nodes, support bidirectional data transmission, and improve the flexibility and adaptability of the system.

[0050] In this embodiment, the TCP / IP protocol stack of the master node supports TCP and UDP protocols, ensuring reliable data transmission between the slave nodes and the cloud platform or external devices. Moreover, the master node supports flexibly selecting an appropriate protocol for data transmission according to different network requirements.

[0051] In this embodiment, the master node protects the security during data transmission through an SSL encrypted connection, ensuring that data is not stolen or tampered with during Internet transmission, and providing data encryption and decryption functions.

[0052] In this embodiment, the master node supports the DNS address query function, enabling the master node to communicate with external devices through domain names, avoiding directly using IP addresses for network connection, and simplifying the management and configuration of devices.

[0053] In this embodiment, the slave node implements a simplified version of the SOCKS proxy library, and the SOCKS proxy library includes the following interfaces: a connection creation interface, a data sending interface, a data receiving interface, and a connection closing interface, simplifying the slave node's dependence on the IP protocol stack and reducing the hardware resource requirements and development complexity.

[0054] In this embodiment, the master node centrally stores and manages all network configuration information through centralized network configuration management, and the master node distributes this information to all slave nodes to ensure that the slave nodes communicate with the Internet or the cloud platform according to a unified configuration.

[0055] In this embodiment, the master node manages communication time slots through a time slice rotation mechanism, dynamically adjusts the time slot allocation according to the data traffic, ensures that each slave node transmits data on time, avoids conflicts when multiple slave nodes transmit simultaneously, and improves the communication efficiency of the system.

[0056] In this embodiment, the master node dynamically adjusts the length and allocation method of time slots according to the communication requirements and load conditions of the slave nodes, ensuring that the system can still operate efficiently under high load conditions and avoiding data loss or delay caused by bandwidth bottlenecks.

[0057] In this embodiment, a master node is provided. The master node configures a SOCKS proxy service, supports a complete TCP / IP protocol stack, provides an SSL encrypted connection function and DNS address query, and performs bidirectional data forwarding between the bus network and the Internet through a proxy bridging program. At the same time, it supports centralized network configuration management and dynamic time slot allocation.

[0058] In this embodiment, the master node is configured with a SOCKS proxy service and supports a complete TCP / IP protocol stack. The master node is responsible for data encapsulation and decapsulation of slave nodes, and provides SSL encrypted connections and DNS query functions. The master node manages the two-way transmission of data through a proxy bridge program, supporting centralized configuration management and dynamic time slot allocation.

[0059] The master node integrates multiple functions such as SOCKS proxy service, protocol stack, SSL encryption, DNS query, etc., ensuring efficient and stable communication between slave nodes and the Internet.

[0060] The master node centrally manages all network configurations and communication time slot allocations, improving the manageability and scalability of the system.

[0061] In one embodiment, in existing industrial or Internet of Things scenarios, when using a wired communication network, a bus is often used to interconnect multiple devices. This bus network is different from Ethernet. Usually, the rate is not too high (<= 10Mbps), and it uses a broadcast method to share the communication link time-division multiplexing. The link layer frame format is short, and the addressing scheme is simple, which is convenient for real-time performance. For example, Modbus uses 1 byte to represent the node address. It is usually called an industrial bus or a fieldbus; it has a series of outstanding advantages such as simplicity, reliability, economy, and practicality.

[0062] The network topology uses a master-slave structure as Figure 2 shown. The master node is responsible for allocating time slices for time-division multiplexing. It can also act as a gateway node to communicate with the external Internet.

[0063] In the bus network, in order to be able to transmit IP packets, it is necessary for the master node to act as a bridge, package the information of the slave nodes into IP packets, and upload them to the cloud platform. This requires the master node to understand the communication content and format of all slave nodes, convert them into TCP / IP traffic and upload them to the cloud platform. This requires custom development for each usage scenario. In another way, each slave node supports the IP protocol stack, and the outermost layer still needs to use the bus link layer encapsulation; but the inner layer uses the TCP / IP packet format. When the TCP / IP packets sent by the slave nodes pass through the master node, the bus link layer encapsulation is removed, and the internal TCP / IP packets are automatically forwarded to the Internet. The advantage of this method is that the master node does not care about the data content and only needs to complete the encapsulation and decapsulation according to the designed packet format and perform two-way forwarding.

[0064] Existing solution 1: It is required that the master node needs to understand the communication content of all slave nodes and perform custom development for specific scenarios. When uploading data to the cloud, it is packaged according to the content. Conversely, when downloading data from the cloud, it needs to be distributed according to the content, combined with the slave node address allocation.

[0065] Such asFigure 3 As shown in the figure, Solution 2 requires each slave node to deploy a complete IP protocol stack. Then, the performance and memory capacity of the slave node MCU need to meet the requirements of the IP protocol stack, which increases the hardware cost and software code complexity.

[0066] As Figure 4 and Figure 5 shown, the master node of this embodiment acts as a bridge between the bus and the Internet. At the bus level, it provides a SOCKS proxy service and implements a complete TCP / IP protocol stack at the Ethernet level; it supports the packet encapsulation and connection state management of TCP / IP, supports TCP and UDP connections, supports SSL encrypted connections, and supports DNS address queries. In the upper-layer proxy bridging program, two-way data forwarding between the two is implemented.

[0067] On the slave node, a Socks proxy library program is implemented, which is much simpler than the IP protocol stack and reduces the performance requirements for the hardware on the slave node;

[0068] Using the method provided in this embodiment for communication in a network with more than one device has the following advantages: reducing the amount of ipstack code of the edge nodes, the gateway node does not need to care about the transmission content and network configuration information, which only needs to be configured on the gateway node. Multiple slave nodes share the IP address, and it is easy to implement an SSL encrypted connection.

[0069] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

Claims

1. A method for implementing IP communication based on a bus network, characterized in that, The method includes: Configure a SOCKS proxy service on the master node. The master node serves as a bridge between the bus network and the Internet, implements a complete TCP / IP protocol stack at the Ethernet layer, supports TCP protocol and UDP protocol, as well as SSL encrypted connections and DNS address queries; The master node encapsulates the bus protocol data of the slave node into IP packets through a proxy bridging program and uploads them to the cloud platform or other external devices via the Internet; The master node receives the IP packets returned by the cloud platform or external devices, de-encapsulates them and forwards them to the corresponding slave nodes to achieve two-way data transmission; Implement a simplified SOCKS proxy library in the slave node. The SOCKS proxy library includes function interfaces for creating connections, sending data, receiving data, and closing connections; Conduct centralized network configuration management on the master node. All network configuration information only needs to be set on the master node, and the master node is responsible for distributing the configuration information to the slave nodes, simplifying the configuration management of the slave nodes; The master node allocates communication time slots for multiple slave nodes through a time slice rotation mechanism and dynamically adjusts the time slot allocation according to the data traffic.

2. The method according to claim 1, wherein The SOCKS proxy service of the master node encapsulates the data of the slave node into IP packets and supports two-way data transmission. Among them, the master node encapsulates the data of the slave node into IP packets and uploads them to the cloud platform, and the data returned by the cloud platform is de-encapsulated and forwarded to the slave node.

3. The method according to claim 1, characterized in that The TCP / IP protocol stack of the master node supports TCP and UDP protocols, ensuring reliable data transmission between the slave node and the cloud platform or external devices, and the master node supports flexibly selecting appropriate protocols for data transmission according to different network requirements.

4. The method according to claim 1, wherein The master node protects the security of the data transmission process through an SSL encrypted connection, ensuring that the data is not stolen or tampered with during Internet transmission, and providing data encryption and decryption functions.

5. The method according to claim 1, wherein The master node supports the DNS address query function, enabling the master node to communicate with external devices through domain names, avoiding direct use of IP addresses for network connections, and simplifying the management and configuration of devices.

6. The method according to claim 1, wherein The slave node implements a simplified SOCKS proxy library. The SOCKS proxy library includes the following interfaces: a connection creation interface, a data sending interface, a data receiving interface, and a connection closing interface, simplifying the slave node's dependence on the IP protocol stack and reducing hardware resource requirements and development complexity.

7. The method according to claim 1, characterized in that The master node centrally stores and manages all network configuration information through centralized network configuration management. The master node distributes this information to all slave nodes to ensure that the slave nodes communicate with the Internet or cloud platform according to the unified configuration.

8. The method according to claim 1, characterized in that, The master node manages the communication time slots through a time slice rotation mechanism, dynamically adjusts the time slot allocation according to the data traffic, ensures that each slave node transmits data on time, avoids conflicts when multiple slave nodes transmit simultaneously, and improves the communication efficiency of the system.

9. The method according to claim 1, wherein The master node dynamically adjusts the length and allocation method of time slots according to the communication requirements and load conditions of the slave nodes, ensuring that the system can still operate efficiently under high load conditions and avoiding data loss or delay caused by bandwidth bottlenecks.

10. A master node for implementing the method described in claim 1. The master node configures a SOCKS proxy service, supports a complete TCP / IP protocol stack, provides SSL encrypted connection functionality and DNS address query, and performs two-way data forwarding between the bus network and the Internet through a proxy bridge program, while supporting centralized network configuration management and dynamic time slot allocation.