Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for communication of a meter and a communication control system of the meter for solving the problem of low success rate of communication of the meter.
In one aspect, an embodiment of the present invention provides a metering device communication method, including:
acquiring information of each metering instrument in a target range;
dividing the metering instruments into batches according to a preset rule according to the information of the metering instruments;
and distributing different communication time for the metering instruments of different batches, wherein the communication time is used for indicating each metering instrument to upload metering data at corresponding time.
In one embodiment, the information of the meters includes the numbers of the meters, and the step of grouping the meters into batches according to the preset rule includes:
dividing the metering instruments with the same number in the serial numbers of the metering instruments into the same batch.
In one embodiment, the step of dividing the meters with the same number in the number of each meter into the same batch comprises:
dividing the metering instruments with the same number in the serial numbers of the metering instruments into the same batch;
or dividing the metering instruments with the same number and tens number in the serial numbers of the metering instruments into the same batch.
In one embodiment, the method further comprises the following steps:
acquiring the total number of the metering instruments according to the information of each metering instrument;
selecting the batch times according to the following formula according to the total number of the metering instruments:
n/N≤p≤T/t
wherein p is the batch times, p is a positive integer, N is the total number of the metering instruments, N is the maximum number of devices which are allowed by the signal base station and are simultaneously connected, T is the longest allowed time for all the metering instruments to complete communication, T is the time required by the communication of a single metering instrument, and T is more than or equal to T.
In one embodiment, the communication time interval between two adjacent batches of meters is constant.
In one embodiment, the information of the gas meter comprises information of the gas meter.
In another aspect, a metering device communication device is provided, including:
the information acquisition unit is used for acquiring the information of each metering instrument in a target range;
the batching unit is used for batching the metering instruments according to the preset rules according to the information of the metering instruments;
and the communication unit is used for distributing different communication time for the metering instruments of different batches, and the communication time is used for indicating each metering instrument to upload metering data at corresponding time.
The computer equipment is in communication connection with each metering instrument;
the computer device includes a memory and a processor, the memory having stored therein computer readable instructions that, when executed by the processor, cause the processor to perform the steps of the meter communication method described above.
A metering instrument communication system is also provided, comprising a metering instrument and the computer device.
A storage medium having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of the meter communication method described above.
The embodiment of the metering device communication method and the device at least comprises the following advantages: according to the communication method of the metering instruments, the information of each metering instrument in the target range is acquired, the metering instruments are processed in batches according to the information of each metering instrument and preset rules, and then different communication time is further distributed for the metering instruments in different batches, so that each metering instrument uploads the metering data at the corresponding communication time. The method and the device realize uploading of the metering data by arranging different communication time for each metering instrument, avoid network congestion, and improve the communication success rate of the metering instruments, thereby improving the communication quality.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element and be integral therewith, or intervening elements may also be present. The terms "one end," "the other end," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In one aspect, as shown in fig. 1, an embodiment of the present invention provides a method for communicating a metering device, including:
s120: acquiring information of each metering instrument in a target range;
s140: dividing the metering instruments into batches according to a preset rule according to the information of the metering instruments;
s160: and distributing different communication time for the metering instruments of different batches, wherein the communication time is used for indicating each metering instrument to upload metering data at corresponding time.
The target range refers to an area range meeting a specific condition, and may be a certain area concentrated in a geographical location, or a signal coverage range of a certain signal base station, and the like. The information of the meter is information for identifying the meter, and may be, for example, a number of the meter or a user ID corresponding to the meter, and the information of each meter is different and unique. The metering device is a metering device with functions of collecting and uploading metering data, and may be various metering devices, such as a gas meter. The preset rule is a rule that each meter can be divided into a plurality of batches. The communication time (corresponding time) refers to the uploading time of the metering data distributed to the metering device, and refers to the uploading time of a specific metering data corresponding to the metering devices of the same batch.
Specifically, the information of each metering instrument is acquired from the target range, batch processing is carried out according to the information of each metering instrument, each metering instrument is divided into a plurality of batches according to a preset rule, the same metering data uploading time is distributed to the metering instruments of the same batch, and the metering data are uploaded to a server or a remote terminal when the metering instruments of the batch reach the corresponding metering data uploading time. And metering instruments in different batches are arranged to upload metering data at different communication times, so that the load of a signal base station at the same time is reduced, the communication success rate is ensured, and the communication quality is further ensured. And different communication time is allocated to metering instruments of different batches, so that network resources can be utilized in different time periods, and the utilization rate of the network resources is improved. On the other hand, the communication in batches can reduce the configuration requirements on network resources such as signal base stations, network bandwidth and the like, so that the communication cost can be reduced.
In one embodiment, as shown in fig. 2, the information of the meters includes the numbers of the meters, and the step of grouping the meters into batches according to the preset rule includes:
s141: dividing the metering instruments with the same number in the serial numbers of the metering instruments into the same batch.
The number of each metering device is a unique number of each metering device, and is identity information capable of distinguishing each metering device. The corresponding digits refer to the same digits in each meter number, such as the ones of each meter number or the tens of each meter number.
Specifically, the information of the metering instruments includes the serial numbers of the metering instruments, the metering instruments with the same corresponding digits in the serial numbers of the metering instruments are divided into the same batch, and the corresponding communication time is distributed to the metering instruments of each divided batch, so that the metering instruments of the same batch upload metering data at the same time, and the metering instruments of different batches upload metering data at different times.
In one embodiment, the step of dividing the meters with the same number in the number of each meter into the same batch comprises:
dividing the metering instruments with the same number in the serial numbers of the metering instruments into the same batch;
or dividing the metering instruments with the same number and tens number in the serial numbers of the metering instruments into the same batch.
Specifically, the method for dividing the metering devices into batches may be that the metering devices with the same ones in the serial numbers of the metering devices are divided into the same batch, and a communication time is allocated to the metering devices of the batch. For example, if the meters are gas meters, n gas meters may be divided into 10 batches (10 batches, with each having a single digit of 0 to 9, etc.) by dividing the gas meters having the same single digit in the number of the gas meters into the same batch. Optionally, the metering devices with the same ones and tens digits in the serial numbers of the metering devices can be divided into the same batch, and a communication time is allocated to the metering device of the batch, so that the metering devices of the batch can upload metering data in the allocated communication time. For example, if the meters are gas meters, if n gas meters are set to have the same batch of meters having the same ones and tens, the n gas meters can be divided into 100 batches (100 batches for each of the ones 00 to 99).
In one embodiment, the method further comprises the following steps:
s130: acquiring the total number of the metering instruments according to the information of each metering instrument;
s131: selecting the batch times according to the following formula according to the total number of the metering instruments:
n/N≤p≤T/t
wherein p is the batch times, p is a positive integer, N is the total number of the metering instruments, N is the maximum number of devices which are allowed by the signal base station and are simultaneously connected, T is the longest allowed time for all the metering instruments to complete communication, T is the time required by the communication of a single metering instrument, and T is more than or equal to T.
For the selection of the batch times, the network condition and a specific communication requirement are comprehensively considered. Optionally, the total number of the metering instruments is obtained, and the batch times are selected according to the total number of the metering instruments, so that the batch p meets the following conditions:
n/N≤p≤T/t
wherein, p is the batch times, N is the total number of the metering instruments, N is the maximum number of devices which are allowed by the signal base station and are simultaneously connected, T is the longest allowed time for all the metering instruments to complete communication, and T is the time required by the communication of a single metering instrument. For example, if N is 1000 and N is 100, the batch number p should not be less than N/N10, T is 2min and T is 200min, the batch number p should not be greater than T/T100. In summary, the gas meters with the same serial number and the same number can be set as the same batch, and the gas meters are divided into 10 batches for peak communication at different times. The number ones and tens numbers can be set to be the same in the same batch, and the gas meter can be divided into 100 batches for peak-off communication at different times.
Therefore, the number of the metering instruments accessed to the signal base station at the same time is not more than the maximum number of the devices which are allowed by the signal base station and connected at the same time, the success rate of network communication is guaranteed, on the other hand, all the metering instruments can be guaranteed to complete communication within the longest allowed time of one-time communication of all the metering instruments, and the integrity of metering data is guaranteed.
In one embodiment, the communication time interval between two adjacent batches of meters is constant.
In order to better distribute network resources, after each metering instrument is divided into batches, different communication time is distributed for each batch of metering instruments, the communication time interval of the metering instruments of two adjacent batches is a fixed value, namely, metering data are uploaded by one batch of metering instruments at the current time node T0, and then metering data are uploaded by the next batch of metering instruments at the interval time delta T, namely, at the time of T0 plus delta T, so that the uploading time of the metering instruments of each batch can be uniformly distributed, and the reasonable utilization of network resources is facilitated.
In one embodiment, the information of the gas meter comprises information of the gas meter.
In the aspect of gas, along with the technical development of gas meters, the intelligent gas meters are mostly adopted to realize the metering statistics of the gas use conditions of all users. Specifically, the information of each gas meter in the target range is obtained, and then, according to the information of each gas meter, each gas meter is divided into batches according to a preset rule. For example, the serial numbers of the gas meters are obtained, the gas meters with the same serial number are divided into the same batch, a communication time is allocated to the gas meters, and the communication time of the metering meters in different batches is guaranteed to be different, so that the gas meters can upload metering data in the corresponding communication time, and peak-to-peak communication is realized.
On the other hand, as shown in fig. 4, an embodiment of the present invention further provides a metering device, including:
an information acquisition unit 100 for acquiring information of each metering device within a target range;
the batching unit 200 is used for batching each metering instrument according to the preset rule according to the information of each metering instrument;
the communication unit 300 is configured to allocate different communication times to different batches of metering devices, where the communication times are used to instruct each metering device to upload metering data at corresponding times.
The definitions of the target range and the information of the measuring instrument are the same as those in the above embodiments, and are not described herein. Specifically, the information obtaining unit 100 obtains information of each metering device within a target range, and sends the information of each metering device to the batch unit 200, and then the batch unit 200 divides each metering device into batches according to a preset rule according to the information of each metering device, and further, the communication unit 300 allocates different communication times to the metering devices of different batches, and instructs each metering device to upload metering data at the corresponding time, so as to implement off-peak communication.
In addition, it should be noted that, for specific limitations of the meter communication device, reference may be made to the above limitations of the meter communication method, and details are not repeated here. All or part of each module in the metering instrument communication device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The embodiment of the present invention further provides a computer device 10, as shown in fig. 5, the computer device 10 is in communication connection with each metering device 20; the computer device 10 comprises a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the meter communication method of:
s120: acquiring information of each metering device 20 in a target range;
s140: according to the information of each metering device 20, dividing each metering device into batches according to a preset rule;
s160: different communication times are allocated to different batches of meters 20, and the communication times are used for instructing each meter 20 to upload metering data at corresponding times.
In one embodiment, a computer device 10 is provided, the computer device 10 may be a terminal, and the internal structure thereof may be as shown in fig. 5. The computer device 10 includes a processor, memory, network interface, display screen, and input means connected by a system bus. Wherein the processor of the computer device 10 is used to provide computing and control capabilities. The memory of the computer device 10 includes a nonvolatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device 10 is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of communicating with a meter 20. The display screen of the computer device 10 may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device 10 may be a touch layer covered on the display screen, or may be a key, a trackball or a touch pad arranged on a housing of the computer device 10, or may be an external keyboard, a touch pad or a mouse, etc.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 10 to which the present application is applied, and that a particular computer device 10 may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
The embodiment of the present invention further provides a meter communication system, as shown in fig. 5 and 6, including a meter 20 and the computer device 10.
The computer device 10 may be a terminal or the like, or may be one of the metering devices 20. Specifically, the computer device 10 in the communication system of the metering device 20 stores a computer program, and the processor of the computer device 10 can execute the stored computer program, and the computer device 10 obtains information of each metering device 20, then divides the metering devices 20 into batches according to the information of each metering device 20, and allocates different communication times to the metering devices 20 of different batches, or issues the communication times to each metering device 20 in a control instruction manner, so that each metering device 20 uploads data at the corresponding communication time.
A storage medium having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of a meter communication method comprising:
s120: acquiring information of each metering instrument in a target range;
s140: dividing the metering instruments into batches according to a preset rule according to the information of the metering instruments;
s160: and distributing different communication time for the metering instruments of different batches, wherein the communication time is used for indicating each metering instrument to upload metering data at corresponding time.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.