CN115242860B - Concurrent data reporting method and system - Google Patents

Concurrent data reporting method and system Download PDF

Info

Publication number
CN115242860B
CN115242860B CN202210875447.8A CN202210875447A CN115242860B CN 115242860 B CN115242860 B CN 115242860B CN 202210875447 A CN202210875447 A CN 202210875447A CN 115242860 B CN115242860 B CN 115242860B
Authority
CN
China
Prior art keywords
slave
data
communication
address
concurrent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210875447.8A
Other languages
Chinese (zh)
Other versions
CN115242860A (en
Inventor
杨富友
葛松林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Opple Lighting Co Ltd
Suzhou Op Lighting Co Ltd
Original Assignee
Opple Lighting Co Ltd
Suzhou Op Lighting Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Opple Lighting Co Ltd, Suzhou Op Lighting Co Ltd filed Critical Opple Lighting Co Ltd
Priority to CN202210875447.8A priority Critical patent/CN115242860B/en
Publication of CN115242860A publication Critical patent/CN115242860A/en
Application granted granted Critical
Publication of CN115242860B publication Critical patent/CN115242860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/35Network arrangements, protocols or services for addressing or naming involving non-standard use of addresses for implementing network functionalities, e.g. coding subscription information within the address or functional addressing, i.e. assigning an address to a function
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a concurrent data reporting method and a system, wherein the concurrent data reporting method comprises the following steps: s1: the host device allocates continuous communication addresses to the same type of devices in the slave devices; s2: the host device composes the same event or state update data of the same type of devices in the slave device into a communication data packet and reports the communication data packet to the upper-level device of the host; the format of the communication data packet is coded by adopting a custom binary format. Compared with the prior art, the method and the system for reporting the concurrent data can improve the transmission rate and the response rate of the reporting of the batch concurrent data when the batch data is reported in a concurrent way, and solve the problem that the conventional method in the system requiring the reporting of the batch concurrent data is slow in response to the processing of the concurrent situation.

Description

Concurrent data reporting method and system
Technical Field
The invention relates to a concurrent data reporting method and system, and belongs to the technical field of fire protection networks.
Background
The fire emergency lighting evacuation system is generally composed of a two-stage network system, wherein the first-stage network system is composed of an emergency centralized power supply and an emergency lighting controller, and the second-stage network system is composed of emergency centralized power supply and related equipment such as an emergency indicator lamp.
Because the interval of each relevant equipment in the fire emergency lighting evacuation system is longer, in order to guarantee the stability of communication, the communication rate is generally set to be lower. For example, the communication rate of the two buses is generally 240bps, and the communication rate of the RS-485 bus is generally 4800bps. Moreover, in actual practice, one centralized power supply is provided with a plurality of indicator light devices, and one lighting controller is also provided with a plurality of centralized power supplies. When the equipment in the system generates an event or state change at the same time and needs to be reported to the illumination controller, the transmission rate and the response rate are low, and particularly when the centralized power supply is connected with the illumination controller in a low-speed RS-485 bus mode, the transmission rate and the response rate of reporting concurrent data become bottleneck problems of the fire emergency illumination evacuation system.
In view of the foregoing, it is necessary to provide a method and system for reporting concurrent data, so as to solve the above-mentioned problems.
Disclosure of Invention
The invention aims to provide a concurrent data reporting method and system, which can improve the transmission rate and response rate of concurrent data reporting.
In order to achieve the above purpose, the present invention provides a method for reporting concurrent data, which includes the following steps: s1: the host device allocates continuous communication addresses to the same type of devices in the slave devices; s2: the host device composes the same event or state update data of the same type of devices in the slave device into a communication data packet and reports the communication data packet to the upper-level device of the host device; the format of the communication data packet is coded by adopting a custom binary format.
As a further improvement of the present invention, there is also included: s3: and carrying application data information to replace independent keep-alive information when application data interaction requirements exist between the host equipment and the upper-level equipment.
As a further improvement of the present invention, the method of allocating communication addresses by the host device in step S1 is to allocate communication addresses manually according to the type arrangement of the slave devices, or the host device allocates communication addresses automatically.
As a further improvement of the present invention, the method for automatically allocating communication addresses by the host device reserves a corresponding address space for the host device according to the number of the slave devices of each type, and the slave devices of the same type continuously allocate communication addresses in the reserved corresponding address space.
As a further improvement of the invention, the method for automatically allocating communication addresses by the host device pre-allocates address spaces by the host device according to the types of the slave devices by a binary reservation method, and the slave devices of the same type continuously allocate communication addresses in the reserved corresponding address spaces.
As a further improvement of the invention, when a new slave device requests an address, if the new slave device is a slave device of a known type, the first idle communication address is allocated to the new slave device in an address space of the known type; if the new slave device is not the slave device of the known type, the new slave device is allocated with a new type of address space according to the binary reservation method, and the first free communication address is allocated for the new slave device in the new type of address space.
As a further improvement of the present invention, when the master device completely allocates the address space according to the kind of the slave device, the communication addresses of the slave devices are optimized so that the communication addresses of all the slave devices are continuous.
As a further improvement of the present invention, the format of the communication data packet in the step 2 is encoded by adding bits to the start address.
As a further development of the invention, the communication data packet comprises at least one set of communication data, each set of communication data comprising a description of the event or status update, the number and kind of slave devices in which the event or status update occurred, and the starting address of the batch of slave devices reporting the set of data.
As a further improvement of the present invention, the custom binary format includes: describing the event or state update reported in batch by using dataInfo and dataLen; the number and the positions of the slave devices reporting the group of data are positioned by using the bitMapValue and the bitMapMode; the start address of the batch slave device reporting the set of data is denoted with startAddr.
As a further improvement of the present invention, the custom binary format is defined in a byte or bit format; the dataInfo is independently defined according to actual information, and the length of the dataInfo is N bytes, wherein N is more than 0 and less than or equal to 8; the dataLen is configured to identify a field length of the dataInfo, and the length of the dataLen is 3 bits; the length of the bitMapValue is 18 bits, 0 or 1 represents whether the slave equipment of the bit is valid, the bitMapMode represents the number of the slave equipment represented by each bit in the bitMapValue, and the length of the bitMapValue is 3 bits; the startAddr represents a starting address of batch slave equipment reporting the group of data, and the length is 1 byte.
The invention also provides a concurrent data reporting system, which comprises a superior device and at least one host device which are connected by a low-speed network, wherein each host device comprises a plurality of slave devices, and each host device reports the concurrent data of the plurality of slave devices to the superior device according to the concurrent data reporting method.
The beneficial effects of the invention are as follows: compared with the prior art, the concurrent data reporting method can be used for carrying out rapid compression, arrangement and retransmission on the concurrent data of the batch of slave devices, can effectively improve the transmission rate and the response rate of the large batch of concurrent data reporting, and solves the problem that the conventional method in the concurrent data reporting system is slow in response to the concurrent condition.
Drawings
Fig. 1 is a flow chart of a concurrent data reporting method of the present invention.
Fig. 2 is a block diagram of a fire emergency system.
Fig. 3 is a logic diagram of communication address allocation in a concurrent data reporting method according to the present invention.
Fig. 4 is a schematic diagram of the address space binary reservation method of the present invention.
Fig. 5 is a schematic diagram of a communication data packet format of the present invention.
Fig. 6 is a data reporting mode diagram of a concurrent data reporting method according to the present invention.
Fig. 7 is a block diagram of a concurrent data reporting system according to the present invention.
Reference numerals illustrate:
1-upper level equipment, 2-host equipment and 3-slave equipment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In this case, in order to avoid obscuring the present invention due to unnecessary details, only the structures and/or processing steps closely related to the aspects of the present invention are shown in the drawings, and other details not greatly related to the present invention are omitted.
In addition, it should be further noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, the present invention provides a concurrent data reporting method, which includes the following steps: s1: the host device 2 assigns continuous communication addresses to the same type of devices in the slave device 3; s2: the host device 2 composes the same event or state update data of the same type of devices in the slave device 3 into a communication data packet and reports the communication data packet to the upper-level device 1 of the host; the format of the communication data packet is coded by adopting a custom binary format. Thus, the concurrent data of the plurality of slave devices 3 are consolidated and compressed through the host device 2, so that the concurrent data are rapidly reported to the upper-level device 1, and the response rate and the transmission rate of reporting a large amount of concurrent data are improved. For clarity of description, the following description will take an application of the concurrent data reporting method in a fire emergency system as an example, but should not be limited thereto.
Referring to fig. 2, the fire emergency system includes at least two network systems, wherein a first network system is composed of a lighting controller and a centralized power supply, and a second network system is composed of the centralized power supply and related devices such as an indicator light. The centralized power supply corresponds to the host device 2 in the present application, and the slave device 3 such as a plurality of indicator lamps is connected to the lower surface of the centralized power supply, and the centralized power supply (the host device 2) collates the batch concurrent data of the plurality of indicator lamps (the slave device 3) connected to the lower surface of the centralized power supply and reports the batch concurrent data to the lighting controller (i.e., the upper device 1).
Since the distance between the host device 2 and the upper level device 1 is long in the actual project of the fire emergency system, in order to ensure the stability of communication, the communication rate is set to be low, that is, the host device 2 and the upper level device 1 are usually connected by using a low-speed network, for example, the host device 2 and the upper level device 1 communicate through RS-485. Because the communication rate of the RS-485 bus is lower, and one lighting controller can be provided with 32 centralized power supplies, each centralized power supply can be provided with 400 indicating lamp devices, when the plurality of indicating lamp devices simultaneously generate events or state changes and need to be reported to the lighting controller, the information quantity of concurrent data which needs to be reported by the centralized power supplies is larger, the consumed time is longer, and the bottleneck of reporting response rate of the concurrent data of the fire emergency system is formed. For example, when the host device 2 and the previous-stage device 1 are in communication connection with each other through the RS-485, and the slave device 3 is in communication connection in a two-bus manner, assuming that the number of bytes of message data transmitted by the two buses and the RS-485 is the same, and calculated by a conventional method for reporting one message by event or state of a single slave device 3, taking a 4-byte message as an example, about 5.3 seconds is required for transmitting a plurality of slave devices 3 to the host device 2 through the two buses, and then about 85.3 seconds is required for reporting information of a plurality of slave devices 3 to the previous-stage device 1 by the host device 2, which seriously affects the corresponding rate and transmission rate of batch concurrent data reporting.
The invention distributes continuous communication addresses to the same type of equipment in the slave equipment 3, is convenient for the host equipment 2 to arrange the same event or state update data of the same type of equipment in the slave equipment 3 into a communication data packet to be reported to the upper-level equipment 1 of the host equipment 2, and adopts the custom binary format to encode the communication data packet, so that the host equipment 2 can rapidly compress and arrange the concurrent data of a plurality of slave equipment 3 and then transmit the concurrent data to the upper-level equipment 1, the transmission rate and the response rate of the report of a large amount of concurrent data can be effectively improved, and the problem of slow response of the conventional method for processing the concurrent condition in the fire emergency system is solved.
To maximize the data information encoding efficiency by combining the messages of the plurality of slave devices 3, the master device 2 can allocate successive communication addresses to the same type of slave devices 3 when allocating communication addresses of the plurality of slave devices 3.
In an embodiment, the method of allocating consecutive communication addresses by the host device 2 in step S1 may allocate communication addresses manually according to the type arrangement of the slave devices 3. That is, the addresses are manually allocated according to the arrangement of the types of the plurality of slave devices 3 hung under the centralized power supply (the host device 2) in the actual project, so that the devices of the same type obtain continuous communication addresses, and the host device 2 conveniently forms the same event or state update data of the plurality of slave devices 3 into a communication data packet to report to the upper-level device 1. For example, 80 double-sided safety exit signs and 30 single-sided safety exit signs are provided under the centralized power supply, and the communication address of [2, 81] can be allocated to the double-sided safety exit signs, and the communication address of [82, 111] can be allocated to the single-sided safety exit signs.
In an embodiment, the method of allocating consecutive communication addresses to the host device 2 in step S1 may automatically allocate communication addresses to the host device 2. Referring to fig. 3, the method of automatically allocating communication addresses by the host device 2 is divided into two types. When the number of each slave device 3 is known, the master device 2 reserves a corresponding address space according to the number of each type of slave device 3, and the slave devices 3 of the same type continuously allocate communication addresses in the reserved corresponding address space. I.e. the allocation is continued in the corresponding address space reserved by each type of slave device 3 when that type of slave device 3 requests allocation of a communication address. When the number of each slave device 3 is not known, the master device 2 pre-allocates an address space in a binary reservation method according to the kind of the slave device 3, and the slave devices 3 of the same type continuously allocate communication addresses in the reserved corresponding address space.
Specifically, referring to fig. 3-4, assuming that the available address space of the host device 2 is [2, 252], the first type a slave device 3 requests an address space allocation starting from the address space of 2 (No 1), and the first type B slave device 3 requests an address space allocation starting from the address space of 252 (No 2). The first slave device 3 of type C requests an address space allocation with an address space center of 127 (No 3), and the next slave device 3 of a new type requests an address space allocation with an address space center of 127 (No 3), sequentially among No1 to No3, no2 to No 3. When a new slave device 3 requests an address, if the new slave device 3 is a slave device 3 of a known kind, the new slave device 3 is allocated a first free communication address in an address space of a known kind. If the new slave device 3 is not a slave device 3 of a known kind, a new kind of address space is allocated to the new slave device 3 according to the binary reservation method, and a first free communication address is allocated to the new slave device 3 within the new kind of address space. For example, when the new slave device 3 is a slave device 3 of type a, the first free communication address is allocated to the new slave device 3 in the address space of the slave device 3 of type a, even if it is consecutive to the communication address of the previous slave device 3 of type a. When the new slave device 3 is a slave device 3 of the D type, an address space may be allocated between No1 to No3 for the slave device 3 of the D type and a first free communication address may be allocated between No1 to No3 for the slave device 3 of the D type.
When the host device 2 completely allocates the address space according to the type of the slave device 3, the communication addresses of all the slave devices 3 are optimized so that the communication addresses of all the slave devices 3 are continuous. That is, after all the slave devices 3 in the system are added, the communication addresses of all the slave devices 3 may be optimally ordered to remove redundant address space between each type of slave device 3, so that the address space of multiple types of slave devices 3 is continuous, i.e. the communication addresses of all the slave devices 3 are continuous, and no free communication address exists between the various types of slave devices 3, thereby saving the address space of the host device 2.
In order to improve the response speed of concurrent data reporting, the host device 2 and the upper device 1 perform custom binary data format coding based on the communication data format of a master-slave bus (for example, RS-485) network. By adopting the custom binary data format to encode concurrent data instead of encoding the data format with relatively low utilization rate, such as JSON, the response rate and the transmission rate of mass concurrent data reporting can be effectively improved.
Further, in step 2, the format of the communication data packet is encoded by adding bits to the start address, so that the batch of slave devices 3 are identified with higher utilization rate, and a packet of communication data can contain more reporting information of the slave devices 3. I.e. the communication data packet comprises at least one set of communication data, each set of communication data comprising a description of the event or status update, the number and kind of slaves 3 that have occurred the event or status update, and the start address of the batch of slaves 3 reporting the set of data.
The custom binary format includes: dataInfo and dataLen are used to describe batch reported events or status updates. The number of slaves reporting the set of data and their locations are located using bitMapValue and bitMapMode. The start address of the batch slave device reporting the set of data is denoted with startAddr.
Specifically, referring to fig. 5 and table 1, in this embodiment, the custom binary format is defined in a byte or bit format, including the description of the event or state update is defined in a byte or bit format, that is, dataInfo and dataLen are used to describe the event or state update reported in batch, for example, dataInfo is individually defined according to the information reported in actual need, and the length is N bytes, where 0 < N is less than or equal to 8, i.e., each dataInfo is 8 bytes at maximum. The dataLen is used to identify the dataInfo field length in bytes and the length is 3 bits, e.g., 111 represents 8 bytes. The mode of adding bit to the starting address of the slave device 3, in which an event or a state update occurs, is positioned. The startAddr is used to indicate the start address of the batch slave device 3 reporting the set of data, and the length is 1 byte. The number and the position of the slave devices reporting the group of data are positioned by the bitMapValue and the bitMapMode, namely the bitMapValue is used for representing the slave device 3, the length of the bitMapValue is 18 bits, 0/1 represents whether the slave device 3 is valid or not, namely each bit represents at least one slave device, and 1 represents that the slave device 3 of the bit is valid; 0 indicates that the slave device 3 of the bit is inactive. The number of slave devices 3 represented by each bit in the bitMapValue is represented by bitmapcode, and the length is 3 bits. For example, when bitMapMode is 001, each bit in bitMapValue represents 1 slave device 3, when bitMapMode is 010, each bit in bitMapValue represents 2 slave devices 3, when bitMapMode is 011, each bit in bitMapValue represents 8 slave devices 3, and when bitMapMode is 111, each bit in bitMapValue represents 16 slave devices 3.
Since information when the plurality of slave devices 3 report data concurrently may be different, for example, an indication light is turned on, a voice failure, or the like. A packet of communication data may contain all relevant information, and thus a packet of communication data may include multiple sets of communication data, each set of communication data having the same format, as shown in fig. 5.
Table 1 format of a set of communication data
Fields Length of Description of the invention
startAddr 1 byte Starting address of batch slave device reporting the set of data
bitMapMode 3 bits Representing the number of slave devices represented by each bit in bitMapValue
bitMapValue 18 bits 1 indicates that the bit slave device is active; 0 indicates invalidity
dataLen 3 bits Identification dataInfo field length, unit: bytes
dataInfo N bytes Individually defined according to actual information, a maximum of 8 bytes
Taking a fire emergency system as an example, when the lighting controller receives alarm information of the fire alarm host, the lighting controller (the upper-level device 1) sends out a control instruction, the centralized power supply (the host device 2) sends out a control instruction on two buses, the lighting and the extinguishing of the indicator lamp (the slave device 3) are controlled, and the status information of the indicator lamp (the slave device 3) needs to be fed back to the centralized power supply (the host device 2) and finally fed back to the lighting controller (the upper-level device 1). For example, there are 30 centralized power supplies under the lighting controller, 80 dual-side exit sign lamps, 30 single-side exit sign lamps, etc. are hung under each centralized power supply, and the centralized power supply can assign the communication address of [2, 81] to the dual-side exit sign lamps, and the communication address of [82, 111] to the single-side exit sign lamps. When the lighting controller sends out a control instruction and needs 80 double-sided safety exit marker lamps and 30 single-sided safety exit marker lamps to be lightened, the two-sided safety exit marker lamps 80 and 30 single-sided safety exit marker lamps need to feed back state information to the lighting controller.
At this time, if the two-sided safety exit sign lamps 80 are all in a lighting state, when the centralized power supply needs to feed back the data information to the illumination controller, the reported information is described through dataInfo and dataLen, and the positions of the 80 two-sided safety exit sign lamps are positioned in a mode of adding bit to the starting address. Specifically, dataInfo is defined as: the dual-sided safety exit lamp is turned on, at this time, dataLen is denoted as 111, that is, dataInfo is denoted as 8 bytes, startAddr is denoted as 2, that is, the starting address of the slave device 3 for batch reporting of data is 2, in 18 bits of bitmapvalue, 10 bits are 1, the remaining 8 bits are 0, and bitMapMode is displayed as 011, that is, the information that the 80 dual-sided safety exit lamps are in the on state can be reported to the centralized controller, that is, the 80 dual-sided safety exit lamps are in the on state can be reported through a group of communication data, and compared with the 80 dual-sided safety exit lamps in the conventional method, the response rate and the transmission rate are improved more than 80 times required to be reported.
When 72 of the 80 double-sided security egress signage lights are on and 8 of the 80 double-sided security egress signage lights are off, if the position information of the 72 on double-sided security egress signage lights can be located by bitMapValue and bitMapMode in a set of communication data (for example, the 80 double-sided security egress signage lights are 56 continuously on, 8 continuously off, 16 continuously on), then the dataInfo can still be defined as: the double-sided safety exit lamp is on, dataLen is shown as 111, startaddr is the first communication address in the 72 on double-sided safety exit sign lamps, namely 18 bits of 2, bitmapvalue, wherein 7 bits are 1 continuously, then 1 bit is 0, the two next bits are 1, the other 8 bits are 0, and bitMapMode is shown as 011, so that the information of the on of the 72 sign lamps and the position information thereof can be reported to the centralized controller through a group of communication data. Alternatively, dataInfo can be defined as: the double-sided safety exit lamp goes out, dataLen is denoted as 111, startaddr is the first communication address in the 8 unlit double-sided safety exit sign lamps, of the 18 bits of bitMapValue, of which consecutive 7 bits are 0, then 1 bit is 1, the next two bits are 0, the remaining 8 bits are 0, and bitmapcode is shown as 011. The present invention is not limited to this, and editing of data information may be performed by the centralized power supply (i.e., the host device 2) according to actual conditions. If the position information of the 72 bright double-sided safety exit marker lamps cannot be positioned by one set of communication data (for example, the positions of the 80 double-sided safety exit marker lamps cannot be represented by the bitMapValue of 18 bits and the bitMapMode of the characterization multiple), the positioning can be performed by multiple sets of communication data, the startAddr in each set of communication data is the first communication address in the bright double-sided safety exit marker lamps in the set of data, and then the centralized power supply integrates the multiple sets of communication data into one packet of communication data packet to report to the lighting controller so as to report the batch of concurrent data faster. It should be noted that, according to the actual situation, the centralized power source (i.e. the host device 2) can edit and sort data information of various slave devices 3 according to the customized binary data format, and then report the data information.
Similarly, when the information of the lighting of the single-sided safety exit sign lamp 30 needs to be reported, the information can also be reported by another group of communication data according to the method, and then the centralized power supply integrates the multiple groups of communication data of the single-sided safety exit sign lamp and the double-sided safety exit sign lamp into one communication data packet or two communication data packets to report to the lighting controller, so that batch concurrent data can be reported faster.
That is, as long as the number of the slave devices 3 that need to report event or status information is greater than or equal to 2, where the interval between the communication addresses of the two slave devices 3 is less than or equal to 18 bits, the method for reporting concurrent data can be used to edit, integrate and compress the data information, so as to improve the corresponding rate of reporting the concurrent data.
Further, the upper level device 1 typically defines a network keep-alive message in order to be able to perceive whether the host device 2 is offline at the network layer. That is, after the previous-stage device 1 transmits the application data, the host device 2 independently transmits the message to the previous-stage device 1 while completing the application data. In order to make efficient use of the bus, in this application, the method for reporting concurrent data further includes step S3: the application data message is carried instead of separate keep-alive information when there is an application data interaction requirement between the host device 2 and the previous-level device 1.
Referring to fig. 6, after the previous-stage device 1 sends application data to the host device 2, if the host device 2 needs to report the application data, the data report is directly performed, and no keep-alive information needs to be sent separately. The keep-alive information is sent only when the host device 2 does not need to report the application data. After the data of the host device 2 is reported, the upper device 1 sends a data receiving acknowledgement to the host device 2, so that the sending quantity of keep-alive information between the host device 2 and the upper device 1 is reduced, unnecessary sending requests are reduced, and the response rate and the transmission rate are improved. It can be known that the host device 2 and the slave device 3 can also send keep-alive information according to the method, that is, when application data interaction needs exist between the host device 2 and the slave device 3, the slave device 3 carries an application data message to report to the host device 2 to replace the independent keep-alive information.
Referring to fig. 7, the present invention further provides a concurrent data reporting system, which includes a superior device 1 and at least one host device 2 connected by a low-speed network, where each host device 2 includes a plurality of slave devices 3, and each host device 2 reports the concurrent data of the plurality of slave devices 3 to the superior device 1 according to the foregoing concurrent data reporting method, so as to improve the response rate and the transmission rate of the concurrent data reporting of the plurality of slave devices 3 under the condition of the low-speed network connection.
It should be noted that the concurrent data reporting system in the present application may also include multiple levels of devices, that is, the upper level device 1 may also apply this method to report the data of multiple host devices 2 to the upper level device 1 thereof. Alternatively, the slave device 3 may include a plurality of sub-devices, and the slave device 3 may report the data of the sub-devices to the host device 2 by applying the method. The invention is not limited in this regard. In the present application, the network communication between the upper device 1 and the host device 2 is low-speed network communication, but the communication is not limited to S-485, and may be other low-speed network communication, for example, CAN. The network communication method between the master device 2 and the slave device 3 is not limited to the low-speed network communication.
In summary, according to the method and system for reporting concurrent data provided by the invention, the continuous communication addresses are distributed to the devices of the same type in the slave device 3, so that the host device 2 can conveniently report the same event or state update data of the devices of the same type in the slave device 3 to the upper device 1 of the host, and the communication data packet is encoded by adopting the custom binary format, so that the host device 2 can rapidly compress and sort a large amount of concurrent data of the slave device 3 and then transmit the data to the upper device 1, the transmission rate and response rate of reporting the concurrent data in batches can be effectively improved, and the problem of slow response of the concurrent condition processed by the conventional method in the low-speed network communication system is solved.
The above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and it should be understood by those skilled in the art that the technical solution of the present invention may be modified or substituted without departing from the spirit and scope of the technical solution of the present invention.

Claims (9)

1. The concurrent data reporting method is characterized by comprising the following steps of:
s1: the host device (2) allocates consecutive communication addresses to the same type of devices in the slave device (3);
s2: the host equipment (2) forms a communication data packet with the same event or state update data of the same type of equipment in the slave equipment (3) and reports the communication data packet to the upper-level equipment (1) of the host equipment (2); the communication data packet comprises at least one group of communication data, wherein each group of communication data comprises a description of an event or a state update, the number and the type of the slave devices (3) with the event or the state update, and the starting addresses of the batch slave devices (3) for reporting the group of data;
the format of the communication data packet is coded by adopting a custom binary format;
the custom binary format includes: describing the event or state update reported in batch by using dataInfo and dataLen; the number and the positions of the slave devices (3) reporting the group of data are positioned by using the bitMapValue and the bitMapMode; using startAddr to represent the starting address of the batch slave device (3) reporting the set of data; the custom binary format is defined in a byte or bit format; the dataInfo is independently defined according to actual information, and the length of the dataInfo is N bytes, wherein N is more than 0 and less than or equal to 8; the dataLen is configured to identify a field length of the dataInfo, and the length of the dataLen is 3 bits; the length of the bitMapValue is 18 bits, 0 or 1 represents whether the slave device (3) of the bit is valid, the bitMapMode represents the number of the slave devices (3) represented by each bit in the bitMapValue, and the length of the bitMapMode is 3 bits; the startAddr represents the starting address of the batch slave device (3) reporting the group of data, and the length is 1 byte.
2. The concurrent data reporting method of claim 1, wherein: further comprising S3: and carrying application data messages to replace independent keep-alive information when application data interaction requirements exist between the host equipment (2) and the upper-level equipment (1).
3. The concurrent data reporting method of claim 1, wherein: the method for allocating the communication address by the host device (2) in the step S1 is to manually allocate the communication address according to the type arrangement of the slave devices (3), or the host device (2) allocates the communication address automatically.
4. The concurrent data reporting method of claim 3, wherein: the method for automatically allocating communication addresses by the host device (2) reserves corresponding address spaces for the host device (2) according to the number of the slave devices (3) of each type, and the slave devices (3) of the same type continuously allocate communication addresses in the reserved corresponding address spaces.
5. The concurrent data reporting method of claim 3, wherein: the method for automatically allocating communication addresses by the host equipment (2) is characterized in that the host equipment (2) pre-allocates space addresses according to the types of the slave equipment (3) by a binary reservation method, and the slave equipment (3) of the same type continuously allocates the communication addresses in the reserved corresponding address space.
6. The concurrent data reporting method of claim 5, wherein: when a new slave device (3) requests an address, if the new slave device (3) is a slave device (3) of a known type, the first idle communication address is allocated to the new slave device (3) in a space address of the known type; if the new slave device (3) is not the slave device (3) of the known type, a new type of space address is allocated to the new slave device (3) according to the binary reservation method, and a first free communication address is allocated to the new slave device (3) within the new type of space address.
7. The concurrent data reporting method of claim 6, wherein: and after the host equipment (2) completely allocates the address space according to the type of the slave equipment (3), optimizing the communication addresses of the slave equipment (3) so that the communication addresses of all the slave equipment (3) are continuous.
8. The concurrent data reporting method of claim 1, wherein: and 2, encoding the format of the communication data packet in the step by adopting a mode of adding bit to the initial address.
9. The concurrent data reporting system is characterized in that: the system comprises a superior device (1) and at least one host device (2) connected through a low-speed network, wherein each host device (2) comprises a plurality of slave devices (3), and each host device (2) reports the concurrent data of a plurality of slave devices (3) to the superior device (1) according to the concurrent data reporting method as claimed in any one of claims 1 to 8.
CN202210875447.8A 2022-07-25 2022-07-25 Concurrent data reporting method and system Active CN115242860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210875447.8A CN115242860B (en) 2022-07-25 2022-07-25 Concurrent data reporting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210875447.8A CN115242860B (en) 2022-07-25 2022-07-25 Concurrent data reporting method and system

Publications (2)

Publication Number Publication Date
CN115242860A CN115242860A (en) 2022-10-25
CN115242860B true CN115242860B (en) 2024-02-02

Family

ID=83675422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210875447.8A Active CN115242860B (en) 2022-07-25 2022-07-25 Concurrent data reporting method and system

Country Status (1)

Country Link
CN (1) CN115242860B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222377A (en) * 2007-11-23 2008-07-16 深圳国人通信有限公司 Method and device for processing slave machine parameter in distributed master-salve machine communication
CN102932497A (en) * 2012-10-17 2013-02-13 华为终端有限公司 Method, device and system for obtaining internet protocol address
CN107222482A (en) * 2017-06-01 2017-09-29 黑龙江卓亚科技有限公司 A kind of data management system and method based on compound block chain network
CN113438619A (en) * 2021-06-29 2021-09-24 中车青岛四方车辆研究所有限公司 Multi-data-source information acquisition system and method based on Internet of things
CN114374888A (en) * 2021-12-14 2022-04-19 国网江苏省电力有限公司淮安供电分公司 Automatic meter reading method, system and device based on multiple simultaneous multi-meter and multi-data items of HPLC

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090259786A1 (en) * 2008-04-10 2009-10-15 Chu-Ming Lin Data transfer system and method for host-slave interface with automatic status report
JP5054818B2 (en) * 2008-06-02 2012-10-24 パナソニック株式会社 Interface device, communication system, nonvolatile memory device, communication mode switching method, and integrated circuit
US8626963B2 (en) * 2010-05-04 2014-01-07 Mediatek Inc. Packet based data transfer system and method for host-slave interface
US10320958B2 (en) * 2014-12-19 2019-06-11 Emerson Process Management Lllp Fast data transfer communication protocol for an industrial process network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222377A (en) * 2007-11-23 2008-07-16 深圳国人通信有限公司 Method and device for processing slave machine parameter in distributed master-salve machine communication
CN102932497A (en) * 2012-10-17 2013-02-13 华为终端有限公司 Method, device and system for obtaining internet protocol address
CN107222482A (en) * 2017-06-01 2017-09-29 黑龙江卓亚科技有限公司 A kind of data management system and method based on compound block chain network
CN113438619A (en) * 2021-06-29 2021-09-24 中车青岛四方车辆研究所有限公司 Multi-data-source information acquisition system and method based on Internet of things
CN114374888A (en) * 2021-12-14 2022-04-19 国网江苏省电力有限公司淮安供电分公司 Automatic meter reading method, system and device based on multiple simultaneous multi-meter and multi-data items of HPLC

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Testing system for the friction coefficient of airstrip;Wei Zhou;《 2010 International Conference on Mechanic Automation and Control Engineering》;全文 *
基于参与式感知平台的高并发数据处理系统的设计与实现;徐登佳;《中国优秀硕士论文全文库》;全文 *
无线数据采集时间同步协议研究与工程应用;任际周;王洪辉;庹先国;张贵宇;;电子设计工程(第02期);全文 *

Also Published As

Publication number Publication date
CN115242860A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US20060053324A1 (en) Rack level power management for power over Ethernet
WO2006077570A1 (en) Rack level power management for power over ethernet
CN106200454B (en) A kind of communication system and method for more MCU
JP6619800B2 (en) Wireless base station and system including the wireless base station
US6471011B1 (en) Elevator communication controller and communication control method
CN103139320A (en) Method of assigning identification codes to devices in a network
CN106130857A (en) Two-wire power supply and communication system and method
CN107766271A (en) BMS addresses on electric automobile are from distribution system
JPS58127446A (en) Data transmission network
CN111182086A (en) CAN bus address allocation method and device based on one-master multi-slave module
CN115242860B (en) Concurrent data reporting method and system
CN101552680A (en) Method and device for indicating the port state of the network appliance
JPH03500237A (en) multi-access communication system
CN114500472A (en) Method for automatically distributing RS485 communication address
CN111371659B (en) Method for automatically allocating RS485 slave equipment address
CN112511662B (en) System communication address generation and distribution method and device and air conditioning system
CN101072088A (en) Data backup system, main board and data backup method
CN102111299A (en) Redundant network system and method for realizing redundancy
CN108259130A (en) The Modbus Transmission systems and method of a kind of baud rate even-odd check position adaptive
CN117544596B (en) Automatic address allocation method for telemetry system, telemetry system and storage medium
CN116654728B (en) Communication switching system and method of elevator landing control device
JPH09133388A (en) Air conditioning monitoring device
CN115988005B (en) Method for synchronizing signals by adopting distributed clusters
CN216122959U (en) Multi-floor light control system
CN212392888U (en) Multi-level management scheduling network device of FC-AE-1553 bus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant