Multi-medium networking method and system based on CAN and Ethernet and application of multi-medium networking method and system
By adopting a multi-media networking method based on CAN and Ethernet in the fire fighting host, multiple CAN bus networking and Ethernet networking are formed to form a hybrid networking, which solves the problems of small number of hosts and high cost in the existing technology, and realizes an efficient networking solution.
Patent Information
- Application Number
- CN202411916410.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
AI Technical Summary
The existing firefighting host networking scheme is relatively single, resulting in a small number of hosts when using a single CAN bus to form the network. The cost is high when using a single Ethernet network to form the networking, making it difficult to meet actual needs.
Using a multi-media networking method based on CAN and Ethernet, by forming multiple CAN bus networks, each CAN bus network is used as a subnet, the hosts in the same subnet are configured as the same CAN communication baud rate, and the hosts of different subnets are configured with the same or different CAN communication baud rates, and the network is formed through Ethernet to form a backbone network.
Effectively improve the host networking solution, which can not only give full play to the high bandwidth of Ethernet to increase the number of network hosts, but also reduce the overall networking cost through CAN bus networking, solving the problem of small number of single CAN bus networking hosts and high cost of multiple hosts using single Ethernet to build a network.
Smart Images

Figure CN119728335A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer communication technology, and more specifically to a CAN and Ethernet-based multi-media networking method, system and application thereof. Background Art
[0002] With the rapid development of social economy, the types and quantity of urban construction are increasing, the population is becoming more and more dense, and the types and properties of various combustion materials are becoming more and more complex. Building structure, road layout, etc. are important factors affecting fire safety. In order to meet the needs of fire emergency rescue, the network layout of the fire host is very critical. However, according to research by technical personnel, the networking scheme of the existing fire host is still relatively simple, and generally only a single CAN bus network or Ethernet network can be selected; when using a single CAN bus network, because the CAN communication baud rate supported by the host is currently 5~100K, the lower bus bandwidth further limits the actual maximum number of networked hosts, resulting in the maximum number of hosts that can be networked cannot meet the actual needs, the number of networked hosts is small, and it is easy to affect the communication efficiency; and if multiple hosts use a single Ethernet network, there is a problem of high networking construction costs due to the need to layout multiple Ethernet channels. Since the existing host networking scheme still has obvious deficiencies in actual application and is difficult to meet market application needs, it is urgent to improve. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a CAN and Ethernet-based multi-media networking method, system and application thereof in view of the above-mentioned defects of the prior art.
[0004] The technical solution adopted by the present invention to solve its technical problem is:
[0005] In one aspect, the present invention provides a multi-media networking method based on CAN and Ethernet, the method comprising:
[0006] Establishing multiple CAN bus networks, each of which includes multiple hosts connected to the network via the CAN bus; each of the CAN bus networks serves as a subnet;
[0007] All hosts in the same subnet are configured with the same CAN communication baud rate; hosts in different subnets are configured with the same or different CAN communication baud rates;
[0008] Host No. 1 in each of the subnets is selected, and networking is performed through Ethernet to form a backbone network; all hosts on the backbone network are configured with numbers on the backbone network to which they belong.
[0009] In some embodiments, the number of hosts in the subnet is n, and the host numbers in the subnet are sequentially set to 1 to n, where n is a positive integer greater than 1;
[0010] The hosts in the subnet support peer-to-peer mode or master-slave mode when setting networking registration information: the peer-to-peer mode of the hosts in the subnet is that each host registers the numbers of all hosts in the subnet; the master-slave mode of the hosts in the subnet is that the host numbered 1 in the subnet registers the numbers of all other hosts in the subnet, and other hosts other than No. 1 in the subnet only register No. 1 host in the subnet.
[0011] In some embodiments, the number of hosts in the backbone network is m, and the host numbers in the backbone network are sequentially set to 1 to m, where m is a positive integer greater than 1;
[0012] When the hosts in the backbone network set the networking registration information, the peer mode or the master-slave mode is also supported: the peer mode of the hosts in the backbone network is that each host registers the numbers of all the hosts in the backbone network; the master-slave mode of the hosts in the backbone network is that the host numbered No. 1 in the backbone network registers the numbers of all other hosts in the backbone network, and other hosts other than No. 1 in the backbone network only register No. 1 host of the backbone network.
[0013] In some embodiments, the backbone network supports Ethernet virtual subnet division, and the Ethernet virtual subnet is a grouping relationship between hosts formed by the backbone network host software configuration. The method of dividing the Ethernet virtual subnet is:
[0014] Select any host from number 1 to m as the root node of the Ethernet virtual subnet, and then select one or more hosts from number 2 to m as child nodes of the root node to construct an Ethernet virtual subnet; wherein,
[0015] Except for host No. 1 of the backbone network, any other hosts of the backbone network can only be divided into one Ethernet virtual subnet.
[0016] In some embodiments, when the backbone network is a peer-to-peer network or contains an Ethernet virtual subnet, all hosts in the backbone network are configured to the same IP network segment; when the backbone network is a master-slave network, any non-host No. 1 in the backbone network can be reached via Ethernet routing.
[0017] In some embodiments, the subnet supports CAN virtual subnet division, the CAN virtual subnet is a grouping relationship between hosts formed by the subnet host software configuration, and the method of dividing the CAN virtual subnet is:
[0018] Select any host from number 1 to n as the root node of the CAN virtual subnet, and then select one or more hosts from number 2 to n as the child nodes of the root node to construct a CAN virtual subnet; wherein,
[0019] Except for host No. 1 of the subnet, any other hosts of the subnet can only be divided into one CAN virtual subnet.
[0020] On the other hand, the present invention also provides a multi-media networking system based on CAN and Ethernet, including a network device, an Ethernet network and multiple CAN bus networks, wherein the Ethernet network and the multiple CAN bus networks establish a hybrid network through a multi-media networking method based on CAN and Ethernet as described in any of the above items, and the network device establishes a connection with a host in the hybrid network through Ethernet.
[0021] In some embodiments, each host in the backbone network supports configuring a static IP address through an operation interface; the local static IP, multicast address and DHCP address pool are configured through host No. 1 of the backbone network, and hosts other than host No. 1 of the backbone network choose to obtain the local address through DHCP.
[0022] In some embodiments, when statically configured, all hosts in the backbone network use the system's unified default multicast IP address and port;
[0023] When DHCP allocates addresses, other hosts in the backbone network all use the multicast IP address and port configured by host No. 1.
[0024] On the other hand, the present invention also provides a data transmission method based on CAN and Ethernet multi-media networking, which is applied to the multi-media networking system based on CAN and Ethernet as described in any one of the above items; the method comprises:
[0025] Send the command data of the backbone network host to all subnets;
[0026] The network information data of the backbone network host is transmitted only on the backbone network and is not sent to any of the subnets;
[0027] The business data of the subnet host is synchronized to the backbone network; wherein, there is no interaction of command data and business data between the subnets.
[0028] The beneficial effects of the present invention are as follows: Different from the prior art, the multi-media networking method based on CAN and Ethernet of the present invention forms multiple CAN bus networks, each of which includes multiple hosts connected to the network via the CAN bus; each of the CAN bus networks serves as a subnet; all hosts in the same subnet are configured with the same CAN communication baud rate; the CAN communication baud rates configured for hosts in different subnets are the same or different; host No. 1 in each of the subnets is selected and networked through Ethernet to form a backbone network; all hosts on the backbone network are configured with numbers on the backbone network to which they belong; the host networking scheme is effectively improved, which can not only give play to the characteristic that the high bandwidth of Ethernet can greatly increase the number of networked hosts, but also enable an appropriate number of hosts to reduce the overall networking cost through CAN bus networking, which helps to solve the problem of a small number of hosts when a single CAN bus is used for networking and the problem of high cost when multiple hosts are networked using a single Ethernet. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the implementation of the multi-media networking method based on CAN and Ethernet in an embodiment of the present invention;
[0030] Figure 2 is a networking diagram of a multi-media networking system based on CAN and Ethernet in an embodiment of the present invention;
[0031] Figure 3 It is a flow chart for implementing a data transmission method based on a multi-media network of CAN and Ethernet in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0034] "Multiple" means two or more. "And / or" describes 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 at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0035] Moreover, the terms "up, down, front, back, left, right, upper end, lower end" etc. indicating directions are all based on the posture and position of the device or equipment described in this solution during normal use.
[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the following will be described clearly and completely in combination with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are partial embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0037] Embodiment 1: The embodiment of the present invention provides a multi-media networking method based on CAN and Ethernet, which can realize hybrid networking through Ethernet networking and multiple CAN bus networking, help to increase the number of networking hosts, and effectively reduce networking costs.
[0038] Figure 1 The implementation process of the multi-media networking method based on CAN and Ethernet is shown. Specifically, referring to steps S11-S13, the multi-media networking method based on CAN and Ethernet specifically includes:
[0039] S11: Establish multiple CAN bus networks, each of which includes multiple hosts connected to the network via the CAN bus; each CAN bus network is used as a subnet;
[0040] In step S11, the number of hosts in the subnet is n, and the host numbers in the subnet are sequentially set to 1 to n, where n is a positive integer greater than 1; specifically, n is 63, that is, the host numbers in the subnet are sequentially set to 1 to 63. There is no conflict between host numbers in the same subnet, and host numbers in different subnets are independent of each other.
[0041] Among them, the hosts in the subnet support peer mode or master-slave mode when setting the networking registration information: the peer mode of the hosts in the subnet is that each host registers the numbers of all hosts in the subnet; the master-slave mode of the hosts in the subnet is that the host numbered 1 in the subnet registers the numbers of all other hosts in the subnet, and other non-No. 1 hosts in the subnet only register the No. 1 host in the subnet.
[0042] Further, the subnet supports CAN virtual subnet division. The CAN virtual subnet is a grouping relationship between hosts formed by the subnet host software configuration. Referring to step S110, the method for dividing the CAN virtual subnet is:
[0043] S110: Select any host numbered 1 to 63 as the root node of the CAN virtual subnet, and then select one or more hosts numbered 2 to 63 as child nodes of the root node to construct a CAN virtual subnet; wherein, except for host numbered 1 of the subnet, any other hosts of the subnet can only be divided into one CAN virtual subnet.
[0044] By default, host No. 1 in this subnet is the root node of all CAN virtual subnets in this subnet. Host No. 1 in this subnet cannot become a child node of the CAN virtual subnet in this subnet.
[0045] S12: All hosts in the same subnet are configured with the same CAN communication baud rate; hosts in different subnets are configured with the same or different CAN communication baud rates;
[0046] In step S12, by configuring all hosts in the same subnet to the same CAN communication baud rate, the communication of each host on the CAN bus in the subnet is guaranteed to be stable, and communication errors or data loss are avoided. The CAN communication baud rates configured for hosts in different subnets can be the same or different, and can be designed and selected according to the actual application needs to meet different communication requirements.
[0047] S13: Select host No. 1 in each subnet, and network them through Ethernet to form a backbone network; all hosts on the backbone network are configured with the numbers on the backbone network to which they belong.
[0048] In step S13, host No. 1 in each subnet is fixed as the common host node of the backbone network and the subnet. When the backbone network is a peer-to-peer network or contains an Ethernet virtual subnet, all hosts in the backbone network are configured to the same IP network segment. When the backbone network is a master-slave network, any host other than host No. 1 in the backbone network can be reached via Ethernet routing.
[0049] The number of hosts in the backbone network is m, and the hosts in the backbone network are numbered from 1 to m, where m is a positive integer greater than 1 and greater than n; specifically, m is 999, that is, the hosts in the backbone network are numbered from 1 to 999. The host numbers in the backbone network have no conflicts and are independent of each other.
[0050] Among them, the hosts in the backbone network also support peer mode or master-slave mode when setting the networking registration information: the peer mode of the hosts in the backbone network is that each host registers the numbers of all hosts in the backbone network; the master-slave mode of the hosts in the backbone network is that the host numbered 1 in the backbone network registers the numbers of all other hosts in the backbone network, and other non-No. 1 hosts in the backbone network only register the No. 1 host of the backbone network.
[0051] Further, the backbone network supports Ethernet virtual subnet division, and the Ethernet virtual subnet is a grouping relationship between hosts formed by the backbone network host software configuration. Referring to step S130, the method for dividing the Ethernet virtual subnet is:
[0052] S130: Select any host numbered 1 to 999 as the root node of the Ethernet virtual subnet, and then select one or more hosts numbered 2 to 999 as child nodes of the root node to construct an Ethernet virtual subnet; wherein, except for host No. 1 of the backbone network, any other hosts of the backbone network can only be divided into one Ethernet virtual subnet.
[0053] By default, host No. 1 in the backbone network is the root node of all virtual subnets in the backbone network. Host No. 1 in the backbone network cannot become a child node of a virtual subnet in the backbone network.
[0054] It is understandable that if the backbone network host needs to access the subnet, the backbone network host needs to be configured to support both Ethernet networking and CAN bus networking. The backbone network host has two host numbers and needs to configure the networking registration information in the two networks. The two host numbers of the backbone network host when accessing the subnet are the (Ethernet) backbone network host number and the (CAN bus) subnet host number; among them, the (Ethernet) backbone network host number can be set to any host number between 1 and 999 that does not conflict with other backbone network hosts; the (CAN bus) subnet host number is fixed to #1.
[0055] The multi-media networking method based on CAN and Ethernet in this embodiment, by improving the host networking solution, can not only give full play to the characteristic that the high bandwidth of Ethernet can greatly increase the number of networked hosts, but also enable an appropriate number of hosts to be networked through the CAN bus to reduce the overall networking cost, enrich the networking methods, reduce the complexity of network wiring during construction, and can effectively solve the problem of a small number of hosts when using a single CAN bus networking and the problem of high cost when multiple hosts are networked using a single Ethernet.
[0056] Embodiment 2: The embodiment of the present invention provides a multi-media networking system based on CAN and Ethernet, including network equipment, Ethernet networking and multiple CAN bus networking. The Ethernet networking and multiple CAN bus networking are established as a hybrid network through the multi-media networking method based on CAN and Ethernet provided in Embodiment 1. The network equipment is connected to the host in the hybrid network through Ethernet. The hybrid network includes a network layout of a backbone network and multiple subnets, such as Figure 2 shown.
[0057] Among them, each host in the backbone network supports the configuration of static IP addresses through the operation interface; through the backbone network host No. 1 to configure the local static IP, multicast address and DHCP address pool, non-backbone network host No. 1 can choose to obtain the local address through DHCP.
[0058] Specifically, during static configuration, all hosts on the backbone network use the system's unified default multicast IP address and port;
[0059] When DHCP assigns addresses, other hosts on the backbone network use the multicast IP address and port configured by host No. 1.
[0060] In combination with the above content, the detailed layout operation of the multi-media networking system based on CAN and Ethernet is described below during the specific implementation:
[0061] 1) Backbone network host networking information configuration: According to the actual networking requirements, all hosts are selected to use static IP addresses or DHCP to obtain addresses. All backbone network host IPs are in the same segment;
[0062] 2) The backbone network host can choose peer-to-peer networking or master-slave networking according to business needs;
[0063] 3) The backbone network host can be divided into multiple Ethernet virtual subnets according to business needs. The control commands of host No. 1 in the backbone network can be synchronized to all hosts in the backbone network and subnets; the control commands of the root node host in the Ethernet virtual subnet can be synchronized to all hosts in this Ethernet virtual subnet (and its connected subnets), but will not be sent to all hosts in other Ethernet virtual subnets (and their connected subnets); the data of the subnodes in the Ethernet virtual subnet will be synchronized to the root node of this Ethernet virtual subnet and host No. 1 in it, but will not be sent to other Ethernet virtual subnets;
[0064] 4) The host at the intersection of the backbone network and the subnet needs to be configured to enable CAN bus networking. The subnet host number of the host at this location is #1 by default and does not need to be configured again; the host at this location needs to register the networking information in the subnet, and can choose peer-to-peer networking or master-slave networking according to business needs; the host at this location can be divided into multiple CAN virtual subnets according to business needs. As a backbone network host, this machine must follow the Ethernet virtual subnet-related rules of the backbone network in 3). At the same time, this machine can also be the No. 1 host of the subnet. The control commands of the No. 1 host can be synchronized to all hosts in the corresponding subnet;
[0065] 5) The subnet host can be configured with host addresses 2 to 63. The business data of the subnet host will be synchronized to the backbone network, but cannot be synchronized to other subnets.
[0066] It should be noted that the numbers 1), 2), 3), 4), and 5) are only used to distinguish paragraphs and do not limit the order.
[0067] Embodiment 3: The embodiment of the present invention provides a data transmission method based on CAN and Ethernet multi-media networking. The data transmission method based on CAN and Ethernet multi-media networking is applied to the CAN and Ethernet multi-media networking system provided in Embodiment 2.
[0068] In the multi-media networking system based on CAN and Ethernet, each subnet is networked in a manner that the same CAN communication baud rate is used within the subnet, and the CAN communication baud rates of different subnets can be different; then each subnet is networked through Ethernet to form a backbone network.
[0069] Figure 3 The implementation process of the data transmission method based on the multi-media networking of CAN and Ethernet is shown. Specifically, referring to steps S21-23, the data transmission method based on the multi-media networking of CAN and Ethernet includes:
[0070] S21: Send the command data of the main network host to all subnets;
[0071] In step S21, the command data includes: time synchronization data, system inspection data, reset data, startup data, mute data, shielding data, manual-automatic switching data, remote sound control data, bus manual control prohibition / permission data, sound and light control data, special fault display data, self-test data, shielding status data, single-point test status data, linkage alternating alarm data, linkage startup data, topology configuration synchronization data, etc.
[0072] S22: The network information data of the backbone network host is transmitted only in the backbone network and not sent to any subnet;
[0073] In step S22, the network information data includes: host IP / MAC / host number information data, IP / MAC / host number conflict information data, IP query request information data, IP query response information data, etc.
[0074] S23: Synchronize the service data of the subnet host to the backbone network; wherein, there is no interaction of command data and service data between the subnets.
[0075] In step S23, the business data includes: host fire alarm data, host fault data, host feedback data, host request data, etc.
[0076] It should be understood that, for ordinary technical workers in the field, improvements or changes can be made based on the above description, and all these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A multi-media networking method based on CAN and Ethernet, characterized in that: The method comprises: Establishing multiple CAN bus networks, each of which includes multiple hosts connected to the network via the CAN bus; each of the CAN bus networks serves as a subnet; All hosts in the same subnet are configured with the same CAN communication baud rate; hosts in different subnets are configured with the same or different CAN communication baud rates; Host No. 1 in each of the subnets is selected, and networking is performed through Ethernet to form a backbone network; all hosts on the backbone network are configured with numbers on the backbone network to which they belong.
2. The multi-media networking method based on CAN and Ethernet according to claim 1, characterized in that: The number of hosts in the subnet is n, and the host numbers in the subnet are sequentially set to 1 to n, where n is a positive integer greater than 1; The hosts in the subnet support peer-to-peer mode or master-slave mode when setting networking registration information: the peer-to-peer mode of the hosts in the subnet is that each host registers the numbers of all hosts in the subnet; the master-slave mode of the hosts in the subnet is that the host numbered 1 in the subnet registers the numbers of all other hosts in the subnet, and other hosts other than No. 1 in the subnet only register No. 1 host in the subnet.
3. The multi-media networking method based on CAN and Ethernet according to claim 2, characterized in that: The number of hosts in the backbone network is m, and the host numbers in the backbone network are sequentially set to 1 to m, where m is a positive integer greater than 1; When the hosts in the backbone network set the networking registration information, the peer mode or the master-slave mode is also supported: the peer mode of the hosts in the backbone network is that each host registers the numbers of all the hosts in the backbone network; the master-slave mode of the hosts in the backbone network is that the host numbered No. 1 in the backbone network registers the numbers of all other hosts in the backbone network, and other hosts other than No. 1 in the backbone network only register No. 1 host of the backbone network.
4. The multi-media networking method based on CAN and Ethernet according to claim 3, characterized in that: The backbone network supports Ethernet virtual subnet division, and the Ethernet virtual subnet is a grouping relationship between hosts formed by the backbone network host software configuration. The method of dividing the Ethernet virtual subnet is: Select any host from number 1 to m as the root node of the Ethernet virtual subnet, and then select one or more hosts from number 2 to m as child nodes of the root node to construct an Ethernet virtual subnet; wherein, Except for host No. 1 of the backbone network, any other hosts of the backbone network can only be divided into one Ethernet virtual subnet.
5. The multi-media networking method based on CAN and Ethernet according to claim 4, characterized in that: When the backbone network is a peer-to-peer network or contains an Ethernet virtual subnet, all hosts in the backbone network are configured to the same IP network segment; when the backbone network is a master-slave network, any host other than host No. 1 in the backbone network can be reached via Ethernet routing.
6. The multi-media networking method based on CAN and Ethernet according to any one of claims 2 to 5, characterized in that: The subnet supports CAN virtual subnet division. The CAN virtual subnet is a grouping relationship between hosts formed by the subnet host software configuration. The method of dividing the CAN virtual subnet is: Select any host from number 1 to n as the root node of the CAN virtual subnet, and then select one or more hosts from number 2 to n as the child nodes of the root node to construct a CAN virtual subnet; wherein, Except for host No. 1 of the subnet, any other hosts of the subnet can only be divided into one CAN virtual subnet.
7. A multi-media networking system based on CAN and Ethernet, comprising network equipment, Ethernet networking and multiple CAN bus networks, characterized in that: The Ethernet networking and multiple CAN bus networking establish a hybrid network through the multi-media networking method based on CAN and Ethernet described in any one of claims 1-6, and the network device establishes a connection with the host in the hybrid network through Ethernet.
8. The CAN and Ethernet-based multimedia networking system according to claim 7, characterized in that: Each host in the backbone network supports configuring a static IP address through the operation interface; the static IP, multicast address and DHCP address pool of the local machine can be configured through host No. 1 of the backbone network, and hosts other than host No. 1 of the backbone network can choose to obtain the local address through DHCP.
9. The CAN and Ethernet-based multi-media networking system according to claim 8, characterized in that: When statically configured, all hosts in the backbone network use the system's unified default multicast IP address and port; When DHCP allocates addresses, other hosts in the backbone network all use the multicast IP address and port configured by host No.
1.
10. A data transmission method based on CAN and Ethernet multi-media networking, characterized in that: The method is applied to the CAN and Ethernet-based multimedia networking system according to any one of claims 7 to 9; the method comprises: Send the command data of the backbone network host to all subnets; The network information data of the backbone network host is transmitted only on the backbone network and is not sent to any of the subnets; The business data of the subnet host is synchronized to the backbone network; wherein, there is no interaction of command data and business data between the subnets.