Data transmission method and device

By setting up a preset LAN group in the elevator networking system and using the first network device to forward data through the wireless LAN, the problem of waste of traffic and high operating costs when the control device issues the same data resources to multiple elevator routers is solved, and the effect of traffic saving and cost reduction is achieved.

CN113573364BActive Publication Date: 2025-03-25HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110698684.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-06-02
Publication Date
2025-03-25
Estimated Expiration
2037-06-02

AI Technical Summary

Technical Problem

In elevator networking, when the control device sends the same data resources to the elevator router, it needs to send it to each elevator router through a cellular network, resulting in waste of traffic and increased operating costs.

Method used

By setting a preset LAN group in the system, the first network device receives data sent by the control device through the cellular network and forwards the data to the second network device through the wireless LAN, thereby avoiding independent transmission of data to each network device.

Benefits of technology

It saves network traffic of cellular networks, reduces operating costs, and avoids the occurrence of network equipment being de-pipeed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113573364B_ABST
    Figure CN113573364B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the field of communication technology, and in particular to a data transmission method and device, the method comprising: a first network device receives first target data sent by a control device via a cellular network, the first target data including an identifier of a second network device; the first network device forwards the first target data to the second network device via a wireless local area network; wherein the first network device is a master device of a preset local area network group, the second network device is a slave device of the first network device in the preset local area network group, and the preset local area network group is composed of the first network device and all network devices in multiple network devices that communicate with the first network device. It can be seen that the implementation of the embodiment of the present application can save operating costs when the control device sends the same data resources to the elevator router.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method and device. Background Art

[0002] With the advancement of urbanization, more and more people are migrating to cities and the number of elevators is growing. Remote management and predictive maintenance of elevators have become particularly important, and an elevator network has been established for this purpose.

[0003] In the elevator network, the elevator router is a bridge connecting the elevator sensor network and the wide area network. The elevator router connects to the elevator sensor terminal through the asynchronous transmission standard interface RS232, the smart instrument RS485 and other serial ports to achieve data collection and access, and uses a cellular network (cellular network, or mobile network), such as Long-Term Evolution (LTE), third generation (3G) mobile communication technology, fourth generation (4G) mobile communication technology, or fifth generation (5G) mobile communication technology, to connect to the control device and upload the collected data to the control device for analysis and monitoring by the control device.

[0004] However, it has been found in practice that if the control device sends the same data resources such as upgraded versions and media resources to the elevator routers in the elevator network, it is necessary to send the data resources through the cellular network link established with each elevator router, which wastes traffic and increases operating costs. Summary of the invention

[0005] The present application provides a data transmission method and device, which can save operating costs when a control device sends the same data resources to an elevator router.

[0006] In a first aspect, a data transmission method is provided, which is used in a system including a control device and a plurality of network devices, wherein the plurality of network devices include a first network device and a second network device, the method comprising:

[0007] The first network device receives first target data sent by the control device through the cellular network, wherein the first target data includes an identifier of the second network device; the first network device forwards the first target data to the second network device through the wireless local area network.

[0008] Among them, the first network device is the master device of the preset local area network group, the second network device is the slave device of the first network device in the preset local area network group, and the preset local area network group consists of the first network device and all network devices among multiple network devices that communicate with the first network device through the wireless local area network.

[0009] It can be seen that when the control device sends the same data resources to the multiple network devices, the control device only needs to send the data resources once to the first network device, that is, the master device of the preset local area network group, through the cellular network, so that the first network device can forward the data resources to the second network device, that is, the slave device of the master device in the preset local area network group, through the wireless local area network. This avoids the need in the prior art for the control device to send the data resources once to each of the multiple network devices through the cellular network, thereby saving the network traffic of the cellular network and reducing the operating costs.

[0010] In one possible design, before the first network device receives the first target data sent by the control device through the cellular network, the first network device can initiate an Internet packet explorer (packet Internet groper, ping) to each network device among the multiple network devices except itself, and record a first number of network devices that the first network device can ping; the first network device determines itself as the master device of a preset local area network group based on the first number, and determines other network devices in the preset local area network group except the first network device as slave devices.

[0011] Furthermore, the first network device may compare the first number with a second number of network devices that can be pinged by other network devices in a preset local area network group; when the first number is the largest, determine that the first network device is the master device of the preset local area network group; when the first number and the second number are both the largest, determine that the first network device is the master device of the preset local area network group according to a random principle; or, determine that the first network device is the master device of the preset local area network group according to the size of the electronic serial number.

[0012] In another possible design, the first network device can also receive second target data sent by the second network device via the wireless local area network, where the second target data includes an identifier of the control device, and the first network device forwards the second target data to the control device via the cellular network.

[0013] In yet another possible design, when it is detected that the first network device cannot communicate normally with the control device, the first network device determines a new master device from other network devices in a preset local area network group except the first network device.

[0014] It can be seen that when implementing the present application, when the first network device, that is, the master device of the preset local area network group, cannot communicate normally with the control device, the first network device can re-select a new master device, so that the first network device can communicate with the control device through the new master device, thereby avoiding the occurrence of network device out-of-control situation.

[0015] In yet another possible design, when it is detected that the first network device cannot communicate normally with the second network device, the first network device may determine itself as the new master device.

[0016] In another possible design, when it is detected that the second network device cannot communicate normally with other network devices in the preset local area network group, the second network device can determine itself as the new master device, so that the second network device can communicate directly with the control device through the cellular network.

[0017] In a second aspect, a first network device is provided, comprising a module or unit for executing the method in the first aspect.

[0018] In a third aspect, another first network device is provided, comprising a processor, a communication module and a memory, wherein the memory is used to store instructions. The processor is used to read the instructions in the memory to execute the method of the first aspect.

[0019] In a fourth aspect, a communication system is provided, the system comprising: a control device and a plurality of network devices. The plurality of network devices may form one or more local area network groups, each of which includes a master device. The control device may send information such as upgrades and configurations to the master device in the local area network group through a cellular network, and the master device then forwards information to the slave devices in the local area network group through a wireless local area network. The master device also receives information such as data, alarms or faults reported by the slave device through the wireless local area network, and then forwards it to the control device through the cellular network, thereby implementing the method in the first aspect above.

[0020] In a fifth aspect, a computer storage medium is provided for storing computer software instructions, which, when executed on a computer, causes the computer to execute the method in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 It is a network architecture diagram in the prior art;

[0023] Figure 2 It is a flowchart of a data transmission method provided by an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of another network architecture provided in an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of another network architecture provided in an embodiment of the present application;

[0026] Figure 5 is a schematic diagram of another network architecture provided in an embodiment of the present application;

[0027] Figure 6 is a schematic diagram of another network architecture provided in an embodiment of the present application;

[0028] Figure 7 is a schematic diagram of another network architecture provided in an embodiment of the present application;

[0029] Figure 8 is a structural diagram of a first network device provided in an embodiment of the present application;

[0030] Fig. 9 is a structural diagram of another first network device provided in an embodiment of the present application;

[0031] Fig.10 is a structural diagram of another first network device provided in an embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of a communication system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0034] See also Figure 1 , a schematic diagram of a prior art network architecture is provided, the network includes a control device and N=6 network devices, the control device communicates directly with each of the N network devices through a cellular network. The N network devices may include routers, switches, access devices, mobile devices, wireless communication devices, user agents or user devices, etc.

[0035] However, if Figure 1 As shown, when the control device C sends the same data resources to the network devices R1 to R6, the control device C sends the data resources to the network devices R1 to R6 through the cellular network links CR1, CR2, CR3, CR4, CR5 and CR6 established with the network devices R1 to R6, respectively, resulting in a waste of traffic.

[0036] The present application provides a data transmission method, which can save traffic and reduce operating costs. Figure 2 As shown, the data transmission method includes but is not limited to the following steps:

[0037] S201. A first network device initiates a ping to each network device among multiple network devices except itself, and records a first number of network devices that can be pinged by the first network device.

[0038] The first network device is one of the multiple network devices.

[0039] The control device may pre-store the addresses of the multiple network devices, such as the Internet Protocol (IP) address, the media access control (MAC) address or the port number of the network device, and send the addresses of the multiple network devices to each of the multiple network devices. After the first network device receives the addresses of the multiple network devices sent by the control device, it may initiate an Internet packet explorer (Ping) to each network device other than itself through a wireless local area network (WLAN) according to the received address, and record the first number of network devices that the first network device can ping, wherein the wireless local area network may adopt technologies such as Wireless Fidelity (WI-FI), Bluetooth or ZigBee.

[0040] For example, see Figure 3 A schematic diagram of another network architecture is provided, in which the control device can pre-store the addresses of the multiple network devices R1 to R6 in the form of a list as shown in Table 1, wherein the addresses of R1 to R6 are IP1, IP2, IP3, IP4, IP5, and IP6 respectively. The control device sends the address to each of the multiple network devices. Assume that the first network device is R1, the first network device R1 receives the address sent by the control device, and initiates a ping to the other network devices R2 to R6 except itself according to the address. Figure 3 As shown, the network devices that the first network device R1 can ping are R1, R3 and R5 respectively, and the first number of network devices that the first network device R1 can ping is 3.

[0041] Table 1 Address list

[0042] The address of the network device IP1 IP2 IP3 IP4 IP5 IP6

[0043] S202: The first network device determines itself as a master device of a preset local area network group according to the first number, and determines other network devices in the preset local area network group except the first network device as slave devices.

[0044] The preset local area network group may be composed of the first network device and all network devices in the above-mentioned multiple network devices that communicate with the first network device through the wireless local area network. It should be noted that all network devices in the multiple network devices that communicate with the first network device may be network devices in the multiple network devices that can directly or indirectly communicate with the first network device through the wireless local area network.

[0045] Furthermore, the first network device can obtain a second number of network devices that can be pinged by other network devices in the preset LAN group, and compare the first number with the second number. When the first number is the largest, it determines itself as the master device of the preset LAN group, and determines other network devices in the preset LAN group except itself as slave devices.

[0046] For example, Figure 3 As shown, each network device among the multiple network devices R1 to R6 can initiate a ping to other network devices except itself through the wireless local area network;

[0047] The network devices that R1 can ping are R1, R3, and R5, so the number of R1 is 3;

[0048] The network devices that R2 can ping are R1 and R5, so the number of R2 is 2;

[0049] The network devices that R3 can ping are R1 and R4, so the number of R3 is 2;

[0050] The network device that R4 can ping is R3, so the number of R4 is 1;

[0051] The network devices that R5 can ping are R1 and R2, so the number of R5 is 2;

[0052] R6 has no pingable network devices, so the number of R6 is 0.

[0053] The network devices that R1 directly communicates with are R2 to R5, and R1 and R4 can communicate indirectly (through R3). From the perspective of R1, the preset LAN group consists of R1, the network devices R2, R3 and R5 that communicate directly with R1, and the network device R4 that communicates indirectly with R1.

[0054] R1 can obtain the number of network devices that can be pinged by the other network devices R2, R3, R4 and R5 in the preset LAN group, and obtain a summary table of the number of network devices that can be pinged as shown in Table 2, which includes the identifiers of all network devices R1 to R5 in the preset LAN group, and the number of network devices that can be pinged by each of them. According to the summary table, R1 can determine that the number of network devices that it can ping is the largest, that is, the number of network devices that R1 can ping is the first number, so it determines that it is the master device of the preset LAN group, and the other network devices R2, R3, R4 and R5 in the preset LAN group are slave devices.

[0055] Table 2 Summary of the number of network devices that can be pinged

[0056]

[0057]

[0058] S203: The first network device receives first target data sent by the control device through the cellular network.

[0059] S204: The first network device forwards the first target data to the second network device through the wireless local area network, wherein the second network device is a slave device of the first network device in the preset local area network group.

[0060] The first target data is data sent by the control device to the second network device.

[0061] Specifically, in S202, after the first network device determines that it is the master device of the preset local area network group and the second network device is the slave device of the first network device in the preset local area network group, the control device can obtain the address of the first network device corresponding to the second network device in the preset local area network group, and the control device maintains a mapping table, which includes the address of the first network device corresponding to the second network device. When the control device sends the first target data to the second network device, the control device can query the address of the first network device corresponding to the second network device according to the mapping table, and the control device sends the first target data to the first network device according to the queried address of the first network device.

[0062] The first target data may include an identifier of the second network device, wherein the identifier may be used to uniquely identify a device in the network. After the first network device receives the first target data sent by the control device via the cellular network, the first network device may parse the first target data to obtain the identifier of the second network device, and forward the first target data to the second network device according to the identifier of the second network device obtained by parsing.

[0063] Combination Figure 3For example, the first network device is R1, and the second network devices are R2, R3, R4, and R5. The mapping table maintained by the control device includes the identifiers of the second network devices R2, R3, R4, and R5, and the address IP1 of the first network device corresponding to the second network device. When the control device sends the first target data to the second network devices R2, R3, R4, and R5, the control device can query the address IP1 of the first network device corresponding to the second network devices R2, R3, R4, and R5 according to the mapping table, and the control device sends the first target data to the first network device R1 according to the queried address IP1 of the first network device. Among them, the first target data includes the identifiers of the second network devices R2, R3, R4, and R5. After the first network device R1 receives the first target data sent by the control device, the first network device R1 can parse out the identifiers R2, R3, R4, R5 of the second network devices carried by the first target data, and forward the first target data to the second network devices R2, R3, R4, R5 according to the parsed identifiers R2, R3, R4, R5 of the second network devices.

[0064] For another example, when the control device sends the first target data to the second network device R2, the control device can query the address IP1 of the first network device corresponding to the second network device R2 according to the mapping table, and the control device sends the first target data to the first network device R1 according to the queried address IP1 of the first network device. The first target data includes the identifier R2 of the second network device. After the first network device R1 receives the first target data sent by the control device, the first network device R1 can parse out the identifier R2 of the second network device carried in the first target data, and forward the first target data to the second network device R2 according to the parsed identifier R2 of the second network device, etc.

[0065] Table 3 Mapping table

[0066]

[0067]

[0068] It can be seen that when the control device sends the same data resources to the multiple network devices, the control device only needs to send the data resources once to the first network device, that is, the master device of the preset local area network group, through the cellular network, so that the first network device can forward the data resources to the second network device, that is, the slave device of the master device in the preset local area network group, through the wireless local area network. This avoids the need in the prior art for the control device to send the data resources once to each of the multiple network devices through the cellular network, thereby saving the network traffic of the cellular network and reducing the operating costs.

[0069] In the embodiment of the present application, the first network device may also receive second target data sent by the second network device via the wireless local area network, wherein the second target data includes the identification of the control device; the first network device forwards the second target data to the control device via the cellular network, etc. The second target data is data sent by the second network device to the control device.

[0070] In another optional embodiment, the first network device as the master device of the preset LAN group can send a heartbeat message to the control device to determine whether it can communicate normally with the control device. If the first network device fails to receive a response to the heartbeat message sent by the control device, it is determined that it cannot communicate normally with the control device. When it is detected that the first network device cannot communicate normally with the control device, the first network device can determine a new master device from other network devices in the preset LAN group except the first network device. The new master device can receive data sent by the control device and forward the data to other network devices in the preset LAN group. In addition, the new master device can also receive data sent by other network devices in the preset LAN group and forward the data to the control device, thereby avoiding the occurrence of network device out-of-control situations.

[0071] Specifically, the first network device may determine that the network device with the largest number of pingable network devices among the other network devices except the first network device in the preset local area network group is the new master device. When there are multiple network devices with the largest number of pingable network devices, the first network device may determine any one of them as the new master device according to a random principle, or determine any one of them as the new master device according to the size of the electronic serial number (ESN). The first network device may also determine that the other network devices except the new master device in the preset local area network group are new slave devices.

[0072] For example, Figure 4 A schematic diagram of another network architecture is provided. Figure 4 Shown is Figure 3 In the network architecture, the first network device R1 and the control device cannot communicate normally. Figure 4 As shown, the numbers of pingable network devices of the other network devices R2, R3, R4 and R5 except the first network device R1 in the preset local area network group GROUP1 are 2, 2, 1 and 2 respectively, among which the numbers of pingable network devices of R2, R3 and R5 are the largest. Then, the first network device R1 determines any one R2 of R2, R3 and R5 as the new master device according to the random principle, and determines the remaining network devices R1, R3, R4 and R5 in the preset local area network group GROUP1 as slave devices.

[0073] exist Figure 4 On the basis of Figure 5 The new master device R2 shown can receive data sent by the control device through the cellular network, and forward the data to one or more of the corresponding slave devices R1, R3, R4 and R5 through the wireless local area network; the new master device R2 can also receive data sent by one or more of the corresponding slave devices R1, R3, R4 and R5 through the wireless local area network, and forward the data to the control device.

[0074] In another optional embodiment, the first network device as the master device of the preset local area network group can also send a heartbeat message to the corresponding second network device to determine whether normal communication with the second network device is possible. When it is detected that the first network device and the second network device cannot communicate normally, the first network device can determine itself as the new master device.

[0075] In addition, other network devices in the preset local area network group can determine a new master device and a new slave device according to the above-mentioned related methods, thereby avoiding the occurrence of network devices being out of management.

[0076] For example, Figure 6 A schematic diagram of another network architecture is provided. Figure 6 Shown is Figure 3 In the network architecture, the first network device R1 of the preset local area network GROUP1 cannot communicate normally with the corresponding second network devices R2, R3, and R5. The first network device R1 can determine itself as the new master device.

[0077] exist Figure 4 Based on Figure 7 As shown, other network devices R2 and R5 of the preset LAN GROUP1 communicate with each other and can form a LAN group. In this LAN group, the number of network devices that can be pinged by R2 and R5 are 1 and 1 respectively. Therefore, it can be determined that any one R2 among R4 and R5 is the new master device in the LAN group, and the other R5 is the new slave device in the LAN group.

[0078] The other network devices R3 and R4 of the preset LAN GROUP1 communicate with each other and can form a LAN group. In this LAN group, the number of network devices that R3 can ping is 1, and the number of network devices that R4 can ping is also 1. Therefore, it can be determined that any one of R3 and R4 is the new master device in the LAN group, and the other R3 is the new slave device in the LAN group.

[0079] In another optional embodiment, the second network device as a slave device of the preset LAN group can also send a heartbeat message to other network devices of the preset LAN group to determine whether the other network devices of the preset LAN group can communicate normally. When it is detected that the second network device cannot communicate normally with other network devices of the preset LAN group, the second network device can determine itself as the new master device.

[0080] The other network devices in the preset local area network group except the second network device can determine the new master device and the new slave device according to the above-mentioned related methods, thereby avoiding the occurrence of the situation where the network device is out of management.

[0081] In addition, in the present application, the ping data packet sent by the network device may include device information such as the device model and device manufacturer, ensuring that only network devices of the same manufacturer or model in the network can be pinged and networked.

[0082] Based on the same technical concept as the above method embodiment, the present application embodiment also provides a network device for implementing the first network device in the above method embodiment. Figure 8 , is a schematic diagram of the structure of a first network device provided in an embodiment of the present application, the first network device includes:

[0083] The receiving unit 801 is configured to receive first target data sent by a control device via a cellular network, where the first target data includes an identifier of a second network device.

[0084] The sending unit 802 is used to forward the first target data to the second network device through the wireless local area network.

[0085] Among them, the first network device is the master device of the preset local area network group, the second network device is the slave device of the first network device in the preset local area network group, and the preset local area network group consists of the first network device and all network devices among multiple network devices that communicate with the first network device through a wireless local area network.

[0086] The embodiments of the present application may refer to the above-mentioned related descriptions and will not be repeated here.

[0087] Furthermore, if Fig. 9 As shown, the first network device further includes a processing unit 803 .

[0088] The sending unit 801 is further configured to initiate a ping to each network device except the first network device among the multiple network devices before receiving the first target data sent by the control device through the cellular network.

[0089] The processing unit 803 is used to record a first number of network devices that the first network device can ping, and determine itself as a master device of a preset local area network group according to the first number, and determine other network devices in the preset local area network group except the first network device as slave devices.

[0090] Specifically, when the first number is the largest, the first network device is determined to be the master device of the preset local area network group.

[0091] When the first number and the second number are both the maximum, the first network device is determined as the master device of the preset local area network group according to a random principle; or, according to the size of the electronic serial number, the first network device is determined as the master device of the preset local area network group.

[0092] In an optional implementation, the receiving unit 801 is further configured to receive second target data sent by the second network device via the wireless local area network, where the second target data includes an identifier of the control device.

[0093] The sending unit 802 is further configured to forward the second target data to the control device via the cellular network.

[0094] In an optional implementation, the processing unit 803 is further configured to, when it is detected that the first network device cannot communicate normally with the control device, determine a new master device from other network devices in a preset local area network group except the first network device.

[0095] It can be seen that when the control device sends the same data resources to the multiple network devices, the control device only needs to send the data resources once to the first network device, that is, the master device of the preset local area network group, through the cellular network, so that the first network device can forward the data resources to the second network device, that is, the slave device of the master device in the preset local area network group, through the wireless local area network. This avoids the need in the prior art for the control device to send the data resources once to each of the multiple network devices through the cellular network, thereby saving the network traffic of the cellular network and reducing the operating costs.

[0096] See also Fig.10 , is another structural diagram of the first network device provided in the embodiment of the present application. Fig.10 As shown, the first network device includes a processor 1001 , a memory 1002 , a cellular network chip 1004 and a WLAN chip 1003 .

[0097] The processor 1001 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0098] The processor 1001 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0099] The memory 1002 may include a volatile memory (English: volatile memory), such as a random-access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 410 may also include a combination of the above-mentioned types of memory.

[0100] The processor 1001 and the memory 1002 are connected to each other, for example, via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory 1002 and the processor 1001 can be independently provided or integrated together.

[0101] The memory 1002 is used to store the address of each network device.

[0102] The memory 1002 may also be used to store a summary table of the number of pingable network devices as shown in Table 2, a mapping table as shown in Table 3, and the like.

[0103] Processor 1001 is used to receive first target data sent by a control device through a cellular network chip 1004, wherein the first target data includes an identifier of a second network device through the cellular network chip 1004; and forward the first target data to a second network device through a WLAN chip 1003; wherein the first network device is a master device of a preset local area network group, and the second network device is a slave device of the first network device in the preset local area network group, and the preset local area network group is composed of the first network device and all network devices in a plurality of network devices that communicate with the first network device.

[0104] Optionally, the memory 1002 may also be used to store program instructions, and the processor 1001 calls the program instructions stored in the memory 1002 to execute Figure 2 One or more steps in the illustrated embodiment, or optional implementation methods thereof, thereby realizing the function of the first network device in the above method.

[0105] Furthermore, the first network device also includes a communication interface connected to the elevator sensor, such as RS232, RS485, etc.

[0106] It can be seen that when the control device sends the same data resources to the multiple network devices, the control device only needs to send the data resources once to the first network device, that is, the master device of the preset local area network group, through the cellular network, so that the first network device can forward the data resources to the second network device, that is, the slave device of the master device in the preset local area network group, through the wireless local area network. This avoids the need in the prior art for the control device to send the data resources once to each of the multiple network devices through the cellular network, thereby saving the network traffic of the cellular network and reducing the operating costs.

[0107] See also Fig.11 , a schematic diagram of a communication system is provided for an embodiment of the present application. The system includes: a control device and multiple network devices. The multiple network devices can form one or more local area network groups, each of which includes a master device. The control device can send upgrade, configuration and other information to the master device in the local area network group through the cellular network, and the master device then forwards it to the slave devices in the local area network group through the wireless local area network. The master device also receives data, alarms or faults reported by the slave device through the wireless local area network, and then forwards it to the control device through the cellular network, thereby achieving the above Figure 2 The method in the illustrated embodiment.

[0108] It can be seen that when the control device sends the same data resources to the multiple network devices, the control device only needs to send the data resources once to the first network device, that is, the master device of the preset local area network group, through the cellular network, so that the first network device can forward the data resources to the second network device, that is, the slave device of the master device in the preset local area network group, through the wireless local area network. This avoids the need in the prior art for the control device to send the data resources once to each of the multiple network devices through the cellular network, thereby saving the network traffic of the cellular network and reducing the operating costs.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0110] The above-mentioned software function part can be stored in a storage unit. The storage unit includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the method described in each embodiment of the present application. The storage unit includes: one or more memories, such as a read-only memory (ROM), a random access memory, an electrically erasable programmable read-only memory (EEPROM), etc. The storage unit can exist independently or be integrated with the processor.

[0111] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0112] A person skilled in the art may understand that the various numerical numbers such as first and second involved in this document are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0113] A person of ordinary skill in the art will understand that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0114] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State DisB (SSD)), etc.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data transmission method, used in a system including a control device and a plurality of network devices, wherein the plurality of network devices include a first network device and a second network device, characterized in that: The method comprises: The first network device determines that it is a master device of a preset local area network group according to a first number of network devices that can be pinged with each network device other than itself among the multiple network devices, and determines that other network devices other than the first network device in the preset local area network group are slave devices, wherein the preset local area network group is composed of the first network device and network devices among the multiple network devices that communicate with the first network device through a wireless local area network; The first network device receives first target data sent by the control device through a cellular network, wherein the first target data includes an identifier of the second network device, and the second network device is a slave device of the first network device in the preset local area network group; The first network device forwards the first target data to the second network device through a wireless local area network.

2. The method according to claim 1, characterized in that The first network device determines that it is a master device of a preset local area network group according to a first number of network devices that can be pinged by each network device other than itself among the multiple network devices, including: The first network device determines, according to the first number of pingable network devices and the second number of pingable network devices, that the first network device is the master device of the preset local area network group; Among them, the first number is the number of network devices that the first network device can ping with each network device among the multiple network devices except itself; the second number is the number of network devices that other devices can ping with each network device among the multiple network devices except itself.

3. The method according to claim 2, characterized in that The first network device determines that the first network device is the master device of the preset local area network group according to the first number of the pingable network devices and the second number of the pingable network devices, including: The first network device initiates an Internet packet explorer ping to each network device among the plurality of network devices except itself, and records a first number of the pingable network devices; Acquire the second number of the pingable network devices of other network devices in the preset local area network group; the first network device compares the first number of the pingable network devices with the second number of the pingable network devices; When the first number is the largest, determining the first network device as the master device of the preset local area network group; When the first number and the second number are both the maximum, the first network device is determined as the master device of the preset local area network group according to a random principle; or, the first network device is determined as the master device of the preset local area network group according to the size of the electronic serial number.

4. The method according to claim 1, characterized in that: Also includes: The first network device receives second target data sent by the second network device via the wireless local area network, where the second target data includes an identifier of the control device; The first network device forwards the second target data to the control device through a cellular network.

5. The method according to claim 2, characterized in that: Also includes: The first network device receives second target data sent by the second network device via the wireless local area network, where the second target data includes an identifier of the control device; The first network device forwards the second target data to the control device through a cellular network.

6. The method according to claim 3, characterized in that Also includes: The first network device receives second target data sent by the second network device via the wireless local area network, where the second target data includes an identifier of the control device; The first network device forwards the second target data to the control device through a cellular network.

7. The method according to any one of claims 1 to 6, characterized in that: After the first network device forwards the first target data to the second network device through the wireless local area network, the method further includes: When it is detected that the first network device cannot communicate normally with the control device, the first network device determines a new master device from other network devices in the preset local area network group except the first network device.

8. The method according to claim 7, characterized in that Also includes: The first network device receives the third target data sent by the control device and sent by the second network device through the wireless local area network; or The fourth target data is sent to the second network device via a wireless local area network, and then sent to the control device by the second network device.

9. The method according to claim 7, characterized in that: Also includes: The first network device detects whether the first network device and the second network device can communicate normally; When it is detected that the first network device and the second network device cannot communicate normally, the first network device determines itself as a new master device.

10. The method according to claim 8, characterized in that Also includes: The first network device detects whether the first network device and the second network device can communicate normally; When it is detected that the first network device and the second network device cannot communicate normally, the first network device determines itself as a new master device.

11. The method according to claim 9, characterized in that The first network device detecting whether the first network device and the second network device can communicate normally includes: The first network device sends a heartbeat message to the corresponding second network device to detect whether the first network device and the second network device can communicate normally.

12. The method according to claim 10, characterized in that The first network device detecting whether the first network device and the second network device can communicate normally includes: The first network device sends a heartbeat message to the corresponding second network device to detect whether the first network device and the second network device can communicate normally.

13. The method according to claim 9 or 12, characterized in that: When the first network device and the second network device cannot communicate normally, the preset LAN group is divided into at least two LAN groups because the first network device and the second network device cannot communicate normally, and each LAN group includes a part of the second network devices.

14. The method according to claim 13, characterized in that Each second network device in a part of the second network devices included in each of the local area network groups re-determines the master device in each of the local area networks according to the number of network devices that can be pinged.

15. A network device, the network device being a first network device, characterized in that: The first network device comprises: a processing unit, configured to determine, based on a first number of network devices that can be pinged from each network device other than itself among the plurality of network devices, that it is a master device of a preset local area network group, and to determine that other network devices other than the first network device in the preset local area network group are slave devices, wherein the preset local area network group is composed of the first network device and network devices among the plurality of network devices that communicate with the first network device through a wireless local area network; A receiving unit, configured to receive first target data sent by a control device via a cellular network, wherein the first target data includes an identifier of a second network device; the second network device is a slave device of the first network device in the preset local area network group; A sending unit is used to forward the first target data to the second network device through a wireless local area network.

16. The network device according to claim 15, characterized in that: The processing unit determines that it is a master device of a preset local area network group according to a first number of network devices that can be pinged from each network device other than itself among the plurality of network devices, including: The processing unit is used to determine that the first network device is the master device of the preset local area network group according to the first number of the pingable network devices and the second number of the pingable network devices; Among them, the first number is the number of network devices that the first network device can ping with each network device among the multiple network devices except itself; the second number is the number of network devices that other devices can ping with each network device among the multiple network devices except itself.

17. The network device according to claim 16, characterized in that: The processing unit is used to determine that the first network device is the master device of the preset local area network group according to the first number of the pingable network devices and the second number of the pingable network devices, including: The processing unit is used to initiate an Internet packet explorer ping to each network device among the plurality of network devices except itself, and record the first number of the pingable network devices; The processing unit is used to obtain the second number of the pingable network devices of other network devices in the preset local area network group; The processing unit is configured to compare the first number of the pingable network devices with the second number of the pingable network devices; The processing unit is used for, when the first number is the largest, the first network device is the master device of the preset local area network group; The processing unit is used to determine that the first network device is the master device of the preset local area network group according to a random principle when the first number and the second number are both maximum; or, determine that the first network device is the master device of the preset local area network group according to the size of the electronic serial number.

18. The network device according to claim 15, characterized in that: The receiving unit is further configured to receive second target data sent by the second network device via the wireless local area network, wherein the second target data includes an identifier of the control device; The sending unit is further configured to forward the second target data to the control device via a cellular network.

19. The network device according to claim 16, characterized in that: The receiving unit is further configured to receive second target data sent by the second network device via the wireless local area network, wherein the second target data includes an identifier of the control device; The sending unit is further configured to forward the second target data to the control device via a cellular network.

20. The network device according to claim 17, characterized in that: The receiving unit is further configured to receive second target data sent by the second network device via the wireless local area network, wherein the second target data includes an identifier of the control device; The sending unit is further configured to forward the second target data to the control device via a cellular network.

21. The network device according to any one of claims 15 to 20, characterized in that: The processing unit is further configured to determine a new master device from other network devices in the preset local area network group except the first network device when it is detected that the first network device and the control device cannot communicate normally.

22. The network device according to claim 21, characterized in that: The processing unit is further configured to receive, via a wireless local area network, third target data sent by the control device and sent by the second network device; or The processing unit is further configured to send the fourth target data to the second network device via a wireless local area network, and then the second network device sends the fourth target data to the control device.

23. The network device according to claim 21, characterized in that: Also includes: The processing unit is further used to detect whether the first network device and the second network device can communicate normally; When it is detected that the first network device and the second network device cannot communicate normally, the first network device determines itself as a new master device.

24. The network device according to claim 22, characterized in that: Also includes: The processing unit is further used to detect whether the first network device and the second network device can communicate normally; When it is detected that the first network device and the second network device cannot communicate normally, the first network device determines itself as a new master device.

25. The network device according to claim 23, characterized in that: The processing unit is configured to detect whether the first network device and the second network device can communicate normally, including: The processing unit is used to send a heartbeat message to the corresponding second network device to detect whether the first network device and the second network device can communicate normally.

26. The network device according to claim 24, characterized in that: The processing unit is configured to detect whether the first network device and the second network device can communicate normally, including: The processing unit is used to send a heartbeat message to the corresponding second network device to detect whether the first network device and the second network device can communicate normally.

27. The network device according to claim 22 or 26, characterized in that: When the first network device and the second network device cannot communicate normally, the preset LAN group is divided into at least two LAN groups because the first network device and the second network device cannot communicate normally, and each LAN group includes a part of the second network devices.

28. The network device according to claim 27, characterized in that: Each second network device in a part of the second network devices included in each of the local area network groups re-determines the master device in each of the local area networks according to the number of network devices that can be pinged.

Citation Information

Patent Citations

  • Method and data for transmitting data between local area networks

    CN102833167A

  • Ping message processing method and device

    CN106506270A